Darwin Help

Back to Index

CumulativeStd

Function CumulativeStd - cumulative probability in standard deviations

Calling Sequence  CumulativeStd(distr,x)
Parameters
NameTypeDescription

distr anythingdescription of a probability distribution
x numerica number
Return Type  numeric
Synopsis This function computes the probability that a random distributed variable with distribution "distr" has a value less or equal to x. This is normally called the cumulative probability distribution. The result is returned in standard deviations of an equivalent Normal(0,1) distribution. This is useful when the result is exponentially close to 1 (or to 0) and returning the probability would cause large truncation errors. The format describing the distribution is the same as the one used by Rand. If x is continuously distributed, with density f(x), then the cumulative is:

                      x
                     /
                    |
Cumulative(f, x) =  |          f(t) dt
                    |
                   /
                     -infinity

The system knows how to compute the Cumulative distributions of: {Binomial,ChiSquare,LogIndepEvents,Normal,U}.


If the distribution is a discrete distribution, say over the integer, then the cumulative is defined as:


                              /    x - 1         \
                              |    -----         |
                              |     \            |
Cumulative(f, x) = 1/2 f(x) + |      )       f(t)|
                              |     /            |
                              |    -----         |
                              \t = -infinity     /
Examples
> CumulativeStd( Binomial(10,0.5), 6 );
0.5995
> CumulativeStd( U(0,10), 9.75 );
1.9600
See also Cumulative,   OutsideBounds,   ProbBallsBoxes,   ProbCloseMatches,   Rand,   StatTest,   Std_Score