0
$\begingroup$

I am trying to find probabilities of orders a restaurant gets on Sunday's. For last 6 months average orders are 1000 without any big anomalies like 700 or 1300. This is a case of poisson distribution & I used scipy library in python and plotted the probabilities.

The graph shows probabilities that of getting orders greater than values on x-axis, e.g. probability of orders>800 is 1, >950 is close to 0.95, >1000 is close to 0.5 & so on.

I am not sure if these probabilities are correct esp. for high order counts, e.g. for >1050 orders prob is less than 0.1, for >1100 almost zero which I find odd because its quite likely to have 1100 or little more orders occasionally. So what are thoughts on probabilities calculated using Poisson distribution.

prob_arr=[]
orders_arr=[]

dist=poisson(1000) #mu=1000

for num_orders in range(800,1201,50):
    prob_arr.append(dist.sf(num_orders)) #survival function
    orders_arr.append(num_orders)

plt.figure(figsize=(12,4))
plt.plot(orders_arr,prob_arr,linewidth=2)
plt.xlabel("Orders Count")
plt.ylabel("Probability")
plt.title("Probabilities of Minimum Orders Count"); 

enter image description here

As suggested by @Romain Reboulleau tried truncated norm distribution and below graph shows probabilities of getting orders >than values on x-axis derived using scipy truncnorm.

Truncated norm distribution probabilities

Problem is low probability of getting orders >=1100, it is 1.3% as per truncnorm vs only 0.09% with poisson. This would make non-stats business managers laugh and I am not sure how to justify this.

$\endgroup$
1
$\begingroup$

This seems quite right to me. A poisson(1000) law has a standard deviation of $\sqrt{1000}$ which is something around $31.6$.

At such values, the Poisson law pretty much behaves like a normal distribution, so the probability of getting a value greater than 1100 would be very close to 0 (around 0.1%).

Perhaps what you need is not a Poisson law, but a truncated normal distribution?

$\endgroup$
3
  • $\begingroup$ Thanks Romain, I have edited the question and added my analysis of truncated normal distribution. My doubt is practical utility/validity of calculating probabilities by fitting prob distributions & using them for practical business purposes. For e.g. with truncated norm distribution prob of getting orders > 1100 is mere 1.3% and business managers would laugh at this value. And with poisson this value was 0.09%. If we think in practical terms then with a mean of 1000 orders over 6 months period we expect on a lucky day we get >=1100 orders but stats analysis isn't helping with such low prob. $\endgroup$ – Vikrant Arora Oct 10 '19 at 9:00
  • $\begingroup$ Can you therefore clarify how to deal with this situation, because going by 1.3% probability stats tell us to not prepare for >=1100 orders but plain reasoning says otherwise. $\endgroup$ – Vikrant Arora Oct 10 '19 at 9:02
  • 1
    $\begingroup$ It really depends on the data that you have. You can certainly fit a truncated normal, with a mean of 1000 and a certain standard deviation, but you should adjust the latter in order for it to match what you expect. If you don't manage that, then you will have to find another analytical pdf to fit your data, or try more advanced techniques (gaussian mixture model for instance). $\endgroup$ – Romain Reboulleau Oct 11 '19 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.