Either the message is equal to a and the key is equal to 1.

Or, in that case we shift our message by one position and indeed get

the ciphertext b, or the message is equal to z and the key is equal to 2.

Those are the only two ways that we can end up with a ciphertext being equal to

the character b.

And now we just have to compute these probabilities.

So the probability that the ciphertext is equal to the character b is equal to

the probability that the message is equal to a and the key is equal to 1,

plus the probability that the message is equal to z and the key is equal to 2.

Because the message and

the key are independent, those become the, just the products of the two terms.

So we have the product sorry the, we have the probability that M equals a times

the probability of K equalling 1, plus the probability that M is equal to z,

times the probability that K is equal to 2.

And now we just plug in the known values for those different probabilities.

Right, the probability that M, is equal to a, we said was 0.7.

The probability that k is equal to 1 is 1 over 26 and

the probability that m is equal to z is 0.3.

The probability that the key is equal to 2 is 1 over 26.

Adding that all together, we see that the total probability with which

the ciphertext is equal to the character b is exactly 1 over 26.

'Kay, nothing magical, but just going through the steps,

I think clarifies a little what we mean, what we meant on the previous slide.

Taking another example, a slightly more complicated one,

we'll again consider the shift cipher, but

now let's look at a different distribution over the message space.

So now we'll assume that we have two possible messages that can be sent,

like before, but they're now longer than one character each.

So we have that with probability one half, the message is equal to the string O-N-E.

And with probability one half, the message is equal to the string T-E-N.

Right? One or ten.