Article 6T1K5 Normal probability approximation

Normal probability approximation

by
John
from John D. Cook on (#6T1K5)

The previous post presented an approximation

sinsinerf3.svg

for -1 x 1 and said that it was related to a probability function. This post will make the connect explicit.

LetX be a normally distributed random variable with mean and variance ^2. Then the CDF of X is

normal_cdf.svg

So if = 0 and ^2 = 1/2 then we have the following.

sinsinerf5.svg

Here's Python code to show how good the approximation is.

 from numpy import sin, linspace, sqrt, pi from scipy.stats import norm import matplotlib.pyplot as plt x = linspace(-1, 1, 200) X = norm(0, sqrt(0.5)) plt.plot(x, X.cdf(x) - X.cdf(0)) plt.plot(x, sin(sin(x))/sqrt(pi)) plt.legend(["exact", "approx"]) plt.xlabel("$x$") plt.ylabel(r"$P(X \leq x)$")

Here's the resulting plot:

sinsinerf6.png

The orange curve for the plot of the approximation completely covers the blue curve of the exact value. The two curves are the same to within the resolution of the plot. See the previous post for a detailed error analysis.

The post Normal probability approximation first appeared on John D. Cook.
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments