σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
σμimplied vol · KKmax(S−K,0)udβρᵢⱼfat tailsPnL · drawdownyield · TdSₜ = μSₜ dt + σSₜ dWₜC = S·N(d₁) − K·e⁻ʳᵀ·N(d₂)σₚ² = wᵀΣwd₁ = [ln(S/K) + (r + σ²⁄2)T] ⁄ σ√T∂V/∂t + ½σ²S²·∂²V/∂S² + rS·∂V/∂S − rV = 0Sharpe = (Rₚ − R_f) ⁄ σₚVaR₉₉ = μ − 2.33σρ = Cov(X,Y) ⁄ σₓσᵧE[Rₚ] = Σ wᵢ·E[Rᵢ]φ(x) = e^(−x²/2) ⁄ √2πE[Rᵢ] = R_f + βᵢ(E[Rₘ] − R_f)dXₜ = θ(μ − Xₜ)dt + σ dWₜσ²ₜ = ω + α·ε²ₜ₋₁ + β·σ²ₜ₋₁C − P = S − K·e⁻ʳᵀΔ = ∂V/∂S Γ = ∂²V/∂S²p = (e^(rΔt) − d) ⁄ (u − d)rₜ = ln(Pₜ ⁄ Pₜ₋₁)E[Xₜ₊₁ | ℱₜ] = Xₜf* = (bp − q) ⁄ bz = (x − μ) ⁄ σP(N=k) = λᵏe^(−λ) ⁄ k!Θ = −∂V/∂Tν = S·φ(d₁)·√Tmin wᵀΣw s.t. wᵀμ = μ*∫Σ∂∞λ
uantCraft AcademyRoadmapsSkills
Ctrl K
AO
+1.2k Learners
LoginJoin ↗
RoadmapsSkills
AO
+1.2k Learners
Login
  • English
  • Français
  • Español
  • العربية
  • Português
  • Deutsch
  • 日本語
  • 中文
Statistics skill›Module 1 · Describing and estimating›Topic 1.1·~40 minBeginner

Descriptive statistics and robust estimators

Skill positionModule 1 of 4 · Topic 1 of 3
1.1 Descriptive statistics and robust estimators
—Lab score— / 100Total XP—Streak—

Summarising a messy sample

Descriptive statistics compress a sample into a few numbers: where it sits (location), how spread out it is (scale) and what shape it has. The usual summaries are the mean xˉ=1n∑xi\bar x=\frac1n\sum x_ixˉ=n1​∑xi​ and the sample standard deviation s=1n−1∑(xi−xˉ)2s=\sqrt{\frac{1}{n-1}\sum(x_i-\bar x)^2}s=n−11​∑(xi​−xˉ)2​, with n−1n-1n−1 in the denominator because the mean has already been estimated from the same data. They are optimal for clean, bell-shaped data and fragile otherwise.

MAD⁡=median⁡i ∣xi−median⁡(x)∣\operatorname{MAD}=\operatorname{median}_i\,|x_i-\operatorname{median}(x)|MAD=mediani​∣xi​−median(x)∣(1)

Real return data has outliers: a crash day, a bad tick, a merger. A single extreme value drags the mean and inflates the standard deviation without limit, which is why they have a breakdown point of zero. Robust alternatives resist that: the median for location, the median absolute deviation (MAD) for scale, and the trimmed mean, which drops a fraction of the smallest and largest values before averaging. Winsorising is similar but clips the extremes instead of discarding them.

One bad dayTake the sample 2, 3, 3, 4, 1002,\,3,\,3,\,4,\,1002,3,3,4,100. The mean is 22.422.422.4, nowhere near any observation, because of the 100. The median is 333. Dropping the smallest and largest value gives a trimmed mean of (3+3+4)/3=3.33(3+3+4)/3=3.33(3+3+4)/3=3.33. The absolute deviations from the median are 1,0,0,1,971,0,0,1,971,0,0,1,97, so the MAD is 111. Compare the sample standard deviation of about 43.4: one value turned a typical spread of 1 into a number 40 times larger.
  • Location: mean (fragile), median and trimmed mean (robust).
  • Scale: standard deviation (fragile), MAD and interquartile range (robust).
  • Robust is not free: for clean normal data the mean is more precise than the median, so choose by the data you expect.
Do not delete outliers, decide about themA crash day is real data, and a risk model that trims it away reports a calm world. A bad tick is an error and should be fixed at the source. Look at each outlier, label it as error or event, and then choose a method on purpose: robust statistics describe the typical day, while the mean and standard deviation remain the right tools when the extremes are exactly what you care about, as in risk.

Lab · what's graded

  • The mean10 pts
  • The median10 pts
  • A trimmed mean15 pts
  • The median absolute deviation15 pts
  • Which estimators are robust15 pts
  • A sample standard deviation15 pts
  • One extreme day20 pts
0/ 7 answered
Tasks
1Numeric answer10 ptsNot answered

The sample is 2, 3, 3, 4, 100. Compute the mean.

mean=mean =mean=accepted: ± 0.001
2Numeric answer10 ptsNot answered

The sample is 2, 3, 3, 4, 100. Compute the median.

median=median =median=accepted: ± 0.001
3Numeric answer15 ptsNot answered

The sample is 2, 3, 3, 4, 100. Drop the smallest and the largest value and average the rest. Give it to three decimals.

trimmedmean=trimmed mean =trimmedmean=accepted: ± 0.005
4Numeric answer15 ptsNot answered

The sample is 2, 3, 3, 4, 100. Compute the MAD: the median of the absolute deviations from the median.

MAD=MAD =MAD=accepted: ± 0.001
5Choice15 ptsNot answered

Select the estimators that are robust to a single extreme outlier.

6Numeric answer15 ptsNot answered

For the sample 2, 4, 4, 4, 5, 5, 7, 9 (mean 5), compute the sample standard deviation (divide by n - 1). Give it to three decimals.

s=s =s=accepted: ± 0.005
7Explain in words20 ptsNot answered

In two sentences, say why the median and MAD describe a typical day better than the mean and standard deviation when one day is a crash.

Math modeKeyboard or LaTeX inputTask 1 of 7 · Ctrl ⏎ to check

Log in to run your code.

Every lecture is free to read. Create an account or log in to run code, run tests and submit this lab.

  • In-browser IDE with a bash terminal — nothing to install
  • Instant grading, XP and your place on the skill
Create an accountLog in
OR
Continue with GitHub