Turning random draws into inventory shortages

A kiosk simulates daily demand for reusable bottles. Demand is 20 bottles with probability 0.25, 35 bottles with probability 0.50, and 50 bottles with probability 0.25. Each trial draws a number uu uniformly from 0≤u<10 \leq u < 1.


The model uses cumulative probability, the probability accumulated through an ordered set of outcomes, to assign demand as follows:

  • 0≤u<0.250 \leq u < 0.25: demand is 20 bottles.
  • 0.25≤u<0.750.25 \leq u < 0.75: demand is 35 bottles.
  • 0.75≤u<10.75 \leq u < 1: demand is 50 bottles.

Each day begins with 30 bottles, and unmet demand is lost. Complete the simulated demand and shortage columns using exact whole numbers of bottles. A shortage is the amount by which demand exceeds available stock, or zero when stock is sufficient.

TrialRandom draw uDemand (bottles)Shortage (bottles)
10.12
20.25
30.63
40.75

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Monte Carlo Simulation Questions: