In: Statistics and Probability
Each year the Hershey company reviews candy bar sales records to compare current consumer preferences to sales records of previous years. Previous sales suggest that 30% of consumers prefer Kit Kats, 15% prefer PayDays, 5% prefer the Whatchamacallit, and 50% prefer the traditional Hershey’s chocolate bar. Market analysts collect a sample of consumers from a random day 2018 and found that 50 people preferred Kit Kat, 45 people prefer PayDay, 12 people prefer Whatchamacallits, and 93 people prefer the traditional Hershey chocolate bars. Have current preferences changed from the historical preferences?
(please also specify null and alternative hypothesis)
null hypothesis: current preferences are same as stated proportion in previous sales
Alternate hypothesis: current preferences have change from stated proportion in previous sales
degree of freedom =categories-1= | 3 | |||
for 0.05 level and 3 df :crtiical value X2 = | 7.815 | |||
Decision rule: reject Ho if value of test statistic X2>7.815 | ||||
applying chi square goodness of fit test: |
relative | observed | Expected | residual | Chi square | |
category | frequency(p) | Oi | Ei=total*p | R2i=(Oi-Ei)/√Ei | R2i=(Oi-Ei)2/Ei |
1 | 0.3000 | 50.0000 | 60.00 | -1.29 | 1.667 |
2 | 0.1500 | 45.0000 | 30.00 | 2.74 | 7.500 |
3 | 0.0500 | 12.0000 | 10.00 | 0.63 | 0.400 |
4 | 0.5000 | 93.0000 | 100.00 | -0.70 | 0.490 |
total | 1.000 | 200 | 200 | 10.0567 | |
test statistic X2 = | 10.057 |
since test statistic falls in rejection region we reject null hypothesis |
we have sufficient evidence to conclude that current preferences have changed from the historical preferences |