0:00

[MUSIC]

Â So today we'll be talking about the expected value.

Â What we mean by that is, we will be

Â looking at a trial, when we conduct a certain trial.

Â And we will be looking at the outcomes that we see from this trial.

Â And the question that we are interested in is,

Â what is the expected value that we expect to see?

Â So, for example, if I am rolling a dice just once and it is a fair dice

Â with 6 sides, what is the value that do I expect once I roll that dice?

Â Okay, so, that question becomes actually interesting,

Â because what is the meaning of that value?

Â So, I have one dice and I roll it, the possible outcome that I

Â can see are one, two, three, four, five, six, these are the possible values.

Â So now I'm saying, if I roll a dice once, what is the expected value?

Â So each one of these since the dice is, the dice is fair,

Â each one of these is going to have a probability of one over six.

Â All right, it's one over six.

Â 1:10

And the question is, what does it mean to say that

Â I expect to see a certain value when I roll that dice?

Â One interpretation of that is that, is, is

Â to think about the following trial or experiment.

Â If I take that same dice and I roll it a very large number of times.

Â Think about it, roll it for a million times, a billion times, and so on.

Â And then I look at the values that I've seen every time.

Â And then I look at the average value from these values.

Â And look at the, what do I see there?

Â So for example, I take this, I take this dice, I roll it.

Â Let's make our, our life easier and let's say, we roll it 600 times.

Â So I wrote 600 times, so and every time I roll it,

Â I write down the, the side I see, the number I see.

Â So this is the first time.

Â This is the second time, the third time, all the way to 600.

Â So if I ask another question, is that for this dice since it is fair.

Â It has six sides, each one with

Â the, appearing with the probability one over six.

Â And I ask you, what do you expect to see here as

Â number in these boxes when I'm writing down these values 600 times.

Â 2:26

I think it makes sense to say that we are

Â going to see 1 on the order of about 100 times.

Â We are going to see 2 on the order of 100 times, 3 on the

Â order of 100 times all the way to 6 of the order 100 times, right?

Â If the, if the probability of seeing 1 is 1 over 6.

Â So, but what this mean is that we expect to see 1 every 6 times we roll that dice.

Â 2:54

So here, now if I am saying what is the average value

Â that I expect to see when I roll this dice 600 times?

Â I would basically say, okay I have, I've seen the value of 1 100 times.

Â I've seen the value 2, 100 times.

Â I have seen the value 3 100 times.

Â I have seen the value 4, 100 times.

Â 3:30

is going to give me the expected value or that I would see from rolling this dice

Â 600 times, or similarly this would be the expected value of seeing each one,

Â the, the expected value of that I would see when I roll that dice once.

Â Okay?

Â So in this case, what we are saying that we basically take

Â the value that we see times the number of times we have observed.

Â We take the sum over all these possibilities, divide

Â by the number of time we repeated that same experiment.

Â Now going back to the history of expected value and looking at this dice.

Â What is the expected value that I would observe if I roll the dice only once?

Â Okay.

Â So the way would do that again in this case is

Â 1, the value 1 will appear with probability of 1 over 6.

Â 2 with the probability 1 over 6 or 3 with the

Â probability 1 over 6 plus 4 with the probability 1 over 6.

Â 4:39

Okay.

Â So, this would be the expected value.

Â When, if I roll this dice only once.

Â And if we compute this value here, so we have 1 6th

Â plus 2 6th plus 3 6th plus 4 6th plus 5 6th plus.

Â 1 plus 2, 3, 6, 10, 15,

Â 21 over 6, and this is 3.5.

Â So this is the expected value for this trial

Â where I roll this six sided fair dice once.

Â So I expect to see a value of 3.5.

Â So this immediately should raise a flag.

Â What does it mean to say that the expected value is 3.5?

Â This dice actually does not have a side that has a value of 3.5, okay?

Â 5:33

So this is why it makes sense to think about

Â the meaning of this notion of expected value in terms of

Â the mean or the average value that we would see if

Â we had roll this dice a very large number of times.

Â Mathematically in, in fact is that, if we roll it an infinite number of times, okay?

Â So this will be the expected value of this dice.

Â Now if we make this a bit more interesting and

Â I say, I take this dice and I roll it twice.

Â Okay.

Â So I take the dice, roll it once.

Â I roll it twice, a second time.

Â And then I record the, the two values that I have seen.

Â And I look at the sum of these two values.

Â And then I say, what is the expected value I would see.

Â The expected sum, of the two numbers I get from rolling that dice twice.

Â Okay.

Â So now, the first question we have to ask,

Â is what are the possible sums that we can see?

Â Since we have the dice we are rolling

Â it twice, and we are recording the two numbers.

Â So we have two numbers, x, y, right?

Â So we are going to roll the dice first and we are going to see some value x.

Â We roll it again, we see some value y.

