Statistics Basics for Trading¶
Difficulty beginner
Descriptive Statistics¶
Central Tendency¶
| Measure | Formula | When to Use |
|---|---|---|
| Mean | x̄ = Σxᵢ/n | Normally distributed data |
| Median | Middle value of sorted data | Skewed distributions, outliers |
| Mode | Most frequent value | Categorical data |
Dispersion¶
| Measure | Formula | Interpretation |
|---|---|---|
| Range | max - min | Total spread |
| Variance | σ² = Σ(xᵢ - x̄)²/n | Average squared deviation |
| Standard Deviation | σ = √σ² | Average deviation from mean |
| MAD | Σ | xᵢ - x̄ |
| IQR | Q3 - Q1 | Middle 50% spread |
Skewness and Kurtosis¶
Skewness — Asymmetry of distribution
Skewness = E[(X - μ)³] / σ³
Positive skew: Long right tail (occasional large gains)
Negative skew: Long left tail (occasional large losses)
Zero skew: Symmetric
where:
μmean ·σstandard deviation · numerator = third central moment · division byσ³makes the measure scale-free. does: measures distributional asymmetry. Equity returns typically print negative skew — crashes are sharper than rallies — which Sharpe ratio ignores.
Kurtosis — Tail thickness
Kurtosis = E[(X - μ)⁴] / σ⁴
Excess Kurtosis = Kurtosis - 3 (excess over normal)
Positive excess: Fat tails (extreme events more likely)
Zero excess: Normal distribution
Negative excess: Thin tails
where:
μmean ·σstandard deviation · fourth central moment normalized byσ⁴· subtracting 3 centres the metric on the normal distribution. does: quantifies tail thickness relative to a normal. Real return series routinely show excess kurtosis of 5–20 — the reason VaR-from-normal massively understates tail risk.
Probability Distributions¶
Normal Distribution¶
f(x) = (1 / σ√(2π)) × e^(-(x-μ)²/(2σ²))
68% of data within ±1σ
95% of data within ±2σ
99.7% of data within ±3σ
where:
μmean ·σstandard deviation ·f(x)density at x ·eEuler's number · the prefactor1/(σ√(2π))is the normalizing constant making total area = 1. does: the gaussian bell curve. The default null model for returns despite known fat-tail violations — every parametric VaR, Black-Scholes, and z-test ultimately rests on this density.
Trading Application: Modeling returns (approximation), VaR calculations, options pricing.
Log-Normal Distribution¶
Asset prices (not returns) are typically log-normally distributed:
where:
Sprice level ·ln(S)log-price ·N(μ, σ²)normal distribution with given mean/variance ·LogNormaldistribution ofexpof a normal. does: the standard price-process assumption: log-prices are normal, so prices are positive and right-skewed. Underlies geometric Brownian motion and Black-Scholes.
Student's t-Distribution¶
Heavier tails than normal distribution
Degrees of freedom (ν) control tail thickness
As ν → ∞, converges to normal
where:
νdegrees of freedom (lower ν = fatter tails) · in finance ν is typically estimated in the 3–6 range for daily returns. does: a fat-tailed alternative to the normal. Used for return modelling, robust regression, and small-sample t-tests where the variance is unknown.
Trading Application: Better models for asset returns (fat tails observed in practice).
Fat Tails in Financial Data¶
Financial returns consistently exhibit: - Negative skewness (crashes > rallies) - Excess kurtosis (fat tails) - Volatility clustering (GARCH effects)
Sampling and Estimation¶
Sample vs. Population¶
| Sample | Population | |
|---|---|---|
| Mean | x̄ | μ |
| Variance | s² = Σ(xᵢ - x̄)²/(n-1) | σ² = Σ(xᵢ - μ)²/N |
| Std Dev | s | σ |
Note the Bessel correction: n-1 for sample variance.
Standard Error¶
SE = σ / √n
Measures precision of sample mean as estimate of population mean
Larger samples → smaller SE → more precise estimates
where:
SEstandard error of the sample mean ·σpopulation (or sample) standard deviation ·nsample size. does: standard deviation of the sampling distribution of the mean. Halving SE requires 4× the trades — the brutal arithmetic of statistical significance in finance.
Confidence Intervals¶
where:
x̄sample mean ·zstandard-normal quantile for chosen confidence level ·SEstandard error of the mean. does: range of plausible values for the true mean. Used to report performance with honest uncertainty bands instead of a point estimate.
Hypothesis Testing¶
Framework¶
- Null Hypothesis (H₀) — Default assumption (e.g., strategy has no edge)
- Alternative Hypothesis (H₁) — What you want to prove (e.g., strategy has positive edge)
- Significance Level (α) — Probability of Type I error (typically 0.05)
- Test Statistic — Calculated from data
- P-value — Probability of observing result if H₀ is true
- Decision — Reject H₀ if p-value < α
Common Tests in Trading¶
| Test | Purpose | Example |
|---|---|---|
| t-test | Compare means | Strategy returns vs. zero |
| F-test | Compare variances | Volatility before vs. after |
| Chi-square | Test independence | Signal vs. outcome |
| Mann-Whitney | Non-parametric comparison | Robust alternative to t-test |
Type I vs. Type II Errors¶
| H₀ True | H₀ False | |
|---|---|---|
| Reject H₀ | Type I Error (α) | Correct (Power) |
| Fail to Reject | Correct | Type II Error (β) |
In Trading Context: - Type I: Concluding strategy works when it doesn't (false positive) - Type II: Concluding strategy doesn't work when it does (false negative)
Covariance and Correlation¶
Covariance¶
Cov(X,Y) = Σ(xᵢ - x̄)(yᵢ - ȳ) / (n-1)
Positive: Variables move together
Negative: Variables move oppositely
Zero: No linear relationship
where:
xᵢ,yᵢpaired observations ·x̄,ȳsample means ·n-1Bessel-corrected denominator. does: scale-dependent measure of joint variation. Raw covariance is hard to interpret across assets — divide byσₓσᵧfor the unitless correlation.
Correlation¶
ρ(X,Y) = Cov(X,Y) / (σₓ × σᵧ)
Range: -1 to +1
+1: Perfect positive correlation
0: No linear correlation
-1: Perfect negative correlation
where:
Cov(X,Y)covariance ·σₓ,σᵧstandard deviations of X and Y ·ρPearson correlation coefficient. does: standardised joint-movement metric. The atomic building block of portfolio risk, pair trading, and diversification analysis — but only captures linear dependence.
Correlation ≠ Causation¶
Just because two assets are correlated does not mean one causes the other. Spurious correlations are common in finance.
Practical Applications¶
In Strategy Development¶
- Distribution Analysis — Check if returns are normal (they're not)
- Statistical Significance — Is your edge real or noise?
- Correlation Analysis — Portfolio diversification
- Rolling Statistics — Detect regime changes
- Hypothesis Testing — Validate strategy assumptions
Common Pitfalls¶
| Pitfall | Problem | Solution |
|---|---|---|
| Assuming normality | Returns have fat tails | Use robust statistics |
| Ignoring autocorrelation | Returns not independent | Use HAC standard errors |
| Small sample sizes | Unreliable estimates | Require sufficient data |
| Look-ahead bias | Using future information | Proper walk-forward testing |
| Multiple testing | Finding false patterns | Apply Bonferroni correction |
Key Formulas Reference¶
Mean: x̄ = Σxᵢ/n
Variance: σ² = Σ(xᵢ - x̄)²/(n-1)
Std Dev: σ = √σ²
Z-score: z = (x - μ) / σ
Correlation: ρ = Cov(X,Y) / (σₓ × σᵧ)
Standard Error: SE = σ / √n
95% CI: x̄ ± 1.96 × SE
Next Steps¶
- Probability Theory — Foundation for risk analysis
- Time Series Analysis — Modeling sequential data
- Formulas Reference — Comprehensive formula collection