WebCab Probability and Statistics for .NET v3.3 Demo

RandomVariables.CumulativeDistFunc Method 

Calculates the cumulative distribution function at a given evaluation point of a random variable within the table of random variables set.

public double CumulativeDistFunc(
   int index,
   double evaluationPoint
);

Parameters

index
The index of the random variable from the tables of random variables which is associated with the table of random variables being considered.
evaluationPoint
Point at which the associated cumulative distribution function is associated. In the above example, if this parameter is taken to be 3, then this method will result the number of children with the nursery with an age less than or equal to three.

Return Value

The value of the distribution function in x.

Remarks

The random variables are defined on a discrete ordered set (i.e. a set which has a one-to-one mapping with a finite subset of integers) and so the cumulative distribution function of a given value is just the sum of the values of the random variables up to and including a given point.

Example and Further Explanation

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:

  1. f(1) = 28, i.e. the number of 1 year old children is 28.
  2. f(2) = 30, i.e. the number of 2 year old children is 30.
  3. f(3) = 26, i.e. the number of 3 year old children is 26.
  4. f(4) = 32, i.e. the number of 4 year old children is 32.
  5. f(5) = 30, i.e. the number of 5 year old children is 30.

Then the associated cumulative random variables g, takes the values:

  1. g(1) = f(1) = 28, i.e the number of children of age 1.
  2. g(1) = f(1) + f(2) = 28 + 30, i.e the number of children of 2 years old or younger.
  3. g(1) = f(1) + f(2) + f(3) = 28 + 30 + 26, i.e the number of children of 3 years old or younger.
  4. g(1) = f(1) + f(2) + f(3) + f(4) = 28 + 30 + 26 + 32, i.e the number of children of 4 years old or younger.
  5. g(1) = f(1) + f(2) + f(3) + f(4) + f(5) = 28 + 30 + 26 + 32 + 30, i.e the number of children of 5 years old or younger.

Setting the Random Variables Table

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:

  1. AddRandomVariable - Adjoins a random variables to the internal table (or collection) of random variables.
  2. (int, double[], double[]) - Inserts a random variable into the ith 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).

See Also

RandomVariables Class | WebCab.Libraries.Statistics.DiscretePrb Namespace