UniformDistribution

Uniform probability distribution object

Description

A UniformDistribution object consists of parameters and a model description for a uniform probability distribution.

The uniform distribution has a constant probability density function between its two parameters, lower (the minimum) and upper (the maximum). This distribution is appropriate for representing round-off errors in values tabulated to a particular number of decimal places.

The uniform distribution uses the following parameters.

ParameterDescriptionSupport
lowerLower parameter<lower<upper
upperUpper parameterlower<upper<

Creation

Create a UniformDistribution probability distribution with specified parameter values object using makedist.

Properties

expand all

Distribution Parameters

Lower parameter for the uniform distribution, specified as a scalar value.

Data Types: single | double

Upper parameter for the uniform distribution, specified as a scalar value greater than lower.

Data Types: single | double

Distribution Characteristics

This property is read-only.

Logical flag for truncated distribution, specified as a logical value. If IsTruncated equals 0, the distribution is not truncated. If IsTruncated equals 1, the distribution is truncated.

Data Types: logical

This property is read-only.

Number of parameters for the probability distribution, specified as a positive integer value.

Data Types: double

This property is read-only.

Distribution parameter values, specified as a vector.

Data Types: single | double

This property is read-only.

Truncation interval for the probability distribution, specified as a vector containing the lower and upper truncation boundaries.

Data Types: single | double

Other Object Properties

This property is read-only.

Probability distribution name, specified as a character vector.

Data Types: char

This property is read-only.

Distribution parameter descriptions, specified as a cell array of character vectors. Each cell contains a short description of one distribution parameter.

Data Types: char

This property is read-only.

Distribution parameter names, specified as a cell array of character vectors.

Data Types: char

Object Functions

cdfCumulative distribution function
icdfInverse cumulative distribution function
iqrInterquartile range
meanMean of probability distribution
medianMedian of probability distribution
pdfProbability density function
randomRandom numbers
stdStandard deviation of probability distribution
truncateTruncate probability distribution object
varVariance of probability distribution

Examples

collapse all

Create a uniform distribution object using the default parameter values.

pd = makedist('Uniform')
pd = 
  UniformDistribution

  Uniform distribution
    Lower = 0
    Upper = 1

Create a uniform distribution object by specifying parameter values.

pd = makedist('Uniform','Lower',-4,'Upper',2)
pd = 
  UniformDistribution

  Uniform distribution
    Lower = -4
    Upper =  2

Compute the interquartile range of the distribution

r = iqr(pd)
r = 3

Introduced in R2013a