WebCab Probability and Statistics for .NET v3.3 Demo

RandomVariables.ExpectedValue Method (Int32)

Calculates the expected value of a random variable within the table of random variables set.

public double ExpectedValue(
   int index
);

Parameters

index
The index of the random variable within the table of random variables set for which the mean is evaluated.

Return Value

The mean of the random variable lying at the indexth position within the table of random variables which has been set.

Remarks

Setting the table of Random Variables

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 by using (int).

Results returned

This method will return the mean of the random variable which is the weighted arithmetic average of the possible outcomes. If for example the experiment considered had been to measure the height of a group of people where the random variable describing this experiment mapped a person onto their height, then the mean of this random variable describing this experiment would be equal to the average height of the group of people.

See Also

RandomVariables Class | WebCab.Libraries.Statistics.DiscretePrb Namespace | RandomVariables.ExpectedValue Overload List