EmpiricalRandomVariable - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Student[Statistics]

  

EmpiricalRandomVariable

  

Empirical random variable

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

EmpiricalRandomVariable(sample, opts)

Parameters

sample

-

a list or rtable of samples

opts

-

(optional) an equation of the form probabilities = plist

Description

• 

The empirical random variable is a discrete probability distribution with probability function generated from the given sample.

• 

If opts is not given, then Maple assigns a probability to each variate present within the sample equal to the fraction of occurrences of that value within the entire sample. If opts is specified, then plist should be a list or rtable of probabilities (nonnegative real numbers adding up to 1), having equally many entries as sample; the ith entry of plist specifies the probability for the ith entry of sample.

Examples

> 

with⁡StudentStatistics:

> 

P≔1,1,1,2,2,2.5,3,4,4,5.5:

> 

X≔EmpiricalRandomVariable⁡P:

> 

ProbabilityFunction⁡X,1

310

(1)
> 

ProbabilityFunction⁡X,5

0

(2)
> 

ProbabilityFunction⁡X,5.5

110

(3)
> 

ProbabilityFunction⁡X,1,output=plot

> 

CDF⁡X,92

910

(4)
> 

CDF⁡X,x,output=plot

> 

Mean⁡X

2.60000000000000

(5)
> 

Variance⁡X

2.090000000

(6)

Specify the probabilities.

> 

M≔Matrix⁡1,2,3,3.5,4,5

M≔1233.545

(7)
> 

pmatrix≔Matrix⁡115,215,515,415,115,215

pmatrix≔11521513415115215

(8)
> 

Y≔EmpiricalRandomVariable⁡M,probabilities=pmatrix:

> 

ProbabilityFunction⁡Y,x,output=plot

> 

ProbabilityFunction⁡Y,3.5

415

(9)
> 

CDF⁡Y,x,output=plot

> 

CDF⁡Y,4

1315

(10)
> 

Median⁡Y

3

(11)

References

  

Evans, Merran; Hastings, Nicholas; and Peacock, Brian. Statistical Distributions. 3rd ed. Hoboken: Wiley, 2000.

  

Johnson, Norman, L.; Kotz, Samuel; and Balakrishnan, N. Continuous Univariate Distributions. 2nd ed. 2 vols. Hoboken: Wiley, 1995.

  

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

Compatibility

• 

The Student[Statistics][EmpiricalRandomVariable] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

Statistics[Distributions][EmpiricalDistribution]

Student

Student[Statistics]

Student[Statistics][RandomVariable]