Texas Instruments TI-89 Tip List page 227

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

sgn(x) = when(x≠0,sign(x),1)
The function shown below, cndif(), implements the algorithm just described to find the inverse of the
cumulative distribution function.
cndif(p,m,s)
func
©(probability,mean,std dev) inverse CND
©Inverse cumulative normal distribution
©Returns x with probability that X≤x
©Fast version.
©29oct00/dburkett@infinet.com
local r,t
p→r
if p>.5:1-r→r
√(⁻2*ln(r))→t
when(p≠.5,sign(p-.5),1)*s*(t+(polyeval({⁻.453642210148⁻4,⁻.204231210245⁻1,⁻.34
2242088547,⁻1,⁻.322232431088},t)/polyeval({.38560700634⁻2,.10353775285,.5311034
62366,.588581570495,.99348462606⁻1},t)))+m
Endfunc
For example, find x with a probability of 0.25, for a distribution with mean = 20 and standard deviation =
0.15:
cndif(.25,20,.15)
We can check this answer with cnd():
cnd(19.898826537593,20,.15)
cndif() is fast, since it simply uses two polyeval() functions to calculate the estimating rational
polynomial. The reference for Odeh and Evans' estimating function claims about 7 significant digits of
accuracy. If you need more accuracy than this, you can use this function, cndi():
cndi(p,m,s)
func
©(probability,mean,std dev) inverse CND
©Inverse cumulative normal distribution
©Returns x with p=probability that X≤x
©Accurate, slow version.
©29oct00/dburkett@infinet.com
local r,t
p→r
if p>.5:1-r→r
√(⁻2*ln(r))→t
when(p<.999999713348,nsolve(cnd(x,m,s)=p,x=when(p≠.5,sign(p-.5),1)*s*(t+(polyeva
l({⁻.453642210148⁻4,⁻.204231210245⁻1,⁻.342242088547,⁻1,⁻.322232431088},t)/poly
eval({.38560700634⁻2,.10353775285,.531103462366,.588581570495,.99348462606⁻1},
t)))+m),when(p≠.5,sign(p-.5),1)*s*(t+(polyeval({⁻.453642210148⁻4,⁻.204231210245
returns x = 19.898826537593
returns p = 0.25000000025933
6 - 69

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92+

Table of Contents