Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

makedist

Create probability distribution object

Syntax

  • pd = makedist(distname)
    example
  • pd = makedist(distname,Name,Value)
    example
  • list = makedist
  • makedist -reset

Description

example

pd = makedist(distname) creates a probability distribution object for the distribution distname, using the default parameter values.

example

pd = makedist(distname,Name,Value) creates a probability distribution object with one or more distribution parameter values specified by name-value pair arguments.

list = makedist returns a cell array list containing a list of the probability distributions that makedist can create.

makedist -reset resets the list of distributions by searching the path for files contained in a package named prob and implementing classes derived from ProbabilityDistribution.

Examples

collapse all

Create a normal distribution object using the default parameter values.

pd = makedist('Normal')
pd = 

  NormalDistribution

  Normal distribution
       mu = 0
    sigma = 1

Compute the interquartile range of the distribution.

r = iqr(pd)
r =

    1.3490

Create a gamma distribution object using the default parameter values.

pd = makedist('Gamma')
pd = 

  GammaDistribution

  Gamma distribution
    a = 1
    b = 1

Compute the mean of the gamma distribution.

mean = mean(pd)
mean =

     1

Create a normal distribution object with parameter values mu = 75 and sigma = 10.

pd = makedist('Normal','mu',75,'sigma',10)
pd = 

  NormalDistribution

  Normal distribution
       mu = 75
    sigma = 10

Create a gamma distribution object with the parameter value a = 3 and the default value b = 1.

pd = makedist('Gamma','a',3)
pd = 

  GammaDistribution

  Gamma distribution
    a = 3
    b = 1

Input Arguments

collapse all

Distribution name, specified as one of the following character vectors. The distribution specified by distname determines the class type of the returned probability distribution object.

Distribution NameDescriptionDistribution Class
'Beta'Beta distributionprob.BetaDistribution
'Binomial'Binomial distributionprob.BinomialDistribution
'BirnbaumSaunders'Birnbaum-Saunders distributionprob.BirnbaumSaundersDistribution
'Burr'Burr distributionprob.BurrDistribution
'Exponential'Exponential distributionprob.ExponentialDistribution
'ExtremeValue'Extreme Value distributionprob.ExtremeValueDistribution
'Gamma'Gamma distributionprob.GammaDistribution
'GeneralizedExtremeValue'Generalized Extreme Value distributionprob.GeneralizedExtremeValueDistribution
'GeneralizedPareto'Generalized Pareto distributionprob.GeneralizedParetoDistribution
'HalfNormal'Half-normal distributionprob.HalfNormalDistribution
'InverseGaussian'Inverse Gaussian distributionprob.InverseGaussianDistribution
'Logistic'Logistic distributionprob.LogisticDistribution
'Loglogistic'Loglogistic distributionprob.LoglogisticDistribution
'Lognormal'Lognormal distributionprob.LognormalDistribution
'Multinomial'Multinomial distributionprob.MultinomialDistribution
'Nakagami'Nakagami distributionprob.NakagamiDistribution
'NegativeBinomial'Negative Binomial distributionprob.NegativeBinomialDistribution
'Normal'Normal distributionprob.NormalDistribution
'PiecewiseLinear'Piecewise Linear distributionprob.PiecewiseLinearDistribution
'Poisson'Poisson distributionprob.PoissonDistribution
'Rayleigh'Rayleigh distributionprob.RayleighDistribution
'Rician'Rician distributionprob.RicianDistribution
'Stable'Stable distributionprob.StableDistribution
'tLocationScale't Location-Scale distributionprob.tLocationScaleDistribution
'Triangular'Triangular distributionprob.TriangularDistribution
'Uniform'Uniform distributionprob.UniformDistribution
'Weibull'Weibull distributionprob.WeibullDistribution

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: makedist('Normal','mu',10) specifies a normal distribution with parameter mu equal to 10, and parameter sigma equal to the default value of 1.

Beta Distribution

collapse all

Example: 'a',3

Data Types: single | double

Example: 'b',5

Data Types: single | double

Binomial Distribution

collapse all

Example: 'N',25

Data Types: single | double

Example: 'p',0.25

Data Types: single | double

Birnbaum-Saunders Distribution

collapse all

Example: 'beta',2

Data Types: single | double

Example: 'gamma',0

