In: Statistics and Probability
Flavor |
Cherry |
Strawberry |
Chocolate |
Orange |
Lime |
Expected % |
30% |
20% |
20% |
15% |
15% |
A bag bought at random has the following number of mints in it.
Flavor |
Cherry |
Strawberry |
Chocolate |
Orange |
Lime |
Observed |
67 |
50 |
54 |
29 |
25 |
Determine whether this distribution is consistent with company’s stated proportions.
The null hypothesis is H0 : The brand of mints come in various flavours are consistent with company's states proportions.
The alternative hypothesis is H1:The brand of mints come in various flavours are not consistent with company's states proportions.
We compute the table of observed frequencies and expected frequencies
here, expected frequencies gives in the % form that is in probability form (Pi)
We calculate expected frequencies = Ei = N*Pi
N =total observations = 225
Pi = proportion of each flavour (we convert it % into fraction values)
Observation table
The test statistic is given by
Oi = observed frequencies
Ei = expected frequencies
Flavour |
Oi |
Pi |
Ei = N*Pi |
Oi^2/Ei |
Cherry |
67 |
0.30 |
67.5 |
66.50 |
Strawberry |
50 |
0.20 |
45 |
55.56 |
Chocolate |
54 |
0.20 |
45 |
64.8 |
Orange |
29 |
0.15 |
33.75 |
24.92 |
Lime |
25 |
0.15 |
33.75 |
18.52 |
= 230.3 |
test statistic is
............(1)
Degrees of freedom = n-k-1
n = total category of flavour = 5
k = number of independent observation = 0
Degrees of freedom = n-k-1 = 5-0-1 = 4
Degrees of freedom = 4
P-value
Oi | Ei |
67 | 67.5 |
50 | 45 |
54 | 45 |
29 | 33.75 |
25 | 33.75 |
We find p-value in excel by using command
=CHITEST(actual range,expected_range)
select observed frequecies Oi in place of actual range and
expected frequencies in expected_range then press Enter key
P-value = 0.2582
We find 95% confidence interval and find the critical value of Chi-square by using excel is
=CHIINV(probability,degrees of freedom)
here 95% = 0.95 condidence interval
Critical value = CHIINV(0.05,4) then press Enter key in Excel
Critical value = 9.49.................(2)
By comparing calculated value in equation (1) with Critical value in equation (2)
and take decision of accept or reject null hypothesis
here,
Calculated value = 5.3 < Critical value = 9.49
So we should accept our null hypothesis.
that is the brand of mints come in various flavours are consistent with company's states proportions.