Hypothesis Testing Goodness of Fit (GOF) & Test of Independence (TOI)

  1. You would like to see if the proportion of people who place orders at a specific time has changed since the end of spring at the local diner. Below is a table of the latest orders placed at the local diner (hypothesized orders placed end of summer) random sample of 400 orders. Construct a hypothesis test, complete the table below as well as answering the questions asked of the discussion board. Use a level of significance of .05.

Hypothesis

Time

Proportion

Observed

Expected

Chi^2

6:00 to 7:30

0.20

90

7:30 to 9:00

0.30

100

9:00 to 10:30

0.15

70

Q 1 - A

10:30 to 12:00

0.25

110

12:00 to 1:30

0.10

30

Q 1 - B

Chi^2

9.750

A. What is the expected value for the 9:00 to 10:30 slot?

B. What is the value of the chi square test statistic for the 12:00 to 1:30 slot (round to the nearest tenth)?

C. What is the probability of the test statistic for this specific problem?

D. What conclusion will you come to? (just need to state Accept Ho or Reject Ho and Accept Ha just put one of those 2 answers in the body of the discussion board, but you will have a more detailed solution (besides writing one of these statements you will write out in words what the conclusion means) on your worksheet that you will attach as a PDF). Use a level of significance of .05.

E. Using the critical value approach at what critical value will you start rejecting the null hypothesis?

  1. You would like to see if the Time Slot is independent of the Age Group. Construct a hypothesis test, complete the expected and chi square tables as well as answering the questions asked of the discussion board. Use a level of significance of .05.

Observed:

16-24

25-49

50+

7:00 - 10:00 am

10

20

20

50

10:00 - 1:00 pm

20

30

50

100

1:00 - 4:00 pm

30

30

30

90

4:00 - 7:00 pm

20

20

20

60

80

100

120

300

Expected:

16-24

25-49

50+

7:00 - 10:00 am

10:00 - 1:00 pm

Q2-A

1:00 - 4:00 pm

4:00 - 7:00 pm

Chi^2

16-24

25-49

50+

7:00 - 10:00 am

10:00 - 1:00 pm

1:00 - 4:00 pm

4:00 - 7:00 pm

Q2-B

Chi^2=10.167

A. What is the expected value for 10-1pm & 50+ (Q1-A)?

B. What is the value of the chi square test statistic for 4-7pm & 25-49 (Q1-B)?

C. What is the probability of the test statistic for this specific problem?

D. What conclusion will you come to? (just need to state Accept Ho or Reject Ho and Accept Ha just put one of those 2 answers in the body of the discussion board, but you will have a more detailed solution (besides writing one of these statements you will write out in words what the conclusion means) on your worksheet that you will attach as a PDF). Use a level of significance of .05.

E. Using the critical value approach at what critical value will you start rejecting the null hypothesis?

Full Answer Section

       

Expected Values

Time Proportion Observed Expected Chi^2
6:00 to 7:30 0.20 90 80 1.25
7:30 to 9:00 0.30 100 120 3.33
9:00 to 10:30 0.15 70 60 1.67
10:30 to 12:00 0.25 110 100 1.00
12:00 to 1:30 0.10 30 40 2.50

A. The expected value for the 9:00 to 10:30 slot is 60.

B. The value of the chi-square test statistic for the 12:00 to 1:30 slot is 2.5.

Calculations

  • Calculate the chi-square test statistic: Σ[(Observed - Expected)² / Expected] = 9.75

Decision

  • Degrees of freedom = number of categories - 1 = 5 - 1 = 4
  • Using a chi-square distribution table with α = 0.05 and df = 4, the critical value is 9.488.
  • Since the calculated chi-square test statistic (9.75) is greater than the critical value (9.488), we reject the null hypothesis.

C. The probability of the test statistic for this specific problem is the p-value. To find the exact p-value, you would use a chi-square distribution calculator or statistical software.

D. Reject H₀ and Accept Hₐ. This means there is evidence to suggest that the proportion of orders placed at each time slot has changed since the end of spring.

E. Using the critical value approach, you will start rejecting the null hypothesis at a chi-square value of 9.488.

Problem 2: Test of Independence

Hypotheses

  • H₀: Time slot is independent of age group.
  • Hₐ: Time slot is dependent on age group.

Expected Values

16-24 25-49 50+ Total
7:00 - 10:00 am 6.67 13.33 20 40
10:00 - 1:00 pm 13.33 26.67 40 80
1:00 - 4:00 pm 24 48 72 144
4:00 - 7:00 pm 16 32 48 96
Total 60 120 180 300

A. The expected value for 10:00-1:00 pm and 50+ is 40.

B. The value of the chi-square test statistic for 4:00-7:00 pm and 25-49 is 4.

Calculations

  • Calculate the chi-square test statistic: Σ[(Observed - Expected)² / Expected] = 10.167

Decision

  • Degrees of freedom = (number of rows - 1) * (number of columns - 1) = (4 - 1) * (3 - 1) = 6
  • Using a chi-square distribution table with α = 0.05 and df = 6, the critical value is 12.592.
  • Since the calculated chi-square test statistic (10.167) is less than the critical value (12.592), we fail to reject the null hypothesis.

C. The probability of the test statistic for this specific problem is the p-value. To find the exact p-value, you would use a chi-square distribution calculator or statistical software.

D. Accept H₀. This means there is not enough evidence to suggest that time slot is dependent on age group.

E. Using the critical value approach, you will start rejecting the null hypothesis at a chi-square value of 12.592.

Sample Answer

     

Problem 1: Goodness of Fit Test

Hypotheses

  • H₀: The proportion of orders placed at each time slot has not changed since the end of spring.
  • Hₐ: The proportion of orders placed at each time slot has changed since the end of spring.