In: Statistics and Probability
A certain retail store bases its staffing on the number of customers that arrive during certain time slots. Based on prior experience this store expects 32% of its customers between 8:00 am and 12:00 pm; 21% of its customers between 12:00 pm and 4:00 pm; 35% of its customers between 4:00 pm and 8:00 pm; and 12% of its customers between 8:00 pm and midnight. On a certain day, the store had 214, 198, 276, and 134 customers in those time slots, respectively. Should the store change its staffing? (Consider an alpha of 0.05.)
Solution:
Ho: The expected values match the observed values
Ha: The expected values do not match the observed values
assign(“exp”,c(32,21,35,12)) assign(“obs”,c(214,198,276,134))
sum((obs-exp)^2/exp) = 5426.773
1-pchisq(5426.773,3) = 0
p < alpha, therefore RHo: the store should change its
staffing.
What was wrong with this solution?
The following table is obtained:
Categories | Observed | Expected | (fo-fe)2/fe |
Category 1 | 214 | 822*0.32=263.04 | (214-263.04)2/263.04 = 9.143 |
Category 2 | 198 | 822*0.21=172.62 | (198-172.62)2/172.62 = 3.732 |
Category 3 | 276 | 822*0.35=287.7 | (276-287.7)2/287.7 = 0.476 |
Category 4 | 134 | 822*0.12=98.64 | (134-98.64)2/98.64 = 12.676 |
Sum = | 822 | 822 | 26.026 |
(5) Conclusion
It is concluded that the null hypothesis Ho is rejected. Therefore, there is enough evidence to claim that the store change its staffing at the α=0.05 significance level.