Statistics question: Adjusting staffing levels to match customer traffic

Click For Summary

Homework Help Overview

The discussion revolves around a statistics problem involving the adjustment of staffing levels in a shop based on customer demand ratios throughout the week. The original poster presents a model for predicting customer numbers and applies a chi-squared test to evaluate the model's adequacy, using observed customer counts for each day of the week.

Discussion Character

  • Exploratory, Assumption checking, Conceptual clarification

Approaches and Questions Raised

  • The original poster calculates total customer counts and predicted values based on given ratios, then computes a chi-squared statistic to assess model fit. Some participants question the appropriateness of the statistical methods used, particularly regarding the assumption of Poisson-like errors and the implications of the chi-squared test.

Discussion Status

Participants are actively engaging with the original poster's approach, providing feedback on the calculations and questioning the statistical assumptions. There is a mix of agreement on the calculations and uncertainty regarding the statistical methods, particularly the interpretation of the chi-squared test in the context of the problem.

Contextual Notes

Some participants note the potential oversimplification in the original poster's approach and express concern about the assumptions made regarding the distribution of errors. The discussion also highlights the need for clarity on the statistical framework being applied.

Physics Dad
Messages
54
Reaction score
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
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".
 
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 %.
 
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).
 
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.
 
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: