In: Statistics and Probability
manufacturer of colored candies states that
1313%
of the candies in a bag should be brown,
1414%
yellow,
1313%
red,
2424%
blue,
2020%
orange, and
1616%
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
alpha equalsα=0.050.05
level of significance.
LOADING...
Click the icon to view the table.
Determine the null and alternative hypotheses. Choose the correct answer below.
A.
H0:
The distribution of colors is the same as stated by the manufacturer.
H1:
The distribution of colors is not the same as stated by the manufacturer.This is the correct answer.
B.
H0:
The distribution of colors is not the same as stated by the manufacturer.
H1:
The distribution of colors is the same as stated by the manufacturer.
C.
None of these.
Your answer is not correct.
Compute the expected counts for each color.
Color |
Frequency |
Expected Count |
|
---|---|---|---|
Brown |
5959 |
49.66 49.66 |
|
Yellow |
6464 |
53.48 53.48 |
|
Red |
5555 |
49.66 49.66 |
|
Blue |
6262 |
91.68 91.68 |
|
Orange |
7878 |
76.40 76.40 |
|
Green |
6464 |
61.12 61.12 |
|
(Round to two decimal places as needed.) |
What is the test statistic?
chi Subscript 0 Superscript 2χ20 |
equals= |
Solution:-
State the hypotheses. The first step is to state the null hypothesis and an alternative hypothesis.
A)
H0: The distribution of colors is the same as stated by the manufacturer.
H1:The distribution of colors is not the same as stated by the manufacturer.
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 = 14.18
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 14.18.
We use the Chi-Square Distribution Calculator to find P(X2 > 14.18) = 0.015.
Interpret results. Since the P-value (0.015) is less than the significance level (0.05), we have to reject the null hypothesis.