Retrieve the number of occurrences of the possible outcomes of the experiment described by the index
th (discrete) random variable within the table of random variables set.
index
th random variable `function'.For further details, concerning how the table of random variables is set please see the notes within the XML Web service overview or the notes given below.
Recall that a (discrete) random variable describes the number of times
a given outcome (or event) occurs from a given experiment. In particular,
it can be viewed as a function f
, which maps the possible
outcomes to the number of occurrences of that outcome during the experiment
considered. Say for example we are considering an experiment of counting
the ages of children within a nursery. All the children's ages (in years) take
one of five values: namely 1, 2, 3, 4, 5
; and for the entire
nursery the number of children of each age was found to be: 28, 30, 26, 32, 30
;
respectively.
The random variable of this experiment which we denote by f
,
mapping the ages of the children to the number of children in the nursery of
that age, is given by:
f(1) = 28
f(2) = 30
f(3) = 26
f(4) = 32
f(5) = 30
Now if this random variable has been set with the table (or collection)
of random variables and lies in the k
th position
then by calling this method passing the parameter k
, we return
the number of children of the different ages as an array. In particular, the
method will return the array: {28, 30, 26, 32, 30}
.
In order to apply this method to the study of random variables you will first need to set the random variables within the internal table (i.e. an ordered collection of random variables) by using one or more of the following:
i
th position within the random variable
table.
Note: If one of the random variables is either incorrectly set or is no longer in use then it can be removed from the table using (int).
RandomVariables Class | DiscreteProbability Namespace | Evaluates the associated probability distribution of the random variable.