Professional Documents
Culture Documents
LEARNING OBJECTIVES :
3.2. Be able to explain Chi-square test for goodness of fit with an example
QUESTION 1 :
An outbreak of Salmonella-related illness was attributed to ice cream produced at a
certain factory. Scientists measured the level of Salmonella in 9 randomly sampled
batches of ice cream.
The levels (in MPN/g) were: 0.593, 0.142, 0.329, 0.691, 0.231, 0.793, 0.519, 0.392,
0.418
Is there evidence that the mean level of Salmonella in the ice cream is greater than
0.3 MPN/g? (Any value greater than 0.3 MPN/g is considered dangerous)
H0 : μ <= 0.3
H1 : μ > 0.3
We will use the t-test, since n (sample size) < 30 and population standard deviation
is not known.
Since, t score > t critical value ( 2.2051 > 1.859548 ), the t-score lies in the critical
region, hence we reject the Null hypothesis.
Since, p critical or alpha > p score ( 0.05 > 0.02926785 ), the t-score lies in the
critical region, hence we reject the Null hypothesis.
QUESTION 2 :
Response Frequency
Excellent 8%
Good 47%
Fair 34%
Poor 11%
A store manager wants to find if these results of customer surveys apply to the
customers of supermarkets in her city. So, she interviewed 207 randomly selected
customers and asked them to rate their responses. The results of this local survey
are given below.
Response Frequency
Excellent 21
Good 109
Fair 62
Poor 15
Determine if the local responses from this survey are the same as expected
frequencies of the national survey, at 95% confidence level.
Ho : Observed = Expected
Ha : Observed ≠ Expected
Degrees of Freedom, df = n - 1 = 3
chi = 6.249084
The p score is larger than the significance value. Hence, we fail to reject the null
hypothesis.
The test statistic falls in the acceptance region. Hence, we fail to reject the null
hypothesis. Therefore, local responses from this survey are the same as expected
frequencies of the national survey.
QUESTION 3 :
A survey is conducted by a gaming company that makes three video games. It wants
to know if the preference of game depends on the gender of the player. Total
number of participants is 1000. Here is the survey result.
Degrees of Freedom, df = ( m - 1 )( n - 1 ) = 2 * 1 = 2
Expected = 400 * 450 , 600 * 450 , 400 * 450 , 600 * 450 , 400 * 100 , 600 * 100
chi = 16.2037
The p score is smaller than the significance value. Hence, we reject the null
hypothesis.