Data Types: single | double

Burr Distribution

collapse all

Example: 'alpha',2

Data Types: single | double

Example: 'c',2

Data Types: single | double

Example: 'k',5

Data Types: single | double

Exponential Distribution

collapse all

Example: 'mu',5

Data Types: single | double

Extreme Value Distribution

collapse all

Example: 'mu',-2

Data Types: single | double

Example: 'sigma',2

Data Types: single | double

Gamma Distribution

collapse all

Example: 'a',2

Data Types: single | double

Example: 'b',0

Data Types: single | double

Generalized Extreme Value Distribution

collapse all

Example: 'k',0

Data Types: single | double

Example: 'sigma',2

Data Types: single | double

Example: 'mu',1

Data Types: single | double

Generalized Pareto Distribution

collapse all

Example: 'k',0

Data Types: single | double

Example: 'sigma',2

Data Types: single | double

Example: 'theta',2

Data Types: single | double

Half–Normal Distribution

collapse all

Example: 'mu',1

Data Types: single | double

Example: 'sigma',2

Data Types: single | double

Inverse Gaussian Distribution

collapse all

Example: 'mu',2

Data Types: single | double

Example: 'lambda',4

Data Types: single | double

Logistic Distribution

collapse all

Example: 'mu',2

Data Types: single | double

Example: 'sigma',4

Data Types: single | double

Loglogistic Distribution

collapse all

Example: 'mu',2

Data Types: single | double

Example: 'sigma',4

Data Types: single | double

Lognormal Distribution

collapse all

Example: 'mu',2

Data Types: single | double

Example: 'sigma',2

Data Types: single | double

Multinomial Distribution

collapse all

Outcome probabilities, specified as a vector of scalar values in the range [0,1]. The probabilities sum to 1 and correspond to outcomes [1, 2, ..., k], where k is the number of elements in the probabilities vector.

Example: 'probabilities',[0.1 0.2 0.5 0.2] gives the probabilities that the outcome is 1, 2, 3, or 4, respectively.

Data Types: single | double

Nakagami Distribution

collapse all

Example: 'mu',5

Data Types: single | double

Example: 'omega',5

Data Types: single | double

Negative Binomial Distribution

collapse all

Example: 'R',5

Data Types: single | double

Example: 'p',0.1

Data Types: single | double

Normal Distribution

collapse all

Example: 'mu',2

Data Types: single | double

Example: 'sigma',2

Data Types: single | double

Piecewise Linear Distribution

collapse all

Example: 'x',[1 2 3]

Data Types: single | double

Example: 'Fx',[0.2 0.5 1]

Data Types: single | double

Poisson Distribution

collapse all

Example: 'lambda',5

Data Types: single | double

Rayleigh Distribution

collapse all

Example: 'b',3

Data Types: single | double

Rician Distribution

collapse all

Example: 's',0

Data Types: single | double

Example: 'sigma',2

Data Types: single | double

Stable Distribution

collapse all

Example: 'alpha',1

Data Types: single | double

Example: 'beta',0.5

Data Types: single | double

Example: 'gam',2

Data Types: single | double

Example: 'delta',5

Data Types: single | double

t Location-Scale Distribution

collapse all

Example: 'mu',-2

Data Types: single | double

Example: 'sigma',2

Data Types: single | double

Example: 'nu',20

Data Types: single | double

Triangular Distribution

collapse all

Example: 'a',-2

Data Types: single | double

Example: 'b',1

Data Types: single | double

Example: 'c',5

Data Types: single | double

Uniform Distribution

collapse all

Example: 'lower',-4

Data Types: single | double

Example: 'upper',2

Data Types: single | double

Weibull Distribution

collapse all

Example: 'a',2

Data Types: single | double

Example: 'b',5

Data Types: single | double

Output Arguments

collapse all

Probability distribution, returned as a probability distribution object of the type specified by distname.

List of probability distributions that makedist can create, returned as a cell array of character vectors.

Alternative Functionality

App

The Distribution Fitting app opens a graphical user interface for you to import data from the workspace and interactively fit a probability distribution to that data. You can then save the distribution to the workspace as a probability distribution object. Open the Distribution Fitting app using dfittool, or click Distribution Fitting on the Apps tab.

See Also

|

Introduced in R2013a

Was this topic helpful?