Mean and standard deviation of RVs
Random variables take a random value after each execution of an experiment. For example, if we flip a coin three times, and is the random variable representing the number of heads, then after each execution of the experiment (three flips), will take on one of the numbers or . If we throw extremely often, we get a data series, e.g.
What is the mean of this data series, and what is the standard deviation? These measures are interesting because they help to further characterize the random variable . For example, do the mean and standard deviation change if the coin is biased, and if so, how exactly?
We will now show how to calculate the mean and standard deviation of a random variable using a (different, simpler) example. As you will see, we will require the probability function of the random variable.
Consider a box filled with melons of different size, each costing , or . The random experiment is to randomly select a melon, and we define the random variable ="cost of melon". Assume that the probability function of is as follows:
So, every time we perform the experiment, will have a different value, either or or . If we repeat this experiment a huge number of times, how much do we have to pay on average for a melon?
Well, the percentage of times we select a melon is given by the probability , and similar, is the percentage of times we select a melon, and is the percentage of time we select a melon. So we have (see previous chapter)
Note that we denote the mean of a random variable by ("mu"). This is typical for the average of random variables. We can also calculate the standard deviation of all these costs (again, see previous section).
As you have seen, we use ("sigma") for the standard deviation of a random variable. So on average, the cost is per selected melon. The typical deviation per selection from this value is . These values are only exact if the experiment is performed infinitely often, because otherwise the probabilities are just approximation of the percentages.
Let's summarise:
Consider a random variable of a random experiment, with probability function
Every time we perform the experiment, will take on one of the values . If we perform the experiment many times (infinitely often), we can calculate the mean and the standard deviation of these values:
and
The mean is also called the expected value of X, and is denoted by or . The standard deviation of X is also denoted by . The variance of X is the square of the standard deviation and is denoted by or .
Interpretation of and : is the (long-run) average value of per experiment, and the typical deviation per experiment from this average is .
A fair coin is flipped twice. For two heads you get , for one head you get and for zero heads you get nothing. What is your average win per game? And what is the typical deviation per game from this average?
Solution
We We introduce the random variable ="win in Fr". The probability function of is
The average win of is
and the standard deviation of this average is
In the next exercise, it is also possible to lose money in the long run, which is indicated by a negative gain.
A fair coin is flipped twice. For two heads you get , for one head you get and for zero heads you have to pay . What is your average win per game?
Solution
We introduce the random variable ="win in Fr". The probability function of is
The average win is
In other words, you lose on average .
In a game of chance we typically have an entry fee, and at the end some payout. Your win is the payout minus the entry fee. We say that at a game is fair, if the average win per game is zero. Here is an example.
In a game of chance a fair die is rolled twice. The entry fee is . The payout is as follows: you get for a double six, for one and nothing otherwise. Is this a fair game?
Solution
We introduce the random variable ="your win in Fr". The possible values of are for a double , for one , and otherwise. The probability function of is
Thus, we have
Thus, this is not a fair game. On average, you will loose per game.
Here is an example of an average which is not money related.
The random experiment is to roll a fair die twice and form the sum. What is the average value you get per experiment?
Solution
We define ="sum of the two numbers". We already know from an earlier exercise what the probability function of is, and therefore get