Thursday, October 25, 2007

Mathematica - Continuous Distributions

# Call package
<< Statistics`ContinuousDistributions`

# Distrubutions
NormalDistribution[μ, σ]
ChiSquareDistribution[n]
StudentTDistribution[n]
FRatioDistribution[n1, n2]
UniformDistribution[min, max]
ExponentialDistribution[lambda]
GammaDistribution[alpha, lambda]
BetaDistribution[alpha, beta]
WeibullDistribution[alpha, beta]
LogisticDistribution[mu, beta]
LogNormalDistribution[mu, sigma]
CauchyDistribution[a, b]
ChiDistribution[n]
ExtremeValueDistribution[alpha, beta]
HalfNormalDistribution[theta]
LaplaceDistribution[mu, beta]
ParetoDistribution[k, alpha]
RayleighDistribution[sigma]
NoncentralChiSquareDistribution[n, lambda]
NoncentralStudentTDistribution[n, lambda]
NoncentralFRatioDistribution[n1,n2, lambda]

# Functions
PDF[dist, x]
CDF[dist, x]
Quantile[dist, q]
Domain[dist]
Mean[dist]
Variance[dist]
StandardDeviation[dist]
Skewness[dist]
Kurtosis[dist]
KurtosisExcess[dist]
CharacteristicFunction[dist, t]
ExpectedValue[f, dist]
ExpectedValue[f, dist, x]
Random[dist]
RandomArray[dist, dims]

# example
RandomArray[NormalDistribution[3, 1], 10]
Quantile[NormalDistribution[0, 1], 0.975]
CDF[NormalDistribution[0, 1], 1.28155]

No comments: