In: Statistics and Probability
A manufacturer of colored candies states that 13% of the candies in a bag should be brown, 14% yellow, 13% red, 24% blue, 20% orange, and 16% green. A student randomly selected a bag of colored candies. He counted the number of candies of each color and obtained the results shown in the table. Test whether the bag of colored candies follows the distribution stated above at the α=0.05 level of significance. Color Frequency Expected Count Brown 59 Yellow 63 Red 55 Blue 60 Orange 85 Green 65 Determine the correct null and alternative hypothesis. Choose the correct answer below.
Compute the expected counts for each color:
What is the P-value
What is the test statistic χ 0 2
COLOR | FREQUENCY | EXPECTED COUNT |
BROWN | 59 | |
YELLOW | 63 | |
RED | 55 | |
BLUE | 60 | |
ORANGE | 85 | |
GREEN | 65 |
A manufacturer of colored candies states that 13% of the candies in a bag should be brown, 14% yellow, 13% red, 24% blue, 20% orange, and 16% green. A student randomly selected a bag of colored candies. He counted the number of candies of each color and obtained the results shown in the table. Test whether the bag of colored candies follows the distribution stated above at the α=0.05 level of significance. Color Frequency Expected Count Brown 59 Yellow 63 Red 55 Blue 60 Orange 85 Green 65 Determine the correct null and alternative hypothesis. Choose the correct answer below. Compute the expected counts for each color: What is the P-value What is the test statistic χ 0 2
Solution:-
State the hypotheses. The first step is to state the null hypothesis and an alternative hypothesis.
Null hypothesis: The bag of colored candies follows the stated distribution.
Alternative hypothesis: The bag of colored candies does not follows the stated distribution.
Formulate an analysis plan. For this analysis, the significance level is 0.05. Using sample data, we will conduct a chi-square goodness of fit test of the null hypothesis.
Analyze sample data. Applying the chi-square goodness of fit test to sample data, we compute the degrees of freedom, the expected frequency counts, and the chi-square test statistic. Based on the chi-square statistic and the degrees of freedom, we determine the P-value.
DF = k - 1 = 6 - 1
D.F = 5
(Ei) = n * pi
X2 = 15.9132
where DF is the degrees of freedom, k is the number of levels of the categorical variable, n is the number of observations in the sample, Ei is the expected frequency count for level i, Oi is the observed frequency count for level i, and X2 is the chi-square test statistic.
The P-value is the probability that a chi-square statistic having 5 degrees of freedom is more extreme than 15.9132.
We use the Chi-Square Distribution Calculator to find P(X2 > 15.9132) = 0.007.
Interpret results. Since the P-value (0.007) is less than the significance level (0.05), we have to reject the null hypothesis.