Statistics and Machine Learning Toolbox™ supports more than 30 probability distributions, including parametric, nonparametric, continuous, and discrete distributions.
The toolbox provides several ways to work with probability distributions.
Use probability distribution objects to fit a probability distribution object to sample data, or to create a probability distribution object with specified parameter values. Once you create a probability distribution object, you can use object functions to:
Compute confidence intervals for the distribution parameters
(paramci
).
Compute summary statistics, including mean (mean
), median
(median
), interquartile
range (iqr
), variance
(var
), and standard
deviation (std
).
Evaluate the probability density function (pdf
).
Evaluate the cumulative distribution function (cdf
) or the inverse
cumulative distribution function (icdf
).
Compute the negative loglikelihood (negloglik
) and profile
likelihood function (proflik
) for the
distribution.
Generate random numbers from the distribution (random
).
Truncate the distribution to specified lower and upper limits
(truncate
).
Each distribution object page provides information about the object’s properties and the functions you can use to work with the object.
Use probability distribution functions to work with data input from
matrices. Some of the supported distributions have distribution-specific
functions. These functions use the following abbreviations, as in
normpdf
, normcdf
,
norminv
, normstat
,
normfit
, normlike
, and
normrnd
:
pdf — Probability density functions
cdf — Cumulative distribution functions
inv — Inverse cumulative distribution functions
stat — Distribution statistics functions
fit — Distribution Fitter functions
like — Negative loglikelihood functions
rnd — Random number generators
You can also use the following generic functions to work with most of the distributions:
Use probability distribution apps and user interfaces to interactively fit, explore, and generate random numbers from probability distributions. Available apps and user interfaces include:
The Distribution Fitter app, to interactively fit a distribution to sample data, and export a probability distribution object to the workspace.
The Probability Distribution Function user interface, to visually explore the effect on the pdf and cdf of changing the distribution parameter values.
The Random Number Generation user interface (randtool
), to interactively generate random
numbers from a probability distribution with specified parameter values
and export them to the workspace.
For more information on the different ways to work with probability distributions, see Working with Probability Distributions.
Distribution | Object | Distribution-Specific Functions | Generic Functions | Apps/UI |
---|---|---|---|---|
Copula (Gaussian copula, t copula, Clayton copula, Frank copula, Gumbel copula) | copulapdf copulacdf copulaparam copulastat copulafit copularnd | |||
Gaussian Mixture | gmdistribution | fitgmdist pdf cdf random | ||
Inverse Wishart | iwishrnd | |||
Multivariate normal | mvnpdf mvncdf mvnrnd | |||
Multivariate t | mvtpdf mvtcdf mvtrnd | |||
Wishart | wishrnd |
Distribution | Distribution Objects | Distribution-Specific Functions | Generic Functions | Apps/UIs |
---|---|---|---|---|
Kernel | KernelDistribution | ksdensity | Distribution Fitter | |
Pareto tails | paretotails |
Distribution | Distribution Objects | Distribution-Specific Functions | Generic Functions | Apps/UIs |
---|---|---|---|---|
Pearson system | pearsrnd | |||
Johnson system | johnsrnd |