Calculates the variance of a random variable which measures the degree to which the values of the random variable deviate from its mean.
{1, 2, 3, 4, 5}
, corresponding to the possible ages of the children within the nursery.i
-th term of this array is the number of occurrences in which the experiment takes the value of the i
-th term of the values
array during the experiment considered.Note that here the random variable is passed to the method via parameters, rather than read from the internal table.
Considering the experiment of counting the number of children of the ages 1,
2, 3, 4,
or 5
, within a nursery. Say the random variable f
,
for this experiment is:
f(1) = 28
, i.e. the number of 1
year old children is 28
.
f(2) = 30
, i.e. the number of 2
year old children is 30
.
f(3) = 26
, i.e. the number of 3
year old children is 26
.
f(4) = 32
, i.e. the number of 4
year old children is 32
.
f(5) = 30
, i.e. the number of 5
year old children is 30
.
In order to provide the random variable to this method which describes the experiment
considered we need to pass the parameters for the values used to identify the outcomes of
the experiment namely: {1, 2, 3, 4, 5}
; corresponding to the ages of the children
within the nursery and {28, 30, 26, 32, 30}
; corresponding to the number of the
children within the nursery within the five age groups respectively.
Once the parameters are provided this method will return the variance of the random variable which roughly speaking is the weighed sum of the squares of the differences from the mean for each of the values of the events within the experiment. That is, the variance is a measure of the amount by which the values which the random variable takes deviate from its mean. In the above example the variance would measure the degree to which we would expect a randomly selected child's age to differ from the mean of the ages of the children within the nursery.
RandomVariables Class | WebCab.COM.Statistics.DiscretePrb Namespace