Tomorrow’s demand is not a number but a distribution. This week you describe uncertain quantities with the normal, Poisson and binomial distributions, simulate them with NumPy, and use a confidence interval to judge how far a small sample can be trusted, all to make decisions that account for the spread and not only the mean.
Slides¶
Present full screen Download the PDF
Click or tap the slide to move forward, its left edge to go back; the arrow keys work too.
Reading¶
Probability for Decisions plans four mornings at the Olaya branch: how many croissants to bake (baking the mean sells out on about half the days), how many baristas to put on the 8 o’clock peak, how many pre-ordered breakfast boxes to prepare, and whether a 36-day trial of opening at 6:30 proves that it pays.
Lab 5: Simulating distributions with NumPy¶
The regional manager wants a morning plan for two more branches: baristas and breakfast boxes at University, croissants at Corniche. You fit a distribution to each quantity, check it by simulation, then decide with a confidence interval whether Corniche should open at 6:30 for good, and write a three-sentence recommendation.
Open the lab, then use its Open in Colab button.
Data: qahwa
_arrivals _2025 .csv (1,460 rows, one per branch and day of 2025). The notebook downloads it by itself. Submit before the next lab session. The solutions are for checking your work afterwards.
Next week¶
Regression: estimating and interpreting a model that explains one variable from others, with dummy variables and interactions.