Shared vs. split queues, height mixtures, and shrinkage bias
Statistics & ExperimentsModel answerLast updated
Compare a single bank queue with separate lines, reason about height and social-degree distributions, and check whether lasso and ridge estimators are unbiased.
This is a multi-part statistics screen. Answer each part with a clear position, the reasoning behind it, and a few numbers where they help.
1. Queueing design. A bank has 5 tellers and can be set up in one of two ways:
- Setup A: all 5 tellers draw from a single shared line.
- Setup B: each teller has a dedicated line.
Assume customers arrive at random, the tellers are similar but not identical in speed, each line is served first-come-first-served, and a few customers take much longer than the rest. As a customer, which setup would you join? Compare the two on expected waiting time, variance of waiting time, and fairness. For a numerical check, assume total arrivals are Poisson with rate 4 per minute, and each teller serves at rate 1 per minute with exponential service times.
2. Adult heights. Describe the distribution of adult heights for US men and, separately, for US women. Give rough shape and parameters.
3. Pooled heights. If you combine men and women and ignore sex, what does the combined distribution look like? Is it bimodal?
4. Social network degree. On a platform like LinkedIn, describe the distribution of the number of connections per user. Is it symmetric, left-skewed, or right-skewed? Justify it.
5. Summary statistics. For that connections distribution, how do the mean, median, and mode compare? If someone asks you to estimate the mean, what factors would drive it?
6. Shrinkage bias. Are the lasso (L1) and ridge (L2) estimators unbiased? Explain.
Hints
Hint 1
For part 1, compare the two setups as queueing models: one pooled M/M/5 system versus five independent M/M/1 systems at the same total load. Work out the wait for each, then reason about why pooling helps.
Hint 2
For part 3, check the condition under which a 50/50 mixture of two equal-variance normals has two peaks. The answer depends on the gap between means measured in standard deviations.
Hint 3
For part 6, work in the orthonormal design case, where X'X = I. Both estimators then have a closed form, and you can compare each to the true coefficient to see the bias.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Overview
The six parts test whether you can reason about distributions qualitatively, back the reasoning with a few calculations, and avoid common traps: wrongly calling a mixture bimodal, assuming the mean and median match in skewed data, and assuming regularized estimators are unbiased.
1. Shared line vs. separate lines
Answer: join the single shared line. It wins on all three criteria.
Expected waiting time. A shared line keeps every teller busy whenever anyone is waiting. With separate lines, one teller can sit idle while another line is backed up, so capacity is wasted.
Model it with arrival rate λ = 4/min and service rate μ = 1/min per teller. Utilization is ρ = 0.8.
- Separate lines (5 × M/M/1). Each line gets λ = 0.8. The expected wait is W_q = ρ / (μ(1−ρ)) = 0.8 / 0.2 = 4.0 min.
- Shared line (M/M/5). Let a = λ/μ = 4. First compute the sum of aᵏ/k! for k = 0 to 4, which is 1 + 4 + 8 + 10.67 + 10.67 = 34.33. Next, the tail term is (a⁵/5!) / (1−ρ) = 8.53 / 0.2 = 42.67. The probability of waiting (Erlang C) is 42.67 / (34.33 + 42.67) ≈ 0.554. The expected wait is then W_q = 0.554 / (5μ − λ) = 0.554 / 1 ≈ 0.55 min.
So the shared line cuts the average wait by roughly a factor of 7 with the same staff and demand. This is the pooling effect, and it gets stronger as utilization approaches 1.
Variance of waiting time. In the separate-line setup, a single long transaction can trap everyone queued behind it, so your wait depends heavily on which line you happen to pick. In the shared setup, a long transaction blocks only one of five servers, and the rest of the line keeps moving. Waits are less variable and the tail is thinner.
Fairness. The shared line gives global first-come-first-served: no later arrival is served before you. With separate lines, a later arrival can end up at a faster window and be served sooner, and with tellers of different speeds, some lines systematically produce longer waits.
Caveats worth stating:
- Customers who switch lines or pick the shortest one reduce the gap but do not close it, since service times are unknown in advance.
- The single line looks longer, which can make the wait feel worse even when it is shorter.
- Handoff or walking time to the next free teller adds a little overhead.
- Separate lines can be better if tellers specialize (for example, an express lane) or if a customer benefits from staying with one teller.
2. Adult heights
Each sex's height distribution is approximately normal: unimodal, symmetric, with light tails. Height is the sum of many small genetic and environmental effects, so the central limit theorem explains the shape.
- Men: mean about 69 in (175 cm), SD about 3 in (7.5 cm).
- Women: mean about 63.5–64 in (162 cm), SD about 2.8–3 in (7 cm).
The exact figures matter less than three features: bell-shaped curves, a mean gap of roughly 5–5.5 in, and similar spreads.
3. Pooled heights
The pooled distribution is a 50/50 mixture of two normals. The common answer, "it is bimodal," is wrong here.
For a 50/50 mixture of two normals with equal SD σ, the density has two peaks only when the gap d between means exceeds 2σ. Here d ≈ 5.5 in and 2σ ≈ 6 in, so d/σ ≈ 1.8, which is below the threshold. The pooled curve is unimodal, with:
- Mean ≈ 66.5 in.
- SD = √(σ² + (d/2)²) = √(9 + 7.6) ≈ 4.1 in, which is wider than either group.
- Shape: a flatter, broader top than a single normal with the same SD, and still roughly symmetric.
The general lesson: mixing groups always increases variance, and visible bimodality needs the group means to be separated by more than about two standard deviations.
4. Connections per user
The distribution is strongly right-skewed with a heavy tail, often modeled as log-normal or power-law-like in the upper tail.
- Floor at zero. A large share of users have very few connections, because accounts are new or dormant.
- Long right tail. Recruiters, salespeople, and open networkers have thousands of connections. Preferential attachment, where new links favor already well-connected people, produces this kind of tail in most social graphs.
- Platform artifacts. Connection limits truncate the extreme tail, and profile displays that show a capped figure (such as "500+") right-censor any scraped data.
On a log scale the histogram looks much more symmetric, which is a useful thing to point out.
5. Mean, median, and mode
For a right-skewed distribution: mode < median < mean.
- The mode sits at the low end, where the inactive and new accounts cluster.
- The median is moderate and robust to the tail.
- The mean is pulled upward by a small set of very high-degree users. One account with tens of thousands of connections can shift the mean as much as hundreds of typical users.
For describing a "typical" user, use the median, or the geometric mean (the mean of log degree).
What drives the mean. Avoid quoting a memorized number. Explain the drivers instead:
- Population definition. Counting all registered accounts, many of them dormant, pushes the mean down. Restricting to active users pushes it up.
- Graph identity. The mean degree equals 2|E|/|N|, where |E| is the number of edges and |N| is the number of nodes. This gives a direct way to estimate it.
- Account age. Older accounts have had more time to accumulate connections.
- Market and industry mix. Adoption varies a lot by region and profession.
- Product features. Contact import and friend suggestions change how fast connections grow, and caps change the tail.
- Measurement. Using capped display values instead of true counts biases the mean downward.
A reasonable answer: "For active users, the mean is probably in the low hundreds and well above the median. The all-accounts mean is lower because of dormant users. I would estimate it from the edge count and the user count, and check the result against a sample."
6. Are lasso and ridge unbiased?
No. For any λ > 0, both estimators are biased. That is intentional: they accept some bias to reduce variance and therefore reduce total mean squared error.
Ridge. The estimator is β̂_R = (XᵀX + λI)⁻¹Xᵀy. With y = Xβ + ε, its expectation is (XᵀX + λI)⁻¹XᵀX β, which equals β only when λ = 0 or β = 0. In the orthonormal case (XᵀX = I), β̂_R = β̂_OLS / (1 + λ). Every coefficient is scaled by the same factor, so the bias is −λβ/(1+λ).
Lasso. The objective is ½‖y − Xβ‖² + λ‖β‖₁. In the orthonormal case, the solution is soft-thresholding: β̂_L = sign(β̂_OLS) · max(|β̂_OLS| − λ, 0).
- Large coefficients are pulled toward zero by a fixed amount λ, so the bias does not disappear even for strong signals.
- Small coefficients are set exactly to zero, which is biased whenever the true coefficient is nonzero.
Why use them anyway. Mean squared error equals bias² plus variance. When predictors are collinear or the number of predictors is close to the sample size, shrinkage cuts variance sharply, and the total error can fall well below that of OLS. Lasso also gives sparse, interpretable models. The accurate statement is that these estimators trade bias for variance, not that they are unbiased.