Equation for the Standard Normal Curve

dogginboggin

New Member
Does anybody know what the equation is for the standard normal curve? In my statistics class, we use a chart to find areas under the curve given specific z-scores. I know a little bit of calculus, and it seems like the numbers came from integrating some function. I was just wondering what the function was so I wouldn't have to rely on the chart to find probabilities.

Thanks!

SlideRule

New Member
See http://en.wikipedia.org/wiki/Normal_distribution

The standard normal curve is not an elementary integral. If you own a scientific calculator it may have a function or functions to meet your needs. However, if your statistics class is using a table or chart then it's probably best that you stick with that until your instructor introduces something else.

SlideRule

New Member
I forgot to add that there is a rational expression approximation to the cdf of the standard normal distribution.

/////////////////////////////////////////////////////////////////////
//
// Approximate Standard Normal Cummulative Distribution Formula.
//
// The absolute error of this approximation is less than
// 2.5E-4 for z greater than or equal to zero.
//
// Take from Probability, by Pitman, page 95. Originally from
// Handbook of Mathematical Functions by Abramowitz and Stegun.
//
// z = (x - mu)/sigma
//
////////////////////////////////////////////////////////////////////
//

#include <math.h>

double cdf(register double z)
{
if (z < 0) return 1-cdf(-1*z);

register double p1 = 1.0+(0.196854+(0.115194+(0.000344+0.019527*z)*z)*z)*z;

register double p2 = 1.0 / (2.0*p1*p1*p1*p1);

register double p3 = 1.0 - p2;

return p3;
} // end cdf

Last edited:

Dragan

Super Moderator
I forgot to add that there is a rational expression approximation to the cdf of the standard normal distribution.

/////////////////////////////////////////////////////////////////////
//
// Approximate Standard Normal Cummulative Distribution Formula.
//
// The absolute error of this approximation is less than
// 2.5E-4 for z greater than or equal to zero.
//
// Take from Probability, by Pitman, page 95. Originally from
// Handbook of Mathematical Functions by Abramowitz and Stegun.
//
// z = (x - mu)/sigma
//
////////////////////////////////////////////////////////////////////
//

#include <math.h>

double cdf(register double z)
{
if (z < 0) return 1-cdf(-1*z);

register double p1 = 1.0+(0.196854+(0.115194+(0.000344+0.019527*z)*z)*z)*z;

register double p2 = 1.0 / (2.0*p1*p1*p1*p1);

register double p3 = 1.0 - p2;

return p3;
} // end cdf

There's a much better approximation of the standard normal cdf than this. This Taylor-series based expansion:

$$\Phi \left ( z \right )=\frac{1}{2}+\phi \left ( z \right )\left \{ z+\frac{z^{3}}{3}+\frac{z^{5}}{3\cdot 5}+\frac{z^{7}}{3\cdot 5\cdot 7}+\frac{z^{9}}{3\cdot 5\cdot 7\cdot 9} +\cdots \right \}$$

when you carry it out until the last terms appears to vanish has absolute error that is less than 8E-16.

SlideRule

New Member
Dragan, can you please cite a source for that expansion?

How do you calculate the small-phi of z? That is the pdf that the OP asked for.

I also worry about computational issues when I see z<1 raised to such higher powers.

Dragan

Super Moderator
Dragan, can you please cite a source for that expansion?

How do you calculate the small-phi of z? That is the pdf that the OP asked for.

I also worry about computational issues when I see z<1 raised to such higher powers.

The small phi(z) is the height (ordinate) of the unit normal pdf at z.

Here's the link for the article (below). The equation of interest is at the top of page 5. I would note that I use this series expansion in my simulation work and it is excellent.

http://www.jstatsoft.org/v11/i05/paper