Tutorials › Introduction to Statistics › Choosing a Campus Shuttle Plan With Simulation

Simulation and Probability Models · Tutorial 398 of 996

Choosing a Campus Shuttle Plan With Simulation

Use repeated simulated passenger arrivals to compare shuttle plans, estimate the chance of missing a first ride, and make a decision that is conditional on the model.

Beginner 10 min read

What You'll Learn

  • Define precisely what it means for a passenger to be left behind under a shuttle plan.
  • Set up passenger arrivals, departure times, bus capacities, and boarding rules for a simulation.
  • Estimate a passenger-level probability from simulated outcomes.
  • Compare two schedules using the same simulated arrival patterns.
  • Interpret a simulation-based decision while recognizing its model assumptions.

Why Compare Shuttle Plans by Simulation?

A shuttle plan can look adequate when judged by its total number of seats, yet still leave passengers waiting if too many arrive before the same departure. The timing of arrivals matters as much as the total capacity. Simulation lets us represent that timing, apply each plan’s boarding rules, and estimate how often an arriving passenger misses a ride.

The result is an estimate for a specified model, not a guarantee about actual campus operations. To make the estimate meaningful, we must state what counts as a missed ride and specify how arrivals and buses are represented.

Define the Outcome and the Model

Consider a hypothetical peak period with 24 passengers. Each passenger arrives at the stop during one of minutes 0 through 9. We compare two plans. Under Plan A, buses depart at minutes 4 and 10; under Plan B, they depart at minutes 6 and 10. Every bus has room for 14 passengers. Passengers who can board are served in arrival order, and arrivals in a departure minute occur before that minute’s bus leaves. If passengers arrive at the same minute, their order does not affect the number who can board.

For this example, each passenger’s arrival minute is independently and equally likely to be any of the ten minutes 0 through 9. The 24 passengers and their arrival times are regenerated for each simulated peak period. The two plans use the same arrival times within a replication, so the comparison holds the simulated passenger demand fixed while changing the first departure time.

Definition: A passenger is left behind on their first eligible bus if they have arrived by that bus’s departure but cannot board because its 14 seats are full. A passenger who arrives after the first departure is not counted as left behind at that departure: their first eligible bus is the later one. The outcome measured here is missing a first ride, even if the passenger boards the second bus.

Both plans have enough total capacity to carry all 24 passengers: there are 28 seats across the two departures. If the first bus carries 14, at most 10 passengers remain for the second bus, which has 14 seats. Thus no passenger in this model is permanently stranded; “left behind” refers to missing the first eligible departure.

Work Through One Simulated Peak

Worked Example: Applying Both Schedules to the Same Arrivals

Suppose the 24 simulated arrivals by minute are as follows. The counts sum to 24.

Arrival minute0123456789
Passengers arriving2324522121

Plan A. By minute 4, \(2+3+2+4+5=16\) passengers have arrived. The first bus can carry 14, so \(16-14=2\) passengers miss that first eligible bus. The 8 passengers arriving at minutes 5 through 9, together with the 2 who could not board, make 10 passengers for the minute-10 bus. All 10 fit.

Plan B. By minute 6, \(2+3+2+4+5+2+2=20\) passengers have arrived. The first bus carries 14, so \(20-14=6\) passengers miss that departure. The other 4 passengers who have not boarded arrive after minute 6; their first eligible bus is the minute-10 bus. That bus has 10 passengers to carry, so all fit.

For this one arrival pattern, 2 of 24 passengers miss their first eligible bus under Plan A and 6 of 24 do so under Plan B. A single simulated peak is illustrative, not a reliable probability estimate; different arrival patterns can produce different outcomes.

Estimating the Chance From Repeated Runs

Repeat the simulated peak \(R\) times. In replication \(r\), let \(Y_r\) be the number of passengers who miss their first eligible bus under a particular plan. Since each replication has 24 passengers, the estimated passenger-level probability is the total number of missed first rides divided by the total number of simulated passengers:

$$ \hat{p}_{\text{sim}}=\frac{\sum_{r=1}^{R}Y_r}{24R} $$

This denominator matters. The numerator counts missed rides, while \(24R\) counts passenger outcomes. The quantity estimates the probability that a passenger drawn from this model misses their first eligible bus. It is not the probability that an entire peak period has at least one passenger left behind.

Justification: Let \(I_{rj}=1\) if passenger \(j\) in replication \(r\) misses their first eligible bus, and let \(I_{rj}=0\) otherwise. Then \(Y_r=\sum_{j=1}^{24}I_{rj}\). If every passenger has the same modeled chance \(p\) of missing that bus, the expected fraction missed in one replication is $$ E\left(\frac{Y_r}{24}\right) =\frac{1}{24}\sum_{j=1}^{24}E(I_{rj}) =\frac{1}{24}\sum_{j=1}^{24}p =p. $$ Averaging the fractions over many independently simulated replications therefore estimates the model probability. Passengers within a replication need not have independent missed-ride outcomes for this expectation to hold.

