Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

var

Class: prob.ParametricTruncatableDistribution
Package: prob

Variance of probability distribution object

Syntax

v = var(pd)

Description

v = var(pd) returns the variance v of the probability distribution pd.

Input Arguments

expand all

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

Output Arguments

expand all

Variance of the probability distribution, returned as a nonnegative scalar value.

Examples

Variance of a Triangular Distribution

Create a triangular distribution object.

pd = makedist('Triangular','a',-3,'b',1,'c',3)
pd = 

  TriangularDistribution

A = -3, B = 1, C = 3

Compute the variance of the distribution.

v = var(pd)
v =

    1.5556

See Also

Was this topic helpful?