Contenuto principale

Univariate Continuous Distributions

Compute, fit, and generate samples from real-valued distributions

A univariate continuous distribution is a probability distribution with a single continuous random variable, which can assume any value. Statistics and Machine Learning Toolbox™ offers several ways to work with univariate continuous distributions:

  • Create a distribution object and use distribution object functions.

  • Use distribution-specific functions with specified distribution parameters. The functions can accept parameters of multiple distributions.

  • Use the generic distribution functions with the specified distribution name and corresponding parameters.

For more information, see Working with Probability Distributions.

Apps

Distribution FitterFit probability distributions to data

Tools

Probability Distribution Function ToolInteractive density and distribution plots
randtoolInteractive random number generation

Objects

expand all

ExtremeValueDistributionExtreme value probability distribution object
GeneralizedExtremeValueDistributionGeneralized extreme value probability distribution object
LogisticDistributionLogistic probability distribution object
LoglogisticDistributionLoglogistic probability distribution object
NormalDistributionNormal probability distribution object
HalfNormalDistributionHalf-normal probability distribution object
LognormalDistributionLognormal probability distribution object
paretotailsPiecewise distribution with Pareto tails
GeneralizedParetoDistributionGeneralized Pareto probability distribution object
UniformDistributionUniform probability distribution object
LoguniformDistributionLoguniform probability distribution object (Since R2021b)
BetaDistributionBeta probability distribution object
BirnbaumSaundersDistributionBirnbaum-Saunders probability distribution object
BurrDistributionBurr probability distribution object
ExponentialDistributionExponential probability distribution object
GammaDistributionGamma probability distribution object
InverseGaussianDistributionInverse Gaussian probability distribution object
KernelDistributionKernel probability distribution object
NakagamiDistributionNakagami probability distribution object
PearsonDistributionPearson probability distribution object (Since R2025a)
PiecewiseLinearDistributionPiecewise linear probability distribution object
RayleighDistributionRayleigh probability distribution object
RicianDistributionRician probability distribution object
StableDistributionStable probability distribution object
tLocationScaleDistributiont location-scale probability distribution object
TriangularDistributionTriangular probability distribution object
WeibullDistributionWeibull probability distribution object

Functions

expand all