The simulation estimates the probability under the stated assumptions. It does not establish that actual arrival minutes are equally likely, that passengers arrive independently, or that the number arriving in each peak is always 24. Those are modeling choices, not findings produced by the simulation.

Worked Example: Calculating the Estimated Probabilities

Suppose a hypothetical simulation runs 20,000 peak periods for each plan, with 24 passengers per period. That gives \(24(20{,}000)=480{,}000\) passenger outcomes per plan. Assume the simulated totals are 5,760 missed first rides for Plan A and 52,800 for Plan B.

For Plan A:

$$ \hat{p}_{A}=\frac{5{,}760}{480{,}000}=0.0120 $$

For Plan B:

$$ \hat{p}_{B}=\frac{52{,}800}{480{,}000}=0.110 $$

Under this model, the estimated chance that a passenger misses their first eligible bus is 1.20% for Plan A and 11.0% for Plan B. The totals are consistent with the capacity rules: each replication can have between 0 and 10 missed first rides, so across 20,000 replications the possible totals range from 0 to 200,000.

The estimated difference is \(0.110-0.0120=0.0980\), or 9.80 percentage points. In this simulation, Plan B’s estimated missed-first-ride probability is higher by 9.80 percentage points. This describes the model-based comparison; it is not a claim that the same difference must occur in actual service.

Use the Estimate to Inform a Decision

A decision requires a criterion as well as an estimate. Suppose campus planners set a hypothetical target that no more than 5% of passengers should miss their first eligible bus during the peak. The simulated estimate for Plan A, 1.20%, is below that target; the estimate for Plan B, 11.0%, is above it. If reducing missed first rides is the main objective, these results favor Plan A under the specified model.

That conclusion should remain conditional. Plan B’s later first departure might reduce how long some passengers wait before a bus arrives, while the chosen outcome records only whether they board their first eligible bus. A fuller decision could consider waiting time, operating cost, passenger loads, or other goals. Those measures would need to be defined and modeled rather than inferred from the missed-ride probabilities.

Using the same arrival patterns for both plans makes the comparison easier to interpret: each pair of outcomes reflects a schedule change applied to the same simulated demand. The arrival patterns are still hypothetical. If real passengers often arrive in groups—for example, when a class ends—or if the number arriving varies from peak to peak, the independent, fixed-size arrival model may misrepresent the chance of a full bus. A useful decision should check whether its conclusion is sensitive to credible alternatives for arrival patterns and demand.

Common Mistakes and Practical Checks

  • Counting every passenger who waits for the second bus as left behind. Passengers who arrive after the first departure have not missed a bus they could board. Count them as missed only if they are eligible for a bus and cannot board.
  • Using the wrong denominator. Dividing by the number of simulated peak periods estimates an average count per peak, not a passenger-level probability. For that probability, divide missed passenger outcomes by all passenger outcomes.
  • Ignoring capacity bounds. In this setup, no more than 10 passengers can miss the first eligible bus in a replication: at most 24 passengers are present, and the first bus seats 14. Any simulated total above \(10R\) signals an implementation or counting error.
  • Treating the estimate as a guaranteed campus rate. The simulation estimates a probability under its assumptions. Real arrival patterns, demand, or boarding procedures may differ.
  • Choosing a plan from one run. A single simulated peak can be unusually crowded or quiet. Repeat the process and compare estimated rates, then consider whether the model represents the setting well enough for the decision.
Key takeaway: Define exactly which passengers count as left behind, represent each plan’s departure times and capacity, and estimate the fraction of passenger outcomes that miss a first eligible ride across repeated simulated peaks. The estimate informs a decision only to the extent that the arrival and boarding model is credible.

Check Your Understanding

Answer using the shuttle model and definitions in this tutorial.

  1. Under Plan A, 13 passengers have arrived by minute 4. How many miss their first eligible bus? What if 17 have arrived?
  2. A passenger arrives at minute 7 under Plan B. Is the passenger counted as left behind at minute 6? Explain.
  3. In 5,000 simulated peak periods, 1,200 passengers miss their first eligible bus. How many passenger outcomes are there, and what is the estimated probability?
  4. Why does the simulation divide by the total number of passenger outcomes rather than by the number of replications when estimating a passenger-level probability?
  5. Name one plausible real-world arrival pattern that could make the model’s estimated probability unreliable.