Statistics - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Statistics and Data Analysis : Statistics Package : Random Variables : Statistics/RandomVariable

Statistics

  

RandomVariable

  

create new random variable

 

Calling Sequence

Parameters

Description

Examples

References

Calling Sequence

RandomVariable(T)

Parameters

T

-

ProbabilityDistribution; probability distribution

Description

• 

The RandomVariable command creates new random variable with the specified distribution.

• 

The parameter can be one of the supported distributions or a distribution data structure.

Examples

with(Statistics):

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

X := RandomVariable(Normal(a, b));

X_R

(1)

PDF(X, t);

2ⅇta22b22πb

(2)

Mean(X);

a

(3)

T := Distribution(GammaDistribution(u, v));

T:=moduleoptionDistribution,Continuous;exportConditions,ParentName,Parameters,CharacteristicFunction,CGF,Mean,Mode,MGF,PDF,Support,Variance,CDFNumeric,QuantileNumeric,RandomSample,RandomSampleSetup,RandomVariate,MaximumLikelihoodEstimate;end module

(4)

Y := RandomVariable(T);

Y_R0

(5)

PDF(Y, t);

0t<0tuv1&ExponentialE;tuuΓvotherwise

(6)

U := Distribution(PDF = (t -> piecewise(t < 0, 0, t < 3, 1/3, 0)));

U:=moduleoptionDistribution&comma;Continuous&semi;exportPDF&comma;Conditions&semi;end module

(7)

Z := RandomVariable(U);

Z_R1

(8)

PDF(Z, t);

0t<013t<30otherwise

(9)

Mean(Z);

32

(10)

References

  

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

See Also

Statistics

Statistics[Computation]

Statistics[Distribution]

Statistics[Distributions]

Statistics[RandomVariables]

Statistics[Specialize]