Statistics/Specialize - Maple Help

Statistics

 Specialize
 Specialize parameters

 Calling Sequence Specialize(X, eqns)

Parameters

 X - algebraic; random variable or distribution eqns - list of equations, or a single equation, giving values for symbolic parameters in X

Description

 • The Specialize function takes a random variable or distribution data structure that contains symbolic parameters, and performs a substitution to specialize the given random variable or distribution.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$

Create a random variable which is normally distributed with mean $a$ and standard deviation $b$.

 > $X≔\mathrm{RandomVariable}\left(\mathrm{Normal}\left(a,b\right)\right)$
 ${X}{≔}{\mathrm{_R}}$ (1)
 > $\mathrm{Mean}\left(X\right),\mathrm{StandardDeviation}\left(X\right)$
 ${a}{,}{b}$ (2)

By setting $a$ to $0$, we obtain a random variable that is normally distributed with mean $0$ and standard deviation $b$.

 > $\mathrm{X1}≔\mathrm{Specialize}\left(X,a=0\right)$
 ${\mathrm{X1}}{≔}{\mathrm{_R0}}$ (3)
 > $\mathrm{Mean}\left(\mathrm{X1}\right),\mathrm{StandardDeviation}\left(\mathrm{X1}\right)$
 ${0}{,}{b}$ (4)

Alternatively, we can set it so that mean and standard deviation are different functions of a single parameter $c$.

 > $\mathrm{X2}≔\mathrm{Specialize}\left(X,\left[a=c,b={c}^{2}\right]\right)$
 ${\mathrm{X2}}{≔}{\mathrm{_R1}}$ (5)
 > $\mathrm{Mean}\left(\mathrm{X2}\right),\mathrm{StandardDeviation}\left(\mathrm{X2}\right)$
 ${c}{,}{{c}}^{{2}}$ (6)

Specialize also accepts algebraic expressions involving random variables.

 > $Y≔X+b\mathrm{X2}$
 ${Y}{≔}{\mathrm{_R1}}{}{b}{+}{\mathrm{_R}}$ (7)
 > $\mathrm{Mean}\left(Y\right),\mathrm{StandardDeviation}\left(Y\right)$
 ${b}{}{c}{+}{a}{,}\sqrt{{{b}}^{{2}}{}{{c}}^{{4}}{+}{{b}}^{{2}}}$ (8)
 > $\mathrm{Y1}≔\mathrm{Specialize}\left(Y,b=a\right)$
 ${\mathrm{Y1}}{≔}{\mathrm{_R1}}{}{a}{+}{\mathrm{_R2}}$ (9)
 > $\mathrm{Mean}\left(\mathrm{Y1}\right),\mathrm{StandardDeviation}\left(\mathrm{Y1}\right)$
 ${a}{}{c}{+}{a}{,}\sqrt{{{a}}^{{2}}{}{{c}}^{{4}}{+}{{a}}^{{2}}}$ (10)

If a parameter evaluates to a constant, then Maple will complain if that constant does not satisfy the requirements for the parameter. For example, the standard deviation cannot be negative.

 > $\mathrm{Specialize}\left(X,b=-1\right)$

References

 Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.