Quantcast

Documentation Center

  • Trial Software
  • Product Updates

makedist

Create probability distribution object

Syntax

  • pd = makedist(distname) example
  • pd = makedist(distname,Name,Value) example

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.

Examples

expand all

Create a Normal Distribution Object

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

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

Specify Parameters for a Normal Distribution Object

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

Specify Parameters for a Gamma Distribution Object

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

expand all

distname — Distribution namestring

Distribution name, specified as one of the following strings. 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
'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
'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

'a' — First shape parameter1 (default) | nonnegative scalar value

Example: 'a',3

Data Types: single | double

'b' — Second shape parameter1 (default) | nonnegative scalar value

Example: 'b',5

Data Types: single | double

Binomial Distribution

'N' — Number of trials1 (default) | positive integer value

Example: 'N',25

Data Types: single | double

'p' — Probability of success0.5 (default) | scalar value in the range [0,1]

Example: 'p',0.25

Data Types: single | double

Birnbaum-Saunders Distribution

'beta' — Scale parameter1 (default) | positive scalar value

Example: 'beta',2

Data Types: single | double

'gamma' — Shape parameter1 (default) | nonnegative scalar value

Example: 'gamma',0

Data Types: single | double

Burr Distribution

'alpha' — Scale parameter1 (default) | positive scalar value

Example: 'alpha',2

Data Types: single | double

'c' — First shape parameter1 (default) | positive scalar value

Example: 'c',2

Data Types: single | double

'k' — Second shape parameter1 (default) | positive scalar value

Example: 'k',5

Data Types: single | double

Exponential Distribution

'mu' — Mean parameter1 (default) | positive scalar value

Example: 'mu',5

Data Types: single | double

Extreme Value Distribution

'mu' — Location parameter0 (default) | scalar value

Example: 'mu',-2

Data Types: single | double

'sigma' — Scale parameter1 (default) | nonnegative scalar value

Example: 'sigma',2

Data Types: single | double

Gamma Distribution

'a' — Shape parameter1 (default) | positive scalar value

Example: 'a',2

Data Types: single | double

'b' — Scale parameter1 (default) | nonnegative scalar value

Example: 'b',0

Data Types: single | double

Generalized Extreme Value Distribution

'k' — Shape parameter0 (default) | scalar value

Example: 'k',0

Data Types: single | double

'sigma' — Scale parameter1 (default) | nonnegative scalar value

Example: 'sigma',2

Data Types: single | double

'mu' — Location parameter0 (default) | scalar value

Example: 'mu',1

Data Types: single | double

Generalized Pareto Distribution

'k' — Shape parameter1 (default) | scalar value

Example: 'k',0

Data Types: single | double

'sigma' — Scale parameter1 (default) | nonnegative scalar value

Example: 'sigma',2

Data Types: single | double

'theta' — Location parameter1 (default) | scalar value

Example: 'theta',2

Data Types: single | double

Inverse Gaussian Distribution

'mu' — Scale parameter1 (default) | positive scalar value

Example: 'mu',2

Data Types: single | double

'lambda' — Shape parameter1 (default) | positive scalar value

Example: 'lambda',4

Data Types: single | double

Logistic Distribution

'mu' — Mean0 (default) | scalar value

Example: 'mu',2

Data Types: single | double

'sigma' — Scale parameter1 (default) | nonnegative scalar value

Example: 'sigma',4

Data Types: single | double

Loglogistic Distribution

'mu' — Log mean0 (default) | scalar value

Example: 'mu',2

Data Types: single | double

'sigma' — Log scale parameter1 (default) | nonnegative scalar value

Example: 'sigma',4

Data Types: single | double

Lognormal Distribution

'mu' — Log mean0 (default) | scalar value

Example: 'mu',2

Data Types: single | double

'sigma' — Log standard deviation1 (default) | nonnegative scalar value

Example: 'sigma',2

Data Types: single | double

Multinomial Distribution

'probabilities' — Outcome probabilities[0.500 0.500] (default) | vector of scalar values in the range [0,1]

Example: 'probabilities',[0.1 0.2 0.5 0.2]

Data Types: single | double

Nakagami Distribution

'mu' — Shape parameter1 (default) | positive scalar value

Example: 'mu',5

Data Types: single | double

'omega' — Scale parameter1 (default) | positive scalar value

Example: 'omega',5

Data Types: single | double

Negative Binomial Distribution

'R' — Number of successes1 (default) | positive scalar value

Example: 'R',5

Data Types: single | double

'p' — Probability of success0.5 (default) | scalar value in the range (0,1]

Example: 'p',0.1

Data Types: single | double

Normal Distribution

'mu' — Mean0 (default) | scalar value

Example: 'mu',2

Data Types: single | double

'sigma' — Standard deviation1 (default) | nonnegative scalar value

Example: 'sigma',2

Data Types: single | double

Piecewise Linear Distribution

'x' — Data values1 (default) | vector of scalar values

Example: 'x',[1 2 3]

Data Types: single | double

'Fx' — cdf values1 (default) | vector of scalar values

Example: 'Fx',[.2 .5 1]

Data Types: single | double

Poisson Distribution

'lambda' — Mean1 (default) | nonnegative scalar value

Example: 'lambda',5

Data Types: single | double

Rayleigh Distribution

'b' — Defining parameter1 (default) | positive scalar value

Example: 'b',3

Data Types: single | double

Rician Distribution

's' — Noncentrality parameter1 (default) | nonnegative scalar value

Example: 's',0

Data Types: single | double

'sigma' — Scale parameter1 (default) | positive scalar value

Example: 'sigma',2

Data Types: single | double

t Location-Scale Distribution

'mu' — Location parameter0 (default) | scalar value

Example: 'mu',-2

Data Types: single | double

'sigma' — Scale parameter1 (default) | positive scalar value

Example: 'sigma',2

Data Types: single | double

'nu' — Degrees of freedom5 (default) | positive scalar value

Example: 'nu',20

Data Types: single | double

Triangular Distribution

'a' — Lower limit0 (default) | scalar value

Example: 'a',-2

Data Types: single | double

'b' — Peak location0.5 (default) | scalar value greater than or equal to a

Example: 'b',1

Data Types: single | double

'c' — Upper limit1 (default) | scalar value greater than or equal to b

Example: 'c',5

Data Types: single | double

Uniform Distribution

'lower' — Lower parameter0 (default) | scalar value

Example: 'lower',-4

Data Types: single | double

'upper' — Upper parameter1 (default) | scalar value greater than lower

Example: 'upper',2

Data Types: single | double

Weibull Distribution

'a' — Scale parameter1 (default) | positive scalar value

Example: 'a',2

Data Types: single | double

'b' — Shape parameter1 (default) | positive scalar value

Example: 'b',5

Data Types: single | double

Output Arguments

expand all

pd — Probability distributionprobability distribution object

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

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

|

Was this topic helpful?