In: Statistics and Probability
The restaurant owner Lobster Jack wants to find out what the peak demand periods are, during the hours of operation, in order to be better prepared to serve his customers. He thinks that, on average, 60% of the daily customers come between 6:00pm and 8:59pm (equally distributed in that time) and the remaining 40% of customers come at other times during the operating hours (again equally distributed). He wants to verify if that is true or not, so he asked his staff to write down during one week the number of customers that come into the restaurant at a given hour each day. His staff gave him the following data:
Time | Day 1 | Day 2 | Day 3 | Day 4 | Day 5 | Day 6 | Day 7 |
---|---|---|---|---|---|---|---|
5:00pm-5:59pm | 15 | 19 | 21 | 20 | 12 | 15 | 15 |
6:00pm-6:59pm | 30 | 23 | 24 | 25 | 28 | 29 | 26 |
7:00pm-7:59pm | 36 | 29 | 39 | 35 | 39 | 30 | 32 |
8:00pm-8:59pm | 29 | 33 | 23 | 29 | 24 | 32 | 27 |
9:00pm-9:59pm | 21 | 20 | 12 | 19 | 18 | 14 | 20 |
10:00pm-10:59pm | 12 | 12 | 15 | 12 | 10 | 15 | 14 |
11:00pm-11:59pm | 8 | 7 | 9 | 10 | 12 | 12 | 9 |
Help the manager figure out if his instincts are correct or not. Use a Chi-Squared test to see if the observed distribution is similar to the expected. Use the average demand for a given time as your observed value.
The owner now wants you to help him analyze his sales data. The restaurant is famous for its Lobo lobster roll. You were given some information based on which you deduced that the demand for the lobster roll was normally distributed with a mean of 220 and standard deviation of 50. You also know that the lobster supplier can provide lobster at a rate that mimics a uniform distribution between 170 and 300. One Lobster is used per roll and the lobsters need to be fresh (i.e. the restaurant can only use the lobsters that are delivered that day).
You decide to run 200 simulations of 1000 days each.
Calculate the expected sales of Lobster roll per day based on your simulation results. Use the expected sales from each of your 200 simulations to create a confidence interval for the average expected sales. What is the 95% confidence interval, L (Your confidence interval is mean +/- L), for this estimate?
Solution
Back-up Theory
Goodness of Fit
Let Oi and Ei be respectively the observed and expected frequencies of the ith class, i = 1 to k, k being the number of classes given.
Hypotheses:
Null: H0: Observed frequencies of are in accordance with the given expected frequencies. Vs
Alternative HA: H0 is false
Test Statistic:
χ2 = ∑[i = 1,k]{(Oi - Ei)2/Ei},
Distribution, Significance Level, α, Critical Value, p-value
Under H0, χ2 ~ χ2k – s, Chi-square distribution with degrees of freedom = k – s,where k = number of classes and s =number of parameters estimated.
p-value = P(χ2k – s > χ2cal)
Given significance level = α , critical value = χ2crit = upper α% of χ2k - s, α
Critical value and p-value obtained using Excel Function: Statistical CHIINV and CHIDIST are as shown in the above table.
Decision
Since, χ2cal > < χ2crit, or equivalently, since p-value < > α, H0 is rejected/accepted
Now to work out the solution,
Time Interval |
6 to 8:59pm |
Other |
Total |
Oi |
622 |
398 |
1020 |
pi |
0.6 |
0.4 |
1 |
Ei = 1020 x pi |
612 |
408 |
1020 |
χ2 |
0.1634 |
0.2451 |
0.4085 |
Other includes timeslots 9 to 11:59 pm and 5 to 5:59 pm
Oi = total of all 7 days for the ith time slot.
CHECK: ΣOi = ΣEi. Done |
k |
2 |
s |
0 |
α |
0.05 |
||
χ2cal |
0.4085 |
DF |
2 |
χ2crit |
5.9915 |
|||
Decision
Since, χ2cal > χ2crit, H0 is accepted.
Conclusion
Since H0 is accepted, we conclude that manager’s instinct that 60% of the daily customers come between 6:00pm and 8:59pm and the remaining 40% of customers come at other times during the operating hours is validated. Answer
DONE