Â Of course, x can be either 1 or 2 or 3 or 4 or 5 or 6.

Â The same thing with y.

Â 6:51

So if we look at the sum of these two,

Â we ask what is the possible sum we can observe?

Â It going to be, the smallest possible is going to

Â be to where both rows basically showed 1, or

Â it can be 3, can be 4, all the way to the largest possible sum which is 12.

Â Now, when we compute the, the expected sum from this experiment or this trial,

Â we basically have to see what are possible ways of generating each one of these sums.

Â So for example x plus y equal 2, to,

Â 7:26

to get the sum 2, x has to be 1 and y has to be 1.

Â So the first time I rolled the dice, I've seen 1, second time I have seen 1.

Â There is no other option for getting a sum

Â of 2 given this dice that I'm rolling it twice.

Â Now what is the probability of seeing 1 the first time?

Â The answer is 1 over 6.

Â What is the probability that I see 1 the second time?

Â It is 1 over 6.

Â 7:51

Now since these two, two, two events are

Â independent, the probability of seeing 1 and 1 is 1 over

Â 6 times 1 over 6 and the probability is 1 over 36.

Â This is for the sum of 2.

Â What happens if the sum is 3?

Â 8:15

The, the, the way I could have gotten a sum of three, is either x is 1 the first

Â time I rolled the dice I saw 1, the second time it's 2,

Â or the first time I saw a 2 and the second time I saw a 1.

Â Again the probability of seeing 1, and then seeing 2

Â is 1 over 6 time 1 over 6, 1 over 36.

Â And this is 1 over 6, 1 over 6 equal 1, 36.

Â So the probability of seeing this is this plus this area, right?

Â So it is.

Â 8:56

Okay.

Â And then again we can get what is the

Â probability, for example, that x plus y is 4.

Â And we just have to list all the possibilities, which are either x

Â is, the first time I rolled the dice it was, I saw 1.

Â Then I saw 3, or the first time it's 2 and

Â the second time is 2 or the, sorry this is x.

Â Or the first time is 3 and the second time is 1.

Â And using similar, computation like this, the probability of this happening, this

Â event, 1 and 3 is 1 over 36, 1 over 36, 1 over 36.

Â So the probability that the sum is 4 is 3 over 36.

Â We can re-repeat this all the toward 12, what

Â is the probability of seeing a sum of 12?

Â Again, in this case, the only possibility is seeing

Â 6 first time and seeing 6 the second time.

Â We end up with a probability of 1 over 36.

Â So now we can say what is the expected value of the sum?

Â What is the expected sum that we, okay, we would see

Â from this trial where we roll the dice, the dice twice?

Â It's basically the probability of observing any of the sums.

Â I or we can say probability of whatever variable of x plus y times x plus y.

Â 10:21

And we sum over all possible values of xy, x plus y equal 2, 2 16th.

Â So this notation here is saying that the sum x plus y can be

Â 2 or 3 or 4 all the way to, to 12, sorry, not 16.

Â And what is the probability of observing each sum times the sum itself.

Â Which is in our case, is the probability of 2

Â times 2, plus the probability of the sum being 3 times 3, the

Â probability of 4 times 4, the probability observing 12 times 12.

Â We have seen that the probability that the sum is 2 is 1 over 36 times

Â 2 plus the probability of, that see we, we have sum of 3 is 2 over 36 times 3.

Â The

Â 11:31

So, now this is again the expected value for rolling

Â a dice twice and looking at the sum and so on.

Â But, there are even more, much more interesting

Â applications of this expected value and what, what

Â kind of value we expect to see when

Â we have a [UNKNOWN] process or a random process.

Â For example, in the case of DNA sequences, if I am having 2 sequences, A-C-C-T

Â and A-C-G-T, and I am saying that this sequence evolved from this sequence.

Â 12:03

For after a given amount of time, the question is some observe

Â these two sequences and they ask are these two sequences the same?

Â Or do they correspond?

Â Of course if I compare these two sequences,

Â I see they differ at the third position, right?

Â But the question is, given that we know that mutations happen, that they change

Â the letters, these DNA nucleotides, is this something that I would expect to see?

Â So for example, if I know that there's a probability of .25, a probability

Â of one quarter, that the position would change in the sequence, okay?

Â And every position is independent, then this is expected after a

Â certain amount of time, because if I'm saying that every letter here

Â has a probability of 1 over 4 of changing to a different

Â letter, then I would expect this after certain amount of time, right?

Â Because mutations will happen.

Â I wouldn't, I wouldn't expect this if not time has past, the

Â sequence stays the same, but if time has passed and mutation can

Â happen, then we have this notion of expectation or what is the

Â expected sequence after certain amount of time and knowing something about mutation.

Â So, in this case the notion of expectation, and the

Â expected value is central to us being able to say

Â whether this sequence and this sequence are related, versus are

Â they different because they have nothing to do with each other.

Â