Compare Mean and Median for a Distribution with a Point Mass
Hudson River TradingData Scientist · Technical ScreenLast updated
This question tests the theoretical and empirical comparison between the sample mean and sample median on a mixture distribution containing a discrete point mass and a Gaussian component.
Problem Statement
In quantitative finance, asset returns or microstructure features often exhibit an atom (point mass) at zero—such as zero price moves during illiquid periods—mixed with continuous returns.
Consider an independent and identically distributed (i.i.d.) random sample X_1, X_2, ..., X_n of size n = 80 drawn from a mixture distribution F defined as:
- With probability
p = 0.4,X = 0(point mass at 0). - With probability
1 - p = 0.6,Xfollows a normal distributionN(mu, sigma^2)withmu = 1andsigma^2 = 1.
You are evaluating two estimators of central tendency: the sample mean X_bar = (1/n) * sum(X_i) and the sample median M = Median(X_1, ..., X_n) (using the average of the 40th and 41st order statistics).
Tasks
-
Population Parameters:
- Compute the true population mean
E[X]and population varianceVar(X). - Determine the true population median
msuch thatP(X = 0.5andP(X >= m) >= 0.5.
- Compute the true population mean
-
Distribution of the Sample Median at n = 80:
- Let
Kbe the number of sample observations that fall strictly at 0. What is the distribution ofK? - Derive an exact expression for the probability that the sample median
Mis equal to 0,P(M = 0).
- Let
-
Mean Absolute Error (MAE) Comparison:
- For the sample mean
X_bar, derive its finite-sample variance and use the Central Limit Theorem to approximate its MAE:E[|X_bar - E[X]|]. - Explain analytically why standard asymptotic normality for the sample median (where asymptotic variance is
1 / (4 * n * f(m)^2)) breaks down if the population median coincides with a point mass, and describe how this affects the MAE of the median.
- For the sample mean
-
Simulation Setup:
- Outline a simulation protocol to numerically estimate and compare the MAE of both estimators at
n = 80, noting how ties at 0 should be handled.
- Outline a simulation protocol to numerically estimate and compare the MAE of both estimators at
Hints
Hint 1
Use the law of total expectation and total variance to find E[X] and Var(X), and evaluate the mixture CDF at 0 to see if the median lies at the point mass or in the continuous support.
Hint 2
For n = 80, the sample median equals 0 if both the 40th and 41st order statistics equal 0, which happens when enough observations fall at or below 0.
Hint 3
For a normally distributed variable W with mean 0 and variance v, the expected absolute error is E[|W|] = sqrt(2 * v / pi).
Follow-up questions
- What happens to the asymptotic distribution of the sample median if p = 0.5 instead of p = 0.4, placing the population median directly at the boundary of the point mass?
- If the continuous component is changed from N(1, 1) to a heavy-tailed Student-t distribution with 2 degrees of freedom, at what sample size n does the median start outperforming the mean in MAE?
- How would you construct a consistent, computationally efficient estimator for the continuous component mean mu if p is unknown?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.