Lesson 5 of 15

Normal Distribution & Z-scores

Normal Distribution & Z-scores

The normal distribution (Gaussian) is the cornerstone of statistical finance. Many return distributions are approximately normal, and it underpins tools like Value-at-Risk and option pricing.

Z-score standardizes a value relative to a distribution: z=xμσz = \frac{x - \mu}{\sigma}

A z-score tells you how many standard deviations xx is from the mean. Z-scores above 2 or below -2 are considered unusual (occurring ~5% of the time under normality).

Probability Density Function (PDF): f(x)=1σ2πexp(12(xμσ)2)f(x) = \frac{1}{\sigma \sqrt{2\pi}} \exp\left(-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2\right)

The PDF gives the relative likelihood of observing a value xx. It is not a probability itself (it can exceed 1 for narrow distributions), but its integral over an interval gives a probability.

Your Task

Implement:

  • z_score(x, mu, sigma) — standardized score
  • normal_pdf(x, mu, sigma) — Gaussian probability density
Python runtime loading...
Loading...
Click "Run" to execute your code.