WebCab Probability and Statistics Web Services for .NET v3.6

RandomVariables Class

Considers the definition, evaluation and study of random variables.

For a list of all members of this type, see RandomVariables Members.

System.Object
   RandomVariables

public class RandomVariables

Remarks

Recall that a (discrete) random variable assigns to a finite number of values corresponding to experiments a value. The nature of the assigned value will depend on nature of the experiments which the random variable described.

Example

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

It is important to point out that a random variable is a numerical description of an experiment, and therefore in the above example we have made the following associations:

  1. Monday - 1, i.e. the first day of the experiment.
  2. Tuesday - 2, i.e. the second day of the experiment.
  3. Wednesday - 3, i.e. the third day of the experiment.
  4. Thursday - 4, i.e. the fourth day of the experiment.
  5. Friday - 5, i.e. the fifth day of the experiment.

The fact that random variables are numerical descriptions of experiments allows us to apply numerical techniques in order to study the associated experiments. Clearly different experiments will be represented by differing random variables, however it is also the case that the same experiment can justifiably be represented by two different random variables. However, the way in which the random variable describes the experiment will effect the interpretation and even applicability of the numerical techniques (for example, the evaluation of the mean, variance and rho statistic).

Applying this XML Web service

Setting the table of Random Variables

In order to apply the stateful XML Web service to the study of random variables you will first need to set the random variables within the internal table. The internal table of random variables is in fact an order list of random variables which allows to add, remove and study a given element according to its location in the list. The table of random variables may be set using one or more of the following:

  1. AddRandomVariable - Adjoins a random variables to the internal table (or collection) of random variables.
  2. InsertRandomVariable - Inserts a random variable into the ith position within the random variable table.
or by using passing the random variables with the XML Web service constructor.

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 RemoveRandomVariable.

Applying Business Methods to set Random Variables

Once the random variables have been set within the internal table we are able to applied one the of the following business methods in order to studied the properties of the random variables set. The business methods available are:

  1. GetFunctionOfRandomVariable - Returns the values of the random variable.
  2. GetProbabilityOfRandomVariable - Returns the values (i.e. probabilities) of the probability distribution associated with the random variables passed via parameters.
  3. ProbabilityOfEvents - Returns the values (i.e. probabilities) of the probability distribution associated with the random variable passed to the method via parameters.
  4. CumulativeDistFunc - Evaluates the cumulative distribution function of a random variable from the internal table set.
  5. CumulativeProbDistFunc - Evaluates the cumulative distribution function of a random variable which is passed using parameters.
  6. ExpectedValue - Evaluate the expected values of a random variable from the internal table set.
  7. ExpectedValue - Evaluates the random variable of the random variable passed as parameters to the method.
  8. Variance - The variance of a random variable within the internal table set.
  9. Variance - The variance of a random variable passed to the method via parameters.

Requirements

Namespace: DiscreteProbability

Assembly: WebCab.Statistics (in WebCab.Statistics.dll)

See Also

RandomVariables Members | DiscreteProbability Namespace