View Full Version : Equation for the Standard Normal Curve

dogginboggin

04-15-2010, 08:40 PM

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

04-15-2010, 11:17 PM

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

04-16-2010, 08:39 AM

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

Dragan

04-16-2010, 02:49 PM

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

04-16-2010, 03:50 PM

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

04-16-2010, 04:32 PM

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

SlideRule

04-16-2010, 04:52 PM

Thank you for posting the source document.

Powered by vBulletin™ Version 4.1.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.