makedistCreate probability distribution object
fitdistFit probability distribution object to data
cdfCumulative distribution function
gatherGather properties of Statistics and Machine Learning Toolbox object from GPU
icdfInverse cumulative distribution function
iqrInterquartile range of probability distribution
meanMean of probability distribution
medianMedian of probability distribution
negloglikNegative loglikelihood of probability distribution
paramciConfidence intervals for probability distribution parameters
pdfProbability density function
plotPlot probability distribution object (Since R2022b)
proflikProfile likelihood function for probability distribution
qqplotQuantile-quantile plot
randomRandom numbers
stdStandard deviation of probability distribution
truncateTruncate probability distribution object
varVariance of probability distribution
boundaryPiecewise distribution boundaries
cdfCumulative distribution function
icdfInverse cumulative distribution function
lowerparamsLower Pareto tail parameters
nsegmentsNumber of segments in piecewise distribution
pdfProbability density function
randomRandom numbers
segmentPiecewise distribution segments containing input values
upperparamsUpper Pareto tail parameters
cdfCumulative distribution function
histfitHistogram with a distribution fit
icdfInverse cumulative distribution function
mleMaximum likelihood estimates
mlecovAsymptotic covariance of maximum likelihood estimators
pdfProbability density function
qqplotQuantile-quantile plot
randomRandom numbers
betacdfBeta cumulative distribution function
betapdfBeta probability density function
betainvBeta inverse cumulative distribution function
betalikeBeta negative loglikelihood
betastatBeta mean and variance
betafitBeta parameter estimates
betarndBeta random numbers
chi2cdfChi-square cumulative distribution function
chi2pdfChi-square probability density function
chi2invChi-square inverse cumulative distribution function
chi2statChi-square mean and variance
chi2gofChi-square goodness-of-fit test
chi2rndChi-square random numbers
ncx2cdfNoncentral chi-square cumulative distribution function
ncx2pdfNoncentral chi-square probability density function
ncx2invNoncentral chi-square inverse cumulative distribution function
ncx2statNoncentral chi-square mean and variance
ncx2rndNoncentral chi-square random numbers
expcdfExponential cumulative distribution function
exppdfExponential probability density function
expinvExponential inverse cumulative distribution function
explikeExponential negative loglikelihood
expstatExponential mean and variance
expfitExponential parameter estimates
exprndExponential random numbers
evcdfExtreme value cumulative distribution function
evpdfExtreme value probability density function
evinvExtreme value inverse cumulative distribution function
evlikeExtreme value negative loglikelihood
evstatExtreme value mean and variance
evfitExtreme value parameter estimates
evrndExtreme value random numbers
gevcdfGeneralized extreme value cumulative distribution function
gevpdfGeneralized extreme value probability density function
gevinvGeneralized extreme value inverse cumulative distribution function
gevlikeGeneralized extreme value negative loglikelihood
gevstatGeneralized extreme value mean and variance
gevfitGeneralized extreme value parameter estimates
gevrndGeneralized extreme value random numbers
fcdfF cumulative distribution function
fpdfF probability density function
finvF inverse cumulative distribution function
fstatF mean and variance
frndF random numbers
ncfcdfNoncentral F cumulative distribution function
ncfpdfNoncentral F probability density function
ncfinvNoncentral F inverse cumulative distribution function
ncfstatNoncentral F mean and variance
ncfrndNoncentral F random numbers
randomRandom numbers
gamcdfGamma cumulative distribution function
gampdfGamma probability density function
gaminvGamma inverse cumulative distribution function
gamlikeGamma negative loglikelihood
gamstatGamma mean and variance
gamfitGamma parameter estimates
gamrndGamma random numbers
randgGamma random numbers with unit scale
ksdensityKernel smoothing function estimate for univariate and bivariate data
mvksdensityKernel smoothing function estimate for multivariate data
normcdfNormal cumulative distribution function
normpdfNormal probability density function
norminvNormal inverse cumulative distribution function
normlikeNormal negative loglikelihood
normstatNormal mean and variance
normfitNormal parameter estimates
normplotNormal probability plot
normrndNormal random numbers
normspecNormal density plot shading between specifications
logncdfLognormal cumulative distribution function
lognpdfLognormal probability density function
logninvLognormal inverse cumulative distribution function
lognlikeLognormal negative loglikelihood
lognstatLognormal mean and variance
lognfitLognormal parameter estimates
lognrndLognormal random numbers
gpcdfGeneralized Pareto cumulative distribution function
gppdfGeneralized Pareto probability density function
gpinvGeneralized Pareto inverse cumulative distribution function
gplikeGeneralized Pareto negative loglikelihood
gpstatGeneralized Pareto mean and variance
gpfitGeneralized Pareto parameter estimates
gprndGeneralized Pareto random numbers
pearspdfPearson probability density function (Since R2023b)
pearscdfPearson cumulative distribution function (Since R2023b)
pearsrndPearson system random numbers
pearsinvPearson inverse cumulative distribution function (icdf) (Since R2025a)
raylcdfRayleigh cumulative distribution function
raylpdfRayleigh probability density function
raylinvRayleigh inverse cumulative distribution function
raylstatRayleigh mean and variance
raylfitRayleigh parameter estimates
raylrndRayleigh random numbers
nctcdfNoncentral t cumulative distribution function
nctpdfNoncentral t probability density function
nctinvNoncentral t inverse cumulative distribution function
nctstatNoncentral t mean and variance
nctrndNoncentral t random numbers
tcdfStudent's t cumulative distribution function
tpdfStudent's t probability density function
tinvStudent's t inverse cumulative distribution function
tstatStudent's t mean and variance
trndStudent's t random numbers
ttestOne-sample and paired-sample t-test
ttest2Two-sample t-test
randUniformly distributed random numbers
unifcdfContinuous uniform cumulative distribution function
unifpdfContinuous uniform probability density function
unifinvContinuous uniform inverse cumulative distribution function
unifitContinuous uniform parameter estimates
unifstatContinuous uniform mean and variance
unifrndContinuous uniform random numbers
wblcdfWeibull cumulative distribution function
wblpdfWeibull probability density function
wblinvWeibull inverse cumulative distribution function
wbllikeWeibull negative loglikelihood
wblstatWeibull mean and variance
wblfitWeibull parameter estimates
wblrndWeibull random numbers
wblplotWeibull probability plot

Topics

Chi-Square Distributions

  • Chi-Square Distribution
    The chi-square distribution is commonly used in hypothesis testing, particularly the chi-square test for goodness of fit.
  • Noncentral Chi-Square Distribution
    The noncentral chi-square distribution is a more general case of the chi-square distribution, with applications in thermodynamics and signal processing.

