### Video Transcript

In this video, weโre going to learn
how to calculate the expected value or the mean of discrete random variables from
both their table and a graph. Letโs begin though by recalling
what we mean by a discrete random variable of a probability distribution. A probability distribution
describes the likelihood of obtaining the possible values that a random variable can
assume. This can be given as a function, a
table of values, or even in graph form. Then a discrete variable is a
variable which can only take a countable number of values. In this example, ๐ฅ is a discrete
variable as it only takes the values one, two, three, four, five, and six.

In this video, weโre interested in
finding a formula that can help us to find the expected value, denoted as ๐ธ of ๐ฅ,
in other words to find the mean of a discrete random variable. To help us develop this formula,
weโre going to look at an example.

An experiment produces the discrete
random variable ๐ that has the probability distribution shown. If a very high number of trials
were carried out, what would be the likely mean of all the outcomes?

Letโs imagine the experiment is
spinning a spinner with the numbers two, three, four, and five on it. The table tells us the probability
of achieving each score on a single spin. And so we see itโs much more
likely, for instance, that the spinner lands on the five than it does on the
two. Letโs add another table, showing
the number of times we spin the spinner versus the number of times we expect it to
land on each number. Letโs say we were to spin the
spinner 10 times; 0.1 of those times we would expect the spinner to land on two. Well, 0.1 of 10 โ in other words
0.1 times 10 โ is one. Then 0.3 of the times, we would
expect the spinner to land on three. 0.3 of 10 or 0.3 times 10 is
three. 0.2 of the times, we expect the
spinner to land on four, so thatโs twice. And 0.4 of the times, thatโs four
times, we would expect the spinner to land on five.

Next, letโs think about what would
happen if we were to spin it 20 times. 0.1 of those times, we would expect
it to land on two, so thatโs twice. Six times we expect the spinner to
land on three, thatโs 0.3 times 20. Four times, which is 0.2 times 20,
weโd expect it to land on four. And 0.4 times 20 which is eight
would be the number of times weโd expect it to land on five. But letโs imagine there are a very
high number of trials, say 1000 trials. 0.1 times 1000 is 100. So weโd roughly expect the spinner
to land on two 100 times. Weโd expect it to land on three 300
times, weโd expect it to land on four 200 times, and weโd expect it to land on five
400 times.

Now, this is really useful as we
can use these values to calculate the mean by using the rules for finding the mean
from a frequency table. The formula we use to calculate the
mean from a frequency table is the sum of ๐ times ๐ฅ divided by the sum of ๐ฅ. The sum of ๐ฅ is 1000. Weโve carried out 1000 trials. ๐ times ๐ฅ will be two times 100,
three times 300, four times 200, and five times 400. And so the sum of ๐๐ฅ is the sum
of all these products. And so weโre able to calculate the
mean, which we call the expected value ๐ธ of ๐ฅ, as shown.

Now we will calculate this value in
a moment, but weโre looking to find a rule for finding the expected value. So weโre going to split the
fraction up a little bit. By reversing the process we perform
when adding fractions, we can write it as two times 100 over 1000 plus three times
300 over 1000 and so on. And then we notice something. 100 divided by 1000 is 0.1. 300 divided by 1000 is 0.3. 200 divided by 1000 is 0.2. And 400 divided by 1000 is 0.4. And so another way to write our
calculation for the mean is as two times 0.1 plus three times 0.3 plus four times
0.2 plus five times 0.4, and thatโs equal to 3.9. And so, if a very high number of
trials were carried out, the likely mean of all of our outcomes would actually be
3.9.

And by this stage, you might be
spotting a pattern. Two times 0.1 is the product of ๐ฅ
and its corresponding ๐ of ๐ฅ. Three times 0.3 is also the product
of ๐ฅ and its corresponding ๐ of ๐ฅ. And so we notice that this is
simply the sum of the product of the numbers in each column.

And so weโre able to
generalize.

