WebCab Probability and Statistics for .NET v3.3 Demo

RandomVariables.Variance Method (Int32)

Calculates the variance of a random variable selected from the table of random variables which has been set.

public double Variance(
   int index
);

Parameters

index
The index of the random variable for which the variance is evaluated within the table of random variables which has been set.

Return Value

The variance of the random variable at the indexth position in the table.

Remarks

The variance of a random variable measures the degree to which the values of the random variable deviate from its mean.

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.

Results returned

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.

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 variance of this random variable describing this experiment would indicate the degree to which the peoples heights deviated.

See Also

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