Statistics question: Adjusting staffing levels to match customer traffic

To calculate the chi-squared value, I used χ2=∑[(observed-predicted)2/predicted] t...satisfactory (Assume Poisson like errors).In summary, the model for adjusting staffing levels using a ratio of customer demand through the week does not seem to be satisfactory based on the chi-squared value of 10.56, which is well outside the prediction that chi-squared ≈ n.d.f. (where n.d.f. = 5-1 = 4). The approach used in the solution seems correct, but there may be a need for further analysis. "Assume Poisson like errors" may
  • #1
Physics Dad
55
1
Hi, I have a very basic statistics homework question, and I have given it a go, but I just wanted to know if I had approached it correctly:

QUESTION
A shop adjusts its staffing levels using a model of customer demand through the week in the ratio of: 0.22(Mon); 0.14(Tue); 0.16(Wed); 0.18(Thu); 0.30(Fri)

When opening a new branch of the shop customer levels were measured as: 2680(Mon); 1600(Tue); 2020(Wed); 2250(Thu); 3650(Fri)

By normalising the model, make a prediction for the number of customers on each day of the week.

Hence use chi-squared to determine if the model is satisfactory (Assume Poisson like errors).

ATTEMPT AT SOLUTION
First and foremost, I calculated the total number of people who visited the shop for the week = 12200.

For each day, I then calculated the predicted number of people based upon the ratio per day (total people * ratio) to give:

DAY Mon Tue Wed Thu Fri
OBSERVED 2680 1600 2020 2250 3650
PREDICTED 2684 1708 1952 2196 3660

To calculate the chi-squared value, I used χ2=∑[(observed-predicted)2/predicted] to give a chi-squared value of 10.56

Using reasonable logic and knowledge, I can say that the model is not satisfactory as this chi-squared value of 10.56 is well outside the prediction that chi-squared ≈ n.d.f. (where n.d.f. = 5-1 = 4).

NOTE

I feel I have been too simplistic in my approach.

I would appreciate any feedback.

Many thanks
 
Last edited:
Physics news on Phys.org
  • #2
Physics Dad said:
Hi, I have a very basic statistics homework question, and I have given it a go, but I just wanted to know if I had approached it correctly:

QUESTION
A shop adjusts its staffing levels using a model of customer demand through the week in the ratio of: 0.22(Mon); 0.14(Tue); 0.16(Wed); 0.18(Thu); 0.30(Fri)

When opening a new branch of the shop customer levels were measured as: 2680(Mon); 1600(Tue); 2020(Wed); 2250(Thu); 3650(Fri)

By normalising the model, make a prediction for the number of customers on each day of the week.

Hence use chi-squared to determine if the model is satisfactory (Assume Poisson like errors).

ATTEMPT AT SOLUTION
First and foremost, I calculated the total number of people who visited the shop for the week = 12200.

For each day, I then calculated the predicted number of people based upon the ratio per day (total people * ratio) to give:

DAY Mon Tue Wed Thu Fri
OBSERVED 2680 1600 2020 2250 3650
PREDICTED 2684 1708 1952 2196 3660

To calculate the chi-squared value, I used χ2=∑[(observed-predicted)2/predicted] to give a chi-squared value of 10.56

Using reasonable logic and knowledge, I can say that the model is not satisfactory as this chi-squared value of 10.56 is well outside the prediction that chi-squared ≈ n.d.f. (where n.d.f. = 5-1 = 4).

NOTE

I feel I have been too simplistic in my approach.

I would appreciate any feedback.

Many thanks
You seem to have done exactly what the question asked for, though I am not sure what is meant by "assume Poisson-like errors".
 
  • #3
Physics Dad said:
Hi, I have a very basic statistics homework question, and I have given it a go, but I just wanted to know if I had approached it correctly:

QUESTION
A shop adjusts its staffing levels using a model of customer demand through the week in the ratio of: 0.22(Mon); 0.14(Tue); 0.16(Wed); 0.18(Thu); 0.30(Fri)

When opening a new branch of the shop customer levels were measured as: 2680(Mon); 1600(Tue); 2020(Wed); 2250(Thu); 3650(Fri)

By normalising the model, make a prediction for the number of customers on each day of the week.

Hence use chi-squared to determine if the model is satisfactory (Assume Poisson like errors).

ATTEMPT AT SOLUTION
First and foremost, I calculated the total number of people who visited the shop for the week = 12200.

For each day, I then calculated the predicted number of people based upon the ratio per day (total people * ratio) to give:

DAY Mon Tue Wed Thu Fri
OBSERVED 2680 1600 2020 2250 3650
PREDICTED 2684 1708 1952 2196 3660

To calculate the chi-squared value, I used χ2=∑[(observed-predicted)2/predicted] to give a chi-squared value of 10.56

Using reasonable logic and knowledge, I can say that the model is not satisfactory as this chi-squared value of 10.56 is well outside the prediction that chi-squared ≈ n.d.f. (where n.d.f. = 5-1 = 4).

