Lesson 2 of 15
Mean, Variance, Skewness, Kurtosis
Statistical Moments
The moments of a distribution describe its shape. The first four moments are the foundation of quantitative analysis:
Mean — the average (first moment):
Variance — spread around the mean (second moment, sample):
Skewness — asymmetry (third standardized moment):
where is the population standard deviation.
Excess Kurtosis — tail heaviness (fourth standardized moment minus 3):
A normal distribution has skewness = 0 and excess kurtosis = 0.
Your Task
Implement all four moment functions. Use sample variance (divide by n-1) but population std (divide by n) for skewness and kurtosis normalization.
Python runtime loading...
Loading...
Click "Run" to execute your code.