Expectation, Variance, and Linearity in Practice
A ride-hailing app charges a base fare plus a per-minute rate. Trip duration T (minutes) has mean 18 and standard deviation 6. The fare is F = 2.50 + 0.40\,T dollars.
- Compute E[F] and \mathrm{SD}(F).
- A driver completes 40 trips in a day. Assuming trips are independent, what are the mean and standard deviation of the driver's daily fare total? Which of these two answers still holds if trips are not independent, and why?
- A promotion gives each of 1,000 riders an independent 3% chance of a free ride. Using indicator variables, compute the expected number of free rides and its variance. Then explain why the expected count would be unchanged even if the 3% chances were strongly correlated across riders (e.g. all triggered by the same weather event), but the variance would not.
1. Fare as a linear transform
E[F] = 2.50 + 0.40 \times E[T] = 2.50 + 0.40 \times 18 = 9.70 dollars.
\mathrm{Var}(F) = 0.40^2 \times \mathrm{Var}(T) = 0.16 \times 36 = 5.76, so \mathrm{SD}(F) = 2.40 dollars. The additive constant shifts the mean but does not affect spread; the multiplicative constant scales the SD linearly (and the variance quadratically).
2. Forty trips
Daily total S = F_1 + \dots + F_{40}.
E[S] = 40 \times 9.70 = 388 dollars — by linearity of expectation.
If trips are independent, variances add: \mathrm{Var}(S) = 40 \times 5.76 = 230.4, so \mathrm{SD}(S) = \sqrt{230.4} \approx 15.2 dollars.
The mean still holds without independence: linearity of expectation requires no assumption whatsoever about dependence. The SD does not: \mathrm{Var}(S) = \sum \mathrm{Var}(F_i) + 2\sum_{i<j}\mathrm{Cov}(F_i, F_j). If long trips cluster (rush hour, rain), covariances are positive and the daily total is more variable than 15.2 — the independent case is a lower bound when correlations are positive.
3. Indicators
Let I_k = 1 if rider k gets a free ride. E[I_k] = P(I_k = 1) = 0.03 and \mathrm{Var}(I_k) = 0.03 \times 0.97 = 0.0291.
E[\text{count}] = \sum_{k=1}^{1000} E[I_k] = 1000 \times 0.03 = 30.
With independence, \mathrm{Var}(\text{count}) = 1000 \times 0.0291 = 29.1, SD ≈ 5.4 (this is just Binomial(1000, 0.03)).
Linearity of expectation does not care whether the I_k are dependent, so the expected count is 30 regardless of correlation. But if all 1,000 chances are driven by one weather event — either everyone gets the free ride or nobody does — the count is 1,000 with probability 0.03 and 0 otherwise: still mean 30, but variance 0.03 \times 0.97 \times 1000^2 = 29{,}100, SD ≈ 171. Same expectation, thirty times the standard deviation. Budgeting on the expectation alone would be reckless when outcomes are correlated.
Share this question