Walkthrough 1 · 0:58
Estimators
Compare the method of moments with maximum likelihood for a uniform endpoint by simulation, then see the paired midrange-against-mean comparison.
Steps and transcript
- 10:00Unif(0, θ) with θ = 3: method of moments 2X̄ against maximum likelihood max(Xᵢ), 2,000 samples of n = 10, seed 20005.
- 20:05The MoM is unbiased but wide; the MLE is tight but always below θ. Each MSE carries its Monte Carlo standard error.
- 30:09Drag n to 1, as in part (a): the MLE is X itself, biased down by half, and in theory the two MSEs tie at 3.
- 40:19Drag n to 40: the MLE's MSE falls like 1/n², the MoM's only like 1/n, so the gap grows about seven-fold.
- 50:29Rescaling the MLE by (n + 2)/(n + 1) removes the bias and about halves its MSE. The table sets simulation beside theory.
- 60:38A new seed redraws all 2,000 samples; the ranking holds. Reset returns to seed 20005.
- 70:50Midrange or mean (A1 Q4): seed 2529 replays the 2020 R draws, and a paired bootstrap puts the variance ratio at 2.29 (1.76 to 3.05).