The expected value, sometimes
called the mean of ๐ฅ, is denoted ๐ธ of ๐ฅ or ๐ or ๐ sub ๐ฅ. It can be found by calculating the
sum of the product of the variable ๐ฅ and the probability of that variable
occurring, ๐ of ๐ฅ equals ๐ฅ. We write this as shown. ๐ธ of ๐ฅ is the sum of ๐ฅ times ๐
of ๐ฅ equals ๐ฅ. Now that we have a formula, letโs
see how we can apply this to finding the expected value of a discrete random
variable given a graph.

Work out the expected value of the
random variable ๐ whose probability distribution is shown.

The expected value denoted ๐ธ of ๐ฅ
can be found by calculating the sum of the product of the variable ๐ and the
probability of that variable occurring. Thatโs represented as shown. And so a nice way to work out the
expected value when given a graph is actually to construct a table. We see by looking at the ๐ฅ-axis
that the random variable ๐ can take the values one, two, three, four, and five. We also see that every single one
of the bars in our diagram has a height of 0.2. So the associated probability for
each variable is in fact 0.2. Now, a quick way that we can check
whether what weโve done is likely to be correct is to check that the sum of the
probabilities is indeed one. And 0.2 plus 0.2 plus 0.2 plus 0.2
plus 0.2 is one, and so we can move on.

To find the expected value then, we
find the sum of the products of the numbers in each column. So thatโs one times 0.2 plus two
times 0.2 plus three times 0.2 plus four times 0.2. And finally, we add five times
0.2. Evaluating each of our products,
and we get 0.2 plus 0.4 plus 0.6 plus 0.8 plus one, which is equal to three. And so the expected value ๐ธ of ๐ฅ
is equal to three. Now, in fact, this makes a lot of
sense. We saw that the probability of each
variable occurring was equal; it was 0.2 every time. And so the expected value and the
likely mean would actually be the mean of all of our numbers. Thatโs five plus four plus three
plus two plus one divided by five, which is also equal to three.

Now, this only worked because the
probabilities were equal. It wouldnโt be a general rule that
we could follow. Letโs look at an example where we
have a graph and the probabilities are not equal.

Work out the expected value of the
random variable ๐ whose probability distribution is shown.

The formula we use to calculate the
expected value of a discrete random variable ๐ is shown. Itโs the sum of the product of ๐
and the probability that ๐ฅ occurs. And so a nice way to calculate the
expected value when given a probability distribution in graph form is to transfer
that into a table. The ๐ฅ-axis on our graph tells us
the values our discrete random variable can take. They are one, two, three, and
four. The first bar then has a height of
0.1. So the probability that ๐ is equal
to one is 0.1. We see that our second bar has a
height of 0.3. So the probability that ๐ is equal
to two is 0.3. And then we continue in this
manner. The height of our third bar, and
thatโs the probability that ๐ is equal to three, is 0.4. And the height of our fourth bar,
which tells us the probability that ๐ is equal to four, is 0.2.

To find the expected value from our
graph then, we need to find the sum of the products of the numbers in each
column. So thatโs one times 0.1 plus two
times 0.3 plus three times 0.4 plus four times 0.2. This becomes 0.1 plus 0.6 plus 1.2
plus 0.8, which is equal to 2.7. And so the expected value of the
random variable ๐ is 2.7. Now, we can always check whether
our answer is likely to be correct, or at least in the right range. When weโre finding the expected
value, weโre finding the weighted mean. According to our table and our
graph, itโs much more likely that ๐ฅ is equal to three than it is to one. The mean is more likely to be
weighted then in this direction. And since 2.7 is roughly between
one and four, though not exactly, we know that weโre likely to have performed the
calculations correctly.

In our next example, weโll look at
how we can apply some of the other rules for working with probabilities to find the
expected value of a discrete random variable.

The function in the given table is
the probability function of a discrete random variable ๐. Find the expected value of ๐.

We know that we can find the
expected value of a discrete random variable by calculating the sum of the products
of the variable ๐ and the probability of that variable occurring. And we write it using this ๐ด
notation as shown. Now in this case, ๐ is a
probability function. So we can say that this is like
saying the probability that ๐ฅ is equal to ๐ฅ sub ๐. And so to find the expected value,
weโre going to begin by finding the products of the numbers in each column. But of course, there is a number
missing. And thatโs this value here.

