Equation for calculating percentile of data point on normal curve

258 Views Asked by At

I'm taking pre-calculus right now, and I'm trying to make a statistics program, so I want to calculate the percentile of a score on a normal curve without using a "standard normal table." I can calculate the z-score easily and correctly, but the equation printed in my textbook doesn't seem to work.

y = e^(-x²/2)/√(2π)

(x is the z-score)

Is this the right equation for calculating the percentile of a score on a normal curve? For a z-score of 2.1, I find the solution to be:

y=e^(-2.1²/2)/√(2π)

=e^(-2.205)/√(2π)

=e^(-2.205)/2.507

=0.11/2.507

=4.398E-2

On the standard normal table, the answer is clearly 0.9821. What am I doing wrong?

1

There are 1 best solutions below

3
On BEST ANSWER

What you have is the probability density function (pdf) $f(x)=e^{-x^2/2}/\sqrt{2 \pi}$ of the standard normal distribution. What you appear to want is the cumulative distribution function (cdf) $F(x)$ which gives the probability of observing a value less than $x$ from the standard normal distribution. This is the integral of the density from $-\infty$ to $x$: $$ F(x)=\int_{-\infty}^x f(t)\;dt $$ Which unfortunately does not have a simple expression in terms of the elementary functions you will be familiar with (and does at least hint at the need for some familiarity with calculus). There are however approximations, some of which are on the Wikipedia page for the normal distribution. The simplest of these is the first: $$ F(x)\approx \frac{1}{2}\left[1+{\rm{sgn}}(x) \left(1-e^{-2x^2/\pi} \right) \right] $$where $\rm{sgn}(x)$ denotes the sign of $x$. This has a maximum absolute error of $0.003$