[4]
p
(
x
)
=
erf
x
2
+1
2
This can be combined with [2] to yield a simple function to find the general CND, like this:
cnd(x,m,s)
func
©(x,m,s) find cum norm dist at x, mean m, std dev s
©Find cumulative distribution at x, with mean m and standard deviation s
©dburkett@infinet.com 8jun00
(erf(((x-m)/s)/1.4142135623731)+1 )/2
Endfunc
This function calls erf(), described in tip [6.34], which must be in the same folder as cnd(). That folder
must be the current folder.
As an example, find the standard cumulative normal distribution for x = 1:
cnd(1,0,1) returns 0.841345
To find the cumulative normal distribution for at x = 12, for a distribution with a mean of 10 and a
standard deviation of 2.5, use
cnd(12,10,2.5) which returns 0.788145
For some problems you need the 'upper tail' distribution, which is the area to the right of the sample, or
the probability that the random variable is greater than some x. This can be found with cnd(), as
expected: just use 1 - cnd(). For example, to find the upper tail normal distribution for x = 2, mean = 0
and standard deviation = 1, use
1-cnd(2,0,1) which returns 0.0227501319482
For some other problems, you might need to find the probability that the random variable is between
two limits x1 and x2, where x2 > x1. In this case, use
cnd(x2,m,s) - cnd(x1,m,s)
where m is the mean and s is the standard deviation. For example, to find the probability that the
random variable is between 1.6 and 2.2, for a distribution with mean = 2 and standard deviation = 0.5,
use
cnd(2.2,2,.5) - cnd(1.6,2,.5) which returns 0.443566
For real problems, the mean and standard deviation will probably have more digits, and you can save a
little typing by entering this example like this, instead:
cnd(2.2,m,s)-cnd(1.6,m,s)|m=2 and s=.5
The CND function is available in the free TI Statistics and List Editor (SLE) flash application. However,
if you don't need all the additional functions that the SLE includes, you may prefer to use these two
simple functions, instead of filling up your flash memory with the 300K SLE. In addition, the function
6 - 67