NOTE

I feel I have been too simplistic in my approach.

I would appreciate any feedback.

Many thanks

It is true that the null hypothesis is rejected at the 5% level, but would be accepted at any level ≤ 3.2 %.
 
  • #4
tnich said:
You seem to have done exactly what the question asked for, though I am not sure what is meant by "assume Poisson-like errors".
$$\chi^2=\sum_i\frac{(Obs_i-Pred_i)^2}{\sigma_i^2}$$For Poisson statistics, ##\sigma_i=\sqrt{Obs_i}##, hence OP's equation (almost).
 
  • #5
kuruman said:
$$\chi^2=\sum_i\frac{(Obs_i-Pred_i)^2}{\sigma_i^2}$$For Poisson statistics, ##\sigma_i=\sqrt{Obs_i}##, hence OP's equation (almost).
This is what I remembered, too, but I looked it up to be sure. What I found is that the form of the ##\chi^2## test you mention here appears to apply when sampling from a normal distribution, but it is not clear that it applies to a Poisson distribution. The form of the test the OP used applies to samples from a multinomial distribution, which seems appropriate. The Poisson distribution does have a variance equal to ##\sqrt {Pred_i} ## (as I read it), so I guess the hint given in the problem statement was to indicate the form of the ##\chi^2## to be used. See https://en.wikipedia.org/wiki/Chi-squared_test. Not having enormous faith in Wikipedia, I did check Hogg and Craig and found the same result.
 
  • #6
tnich said:
This is what I remembered, too, but I looked it up to be sure. What I found is that the form of the ##\chi^2## test you mention here appears to apply when sampling from a normal distribution, but it is not clear that it applies to a Poisson distribution. The form of the test the OP used applies to samples from a multinomial distribution, which seems appropriate. The Poisson distribution does have a variance equal to ##\sqrt {Pred_i} ## (as I read it), so I guess the hint given in the problem statement was to indicate the form of the ##\chi^2## to be used. See https://en.wikipedia.org/wiki/Chi-squared_test. Not having enormous faith in Wikipedia, I did check Hogg and Craig and found the same result.

The ##\chi##-squared test is assessing the accuracy of a multinomial distribution; that is, it is testing the hypothesis that a sample occupancy vector ##(k_1, k_2, \ldots, k_r)## (with ##\sum k_i = n##) follows a mutinomial distribution
$$P(k_1, k_2, \ldots, k_r) = \binom{n}{k_1, k_2, \ldots, k_r} p_1^{k_1}\: p_2^{k_2} \cdots p_r^{k_r}, $$
for some vector of category probabilities ##(p_1, p_2, \ldots, p_r)## with ##\sum p_i = 1.##
For large ##n## (and all expected values ##n p_i## moderate-to-large) the vector of occupancies ##(X_1, X_2, \ldots, X_r)## is approximately a multivariate normal, so the deviations ##X_1 - n p_1, X_2 - n p_2, \ldots, X_r - n p_r## are mean-zero normal random variables (but correlated). If normality were exact the sum of the ##(X_i - n p_i)^2/ \sigma_i^2## would have a Chi-squared distribution with ##r-1## d.f. In practice, the Chi-squared is approximate because normality is approximate. I believe that the usual statements about near-validity of the Chi-squared in real cases is based on extensive analytical research and Monte-Carlo studies done by many people over many years.

Anyway, the test works if the deviations are normal, not Poisson!
 
Last edited:

Related to Statistics question: Adjusting staffing levels to match customer traffic

1. How do you determine the appropriate staffing levels for customer traffic?

The staffing levels can be determined by analyzing historical data on customer traffic, such as peak and off-peak times, and using statistical methods to forecast future patterns. This can also be done by conducting surveys or observing customer behavior to understand their needs and preferences.

2. Is there a specific formula or algorithm for adjusting staffing levels?

There is no one-size-fits-all formula for adjusting staffing levels. The approach will depend on the nature of the business, the type of customer traffic, and the desired level of service. However, statistical techniques such as regression analysis, queuing theory, and time series analysis can be used to develop a staffing model.

3. How often should staffing levels be adjusted?

Staffing levels should be regularly reviewed and adjusted based on changes in customer traffic patterns. This could be done monthly, quarterly, or annually depending on the business needs. It is important to monitor and track customer traffic data to identify any trends or changes that may require adjustments in staffing levels.

4. What are some challenges in adjusting staffing levels to match customer traffic?

Some common challenges include unexpected changes in customer behavior, variations in demand that are difficult to predict, and the cost implications of over or understaffing. It is also important to consider the impact of external factors such as weather, holidays, and special events on customer traffic.

5. How can statistical analysis help in optimizing staffing levels?

Statistical analysis can help identify patterns and trends in customer traffic data, which can inform decision-making on staffing levels. By using statistical techniques, businesses can make data-driven decisions that are more accurate and effective in managing staffing levels and meeting customer demands.

Back
Top