These functions give you access to many statistical distributions. Each distribution has three associated functions:
a probability density function (a.k.a. the pdf). The area under it is 1. The names are <something>Density or <something>Probability (for discrete distributions). Examples are normalDensity(x, mu, sigma), which is the familiar normal curve, and binomialProbability(x, n, p), which is the binomial probability of x successes in n tries of probability p.
a cumulative probability function (the cdf). This is the probability that a value from the distribution will be less than or equal to the "input" value--also, the area "to the left" under the density curve. Therefore it climbs from 0 to 1. (Calculus: It's the integral of the density function from negative infinity to the value in question.) Its name is <something>Cumulative, for example, TCumulative(x, df), which is the cumulative t distribution for df degrees of freedom. On some calculators, it's called T_CDF.
a quantile function (the inverse cdf). Here we know a probability and want to know the value of the statistic for which that value is the cumulative probability. So if we're asking, "what's the value of the chi-square statistic with 5 degrees of freedom at the upper quartile?" we would use chiSquareQuantile(0.75, 5).
These functions take many arguments. Some are required (such as the degrees of freedom parameters in Student's t and chi-square), but many have sensible defaults. When an argument has a default, you may leave it out (as long as all later arguments have default values as well). For example, if you want the normal density function, it has defaults for mu and sigma of 0 and 1 respectively. Therefore:
normalDensity(x) |
is the same as |
normalDensity(x, 0, 1) that is, mean = 0, standard deviation = 1. |
normalDensity(x, 2) |
is the same as |
normalDensity(x, 2, 1) that is, mean = 2, standard deviation = 1. |
The Distributions
|