Comparing Queue Waiting Times and Analyzing Non-Normal Distributions
Statistics & ExperimentsModel answerLast updated
Evaluate queueing behavior under exponential service rates and analyze summary metrics for bimodal and right-skewed operational distributions.
This question has two independent parts covering stochastic systems and operational statistical analysis.
Part 1: Service Queue Optimization
You arrive at a service center with two separate queue systems:
- Queue A feeds into a single service counter ($c = 1$).
- Queue B feeds into two parallel service counters ($c = 2$).
All service counters process individuals independently with service durations following an exponential distribution with a mean of 10 minutes ($\lambda = 0.1$ completions per minute per counter).
Currently, all available counters are occupied. You observe 3 people total in Queue A's system (1 being served, 2 waiting in line) and 6 people total in Queue B's system (2 being served, 4 waiting in line).
Which queue should you enter to minimize your expected waiting time before your own service begins? Provide the exact expected wait times for both options and explain the theoretical principle driving the difference.
Part 2: Distribution Mechanics and Metric Selection
An analyst is reviewing operational metrics for a physical retail branch:
-
Visit Duration (Bimodal Distribution): Customer stay lengths follow a distinct two-peaked (bimodal) distribution (e.g., fast drop-ins vs. extended shoppers).
- Describe how the mean, median, and mode typically relate in a multi-modal distribution.
- Is the overall arithmetic mean an appropriate summary statistic to represent a "typical" customer's visit time? Why or why not?
-
Checkout Duration (Right-Skewed Distribution): Checkout processing time follows a strongly right-skewed unimodal distribution.
- If leadership wants a performance metric reflecting the experience of an "average" customer that remains resilient against a few extreme outliers (e.g., massive bulk purchases), should they track the mean or the median? Explain why using statistical properties.
- Are there specific operational tasks where relying only on your chosen metric would be insufficient or misleading?
Hints
Hint 1
Recall the memoryless property of the exponential distribution: the remaining time for a customer currently in service follows the exact same distribution as a fresh service.
Hint 2
In a multi-server queue with c active servers, the aggregate service completion rate is c × λ while all servers remain busy.
Hint 3
Consider how extreme right-tail observations impact rank-based metrics versus moment-based metrics.
Model answer
Easy Try it yourself first — then compare your approach, complexity and edge cases.
Part 1: Service Queue Optimization
Key Theoretical Principle: Memorylessness & Rate Aggregation
Because service durations follow an exponential distribution, they possess the memoryless property: $$\mathbb{P}(X > s + t \mid X > s) = \mathbb{P}(X > t)$$
The remaining service time for any customer currently at a counter follows the exact same Exponential($\lambda = 0.1$) distribution, regardless of how long that customer has already been served.
To start your own service, you do not need every person ahead of you to finish completely—you only need enough service completions to open up one counter for yourself.
-
Queue A ($c = 1, n = 3$ total ahead):
- You need 3 service completions.
- The completion rate is $\mu_A = 1 \times 0.1 = 0.1$ completions/min.
- Time per completion = $\frac{1}{0.1} = 10$ minutes.
- Expected Wait = $3 \times 10 = \mathbf{30\text{ minutes}}$.
-
Queue B ($c = 2, n = 6$ total ahead):
- You need $n - c + 1 = 6 - 2 + 1 = 5$ service completions before a counter becomes free for you.
- While both counters are active, the combined service rate is the minimum of two independent exponentials: $\mu_B = 2 \times 0.1 = 0.2$ completions/min.
- Time per completion = $\frac{1}{0.2} = 5$ minutes.
- Expected Wait = $5 \times 5 = \mathbf{25\text{ minutes}}$.
Decision: You should join Queue B. It provides an expected savings of 5 minutes (a 25-minute wait versus 30 minutes in Queue A).
Variance Comparison
The total wait time $W$ for $k$ completions in a Poisson system follows an Erlang (Gamma) distribution.
$$\operatorname{Var}(W_A) = 3 \times \left(\frac{1}{0.1}\right)^2 = 300\text{ min}^2 \quad (\text{SD} \approx 17.32\text{ min})$$ $$\operatorname{Var}(W_B) = 5 \times \left(\frac{1}{0.2}\right)^2 = 125\text{ min}^2 \quad (\text{SD} \approx 11.18\text{ min})$$
Queue B is not only faster on average, but its variance is over 50% lower, making it significantly more predictable. This demonstrates the efficiency benefit of pooling parallel servers.
Part 2: Distribution Mechanics and Metric Selection
2.1 Bimodal Visit Duration
Mathematical Relationship Between Metrics
In a bimodal distribution:
- Modes: Located at the local maxima (the peaks) of the probability density function.
- Mean & Median: Fall in the trough between the two peaks (or closer to the larger peak depending on sub-population weights and variances).
- There is no guaranteed inequality ordering (like $\text{mean} > \text{median} > \text{mode}$) because the relationship depends entirely on the relative weights, variances, and separation of the two component modes.
Representativeness of the Arithmetic Mean
The arithmetic mean is not representative of a "typical" customer in a bimodal distribution.
If $60%$ of customers are quick drop-ins averaging 5 minutes and $40%$ are extended shoppers averaging 35 minutes: $$\text{Mean} = 0.6(5) + 0.4(35) = 17\text{ minutes}$$
Almost no actual customers stay for 17 minutes. Reporting a single central metric obscures the underlying operational reality.
Recommended Alternatives:
- Fit a two-component Gaussian/Lognormal Mixture Model (GMM) and report individual component statistics ($\mu_1, \sigma_1^2, w_1$) and ($\mu_2, \sigma_2^2, w_2$).
- Segment data based on behavioral features (e.g., basket size, entry time) and analyze sub-populations independently.
2.2 Right-Skewed Checkout Duration
Metric Selection: Mean vs. Median
To summarize the experience of a typical customer while remaining robust to extreme outliers, leadership should track the Median.
- Breakdown Point: The median has a breakdown point of $50%$, whereas the mean has a breakdown point of $0%$. A single transaction taking 3 hours will drastically pull the mean upward, while the median remains unchanged.
- Rank-based Property: Skewness pulls the mean toward the right tail ($\text{Mode} < \text{Median} < \text{Mean}$). The median represents the 50th percentile—exactly half of customers experience a faster checkout, giving a clear operational interpretation.
Frequency
^ Mode
| *
| * * Median
| * * | Mean
| * * | |
| * * | |
| * * * * * * * * * * (Right Tail Outliers)
+---------------------------------------------------------> Duration
Where the Median Fails Operationally
Relying solely on the median creates critical blind spots:
- Capacity Planning and Staffing: Total labor hours required equal $\text{Total Customers} \times \text{Mean Service Time}$. If management plans staffing based on the median, the store will be consistently understaffed because extreme transactions consume real worker hours.
- Tail Risk / Service Level Agreements (SLAs): Extreme checkout delays cause queue bottlenecks that spill over to impact subsequent customers. High percentiles ($P_{90}, P_{95}$) must be monitored alongside the median to catch systemic friction.
Technical Follow-Up & Deep Dive Questions
1. What if service times were deterministic (e.g., exactly 10 minutes)?
If service times are non-stochastic, memorylessness no longer applies. If we assume the elapsed time of active customers is unobserved and uniformly distributed over $[0, 10]$:
- Queue A: The active customer has an expected remaining time of 5 minutes. The wait is $5 + 10 + 10 = \mathbf{25\text{ minutes}}$.
- Queue B: The two active servers have remaining times $R_1, R_2 \sim \text{Uniform}(0, 10)$. The first completion occurs at $\mathbb{E}[\min(R_1, R_2)] = \frac{10}{3} \approx 3.33$ minutes. Subsequent completions occur every 5 minutes. The 5th completion occurs at $3.33 + (4 \times 5) = \mathbf{23.33\text{ minutes}}$.
2. How would you statistically test if two queues have different median wait times?
Because wait times are bounded below by 0 and right-skewed, standard two-sample t-tests assuming normality are inappropriate for small sample sizes.
- Non-parametric Test: Use the Mann-Whitney U test (Wilcoxon rank-sum test) to evaluate shift in location.
- Resampling: Perform a bootstrapped hypothesis test for the difference in medians.
- Key Caveat: Queue wait times display strong temporal autocorrelation (a long wait for customer $i$ causes a long wait for customer $i+1$). Standard tests assume independent and identically distributed (i.i.d.) observations. Samples must be decorrelated by time-averaging or adjusting effective sample size via block bootstrapping.