Weโre told that the probability
that ๐ฅ is equal to one is ๐. So how do we calculate ๐? Well, we know that the sum of the
probabilities in our table must be equal to one, and so we can set up and solve an
equation for ๐. Our equation is 0.1 plus ๐ plus
0.1 plus 0.4 plus 0.2 equals one. In other words, weโve added the
respective probabilities and set it equal to one. 0.1 plus 0.1 plus 0.4 plus 0.2 is
0.8. So our equation becomes ๐ plus 0.8
equals one. If we subtract 0.8 from both sides,
we find ๐ is equal to 0.2. And so weโre ready to calculate the
expected value of ๐. Itโs zero times 0.1 plus one times
0.2 plus two times 0.1. And we repeat this process with the
numbers in our final two columns. This gives us zero plus 0.2 plus
0.2 plus 1.2 plus 0.8, which is equal to 2.4. The expected value of ๐ then in
this case is 2.4.

In our final example, weโre going
to look at how to use the expected value formula to find missing values.

The function in the given table is
a probability function of a discrete random variable ๐ฅ. Given that the expected value of ๐ฅ
is 254 over 57, find the value of ๐ต.

And then we have a table with
values for ๐ฅ sub ๐ and ๐ of ๐ฅ sub ๐. We begin by recalling how we
calculate the expected value of a discrete random variable. Itโs the sum of the values that the
variable can take multiplied by the probability of that variable occurring. Now, in this question, weโre told
that the function is a probability function of the discrete random variable. So weโre essentially saying that ๐
of ๐ฅ sub ๐ is the same as the probability that ๐ฅ is equal to ๐ฅ sub ๐. And so eventually, weโre going to
multiply the values in each of our columns.

But we do have a bit of a
problem. At the moment, our values for
probability are in terms of a variable ๐. And so weโre going to use the fact
that we know that the sum of these probabilities must be equal to one. In other words, eight ๐ plus three
๐ plus a third plus eight ๐ must be equal to one. Eight ๐ plus three ๐ plus eight
๐ is 19๐. So we get 19๐ plus a third equals
one. We can solve for ๐ by first
subtracting a third from both sides to get 19๐ equals two-thirds. And then when we divide both sides
by 19, we get ๐ is equal to two over 57. So now that we know the value of
๐, we need to go back to our table and calculate the relevant probabilities.

The probability that ๐ฅ is equal to
one is eight ๐. So thatโs eight times two over 57,
which is 16 over 57. Then the probability that ๐ฅ is
equal to two is three ๐. So thatโs three times two over 57,
which is six over 57. Weโre told the probability ๐ฅ is
equal to ๐ต is a third. And finally, the probability that
๐ฅ is equal to seven is eight ๐ again. So thatโs 16 over 57. Now of course, a quick check we
could do here would be to check that each of our probabilities does indeed sum to
one, and it does, so we can move on.

Our next job is to find the sum of
the products of the numbers in each column. The expected value then is given by
one times 16 over 57 plus two times six over 57 plus ๐ต times a third plus seven
times 16 over 57. But actually, we were told the
expected value is 254 over 57. So weโre going to replace ๐ธ of ๐ฅ
with this number. And then we simplify the right-hand
side. Now, all these fractions are making
life a little bit awkward, so weโre going to multiply every single number in our
equation by 57. When we do, our equation becomes
254 equals 16 plus 12 plus 19๐ต plus 112. 19 is essentially 57 divided by
three. And then, by adding the numerical
parts, we get 140 plus 19๐ต on the right-hand side.

Next, we subtract 140 from both
sides, and our equation becomes 114 equals 19๐ต. Finally, we divide through by
19. And we find ๐ต is 114 divided by
19, but 114 divided by 19 is six. And so the value of ๐ต is six.

Letโs now recap the key points from
this lesson. In this video, we recapped what we
meant by a discrete random variable. Itโs a variable that can only take
a countable number of values. We saw that we denote the expected
value, or sometimes called the mean of ๐ฅ, as ๐ธ of ๐ฅ or ๐ or ๐ sub ๐ฅ. And then the expected value is
found by calculating the sum of the products of the variable ๐ฅ and the probability
of that variable occurring. And we use the ๐ด notation to
represent this as shown.