Extreme Value Distributions

  • Extreme Value Distribution
    Extreme value distributions are often used to model the smallest or largest value in a large set of independent, identically distributed random values representing measurements or observations.
  • Generalized Extreme Value Distribution
    The generalized extreme value distribution is often used to model the smallest or largest value in a large set of independent, identically distributed random values representing measurements or observations.

F Distributions

  • F Distribution
    The F distribution is often used in the analysis of variance, as in the F-test.
  • Noncentral F Distribution
    The noncentral F distribution is a more general case of the F distribution and is used to calculate the power of a hypothesis test relative to a particular alternative.

Logistic Distributions

  • Logistic Distribution
    The logistic distribution is used for growth models and in logistic regression.
  • Loglogistic Distribution
    The loglogistic distribution is a probability distribution whose logarithm has a logistic distribution.

Normal Distributions

  • Normal Distribution
    Learn about the normal distribution. The normal distribution is a two-parameter (mean and standard deviation) family of curves. Central Limit Theorem states that the normal distribution models the sum of independent samples from any distribution as the sample size goes to infinity.
  • Half-Normal Distribution
    The half-normal distribution is a special case of the folded normal and truncated normal distributions.
  • Lognormal Distribution
    The lognormal distribution is a probability distribution whose logarithm has a normal distribution.

t Distributions

  • Noncentral t Distribution
    The noncentral t distribution is a more general case of the Student’s t distribution and is used to calculate the power of the t test.
  • Student's t Distribution
    The Student’s t distribution is a family of curves depending on a single parameter ν (the degrees of freedom).
  • t Location-Scale Distribution
    The t location-scale distribution is useful for modeling data distributions with heavier tails (more prone to outliers) than the normal distribution.

Uniform Distributions

  • Uniform Distribution (Continuous)
    The uniform distribution (also called the rectangular distribution) is notable because it has a constant probability distribution function between its two bounding parameters.
  • Loguniform Distribution
    The loguniform distribution (also called the reciprocal distribution) has a density that is proportional to the reciprocal of the variable value within its two bounding parameters.

Weibull Distribution

  • Weibull Distribution
    The Weibull distribution is an appropriate analytical tool for modeling the breaking strength of materials. Current usage also includes reliability and lifetime modeling.
  • Three-Parameter Weibull Distribution
    Find maximum likelihood estimates (MLEs) for the three-parameter Weibull distribution with scale, shape, and location parameters.

Other Distributions

  • Beta Distribution
    The beta distribution describes a family of curves that are nonzero only on the interval [0,1].
  • Birnbaum-Saunders Distribution
    The Birnbaum-Saunders distribution was originally proposed as a lifetime model for materials subject to cyclic patterns of stress and strain, where the ultimate failure of the material comes from the growth of a prominent flaw.
  • Burr Type XII Distribution
    The Burr type XII distribution is a three-parameter family of distributions on the positive real line.
  • Exponential Distribution
    The exponential distribution is used to model events that occur randomly over time. The main application area is in studies of lifetimes.
  • Gamma Distribution
    The gamma distribution models sums of exponentially distributed random variables.
  • Inverse Gaussian Distribution
    Also known as the Wald distribution, the inverse Gaussian is used to model nonnegative positively skewed data.
  • Kernel Distribution
    A kernel distribution is a nonparametric representation of the probability density function of a random variable.
  • Nakagami Distribution
    In communications theory, Nakagami distributions are used to model scattered signals that reach a receiver by multiple paths.
  • Generalized Pareto Distribution
    The generalized Pareto distribution is used to model extreme events from a distribution.
  • Pearson Distribution
    The Pearson distribution is a flexible, four-parameter distribution that has an arbitrary mean, standard deviation, skewness, and kurtosis.
  • Piecewise Linear Distribution
    The piecewise linear distribution creates a nonparametric representation of the cumulative distribution function (cdf) by linearly connecting the known cdf values from the sample data.
  • Rayleigh Distribution
    The Rayleigh distribution is a special case of the Weibull distribution, with applications in communications theory.
  • Rician Distribution
    In communications theory, Rician distributions are used to model scattered signals that reach a receiver by multiple paths.
  • Stable Distribution
    Stable distributions are a class of probability distributions suitable for modeling heavy tails and skewness.
  • Triangular Distribution
    The triangular distribution provides a simplistic representation of the probability distribution when limited sample data is available.

How To