Documentation Center

  • Trial Software
  • Product Updates

mean

Class: prob.ParametricTruncatableDistribution
Package: prob

Mean of probability distribution object

Syntax

m = mean(pd)

Description

m = mean(pd) returns the mean m of the probability distribution pd.

Input Arguments

expand all

pd — Probability distributionprobability distribution object

Probability distribution, specified as a probability distribution object. Create a probability distribution object with specified parameter values using makedist.

Output Arguments

expand all

m — Meanscalar value

Mean of the probability distribution, returned as a scalar value.

Examples

expand all

Mean of a Uniform Distribution

Create a uniform distribution object

pd = makedist('Uniform','lower',-3,'upper',5)
pd = 

  UniformDistribution

  Uniform distribution
    Lower = -3
    Upper =  5

Compute the mean of the distribution.

m = mean(pd)
m =
     1

See Also

Was this topic helpful?