WebCab Probability and Statistics for .NET v3.3 Demo

RandomVariables Constructor (Double[], Int32[])

Creates a new instance of the RandomVariable class and adds a random variable to the internal table of random variables.

public RandomVariables(
   double[] vales,
   int[] occurrence
);

Parameters

vales
occurrence
A array of integers where the k-th term is the number of occurrences/or magnitude of the k-th possible outcome during the experiment considered.

Remarks

Example of Random Variable

An example of a random variable could correspond to the days of a given working week (i.e. 1, 2,...,5) and the number of minutes a daily commute to work took. For example,

  1. Monday's commute took 28 minutes
  2. Tuesday's commute took 30 minutes
  3. Wednesday's commute took 26 minutes
  4. Thursday's commute took 32 minutes
  5. Friday's commute took 30 minutes

The random variable denoted by f, for this experiment would correspond to:

  1. f(1) = 28
  2. f(2) = 30
  3. f(3) = 26
  4. f(4) = 32
  5. f(5) = 30

In the above example the values of the random variable are the integers; {1, 2, 3, 4, 5}, and the occurrences is the array {28, 30, 26, 32, 30}.

See Also

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