Introduction to Probability Models

Random Variables

picture of dice A random variable is a numerical outcome of a random experiment. For example, we could consider X the number of spots on the roll of a die. Or, we could roll 6 dice and let X be the sum of all six values. The distribution of a random variable is the collection of possible outcomes along with their probabilities. This may be described by a table, a formula, or a probability histogram.

If we repeat an experiment many times, we can calculate the sample histogram, which is a bar chart showing the number of times each value of X was observed. This should give us an idea of the probability histogram.

In the following applet, the sample histogram for the random variable X, the sum of the values showing on the dice, is plotted. The red plot shows the expected number of occurences of X, calculated as (number of rolls) times P(X=x), where P(X=x) is the probability that X takes on the value x


To change the number of dice, check the appropriate box
Java Applet simulating rolling dice

Source Code

Other applets related to probability.
Please send comments on this applet to