# How do I calculate the conditional probability of a Caesar cipher?

I have a frequency distribution of letters for the plaintext and the ciphertext.

I'm trying to determine the conditional probabilities to identify the plaintext/ciphertext pairings.

If I encrypt with Caesar cipher with the key of $$3$$, then $$e$$ will become $$h$$.

As I understand it, the conditional probability of $$\Pr(M=e\mathbin|C=h)$$ should be $$1$$ (or very close to it).

How do I calculate the conditional probability to prove that $$\Pr(M=e\mathbin|C=h) = 1$$?

• Oops sorry. It's deleted now. How do I actually calculate the conditional probability? I understand the expected result but not how to calculate it. – huffandpuff Jan 29 '20 at 18:02
• If P(M=e) = 0.012702, P(C=h) = 0.012702. To get P(M=e|C=h), the calculation will be (P(C=h|M=e)*P(M=e))/P(C=h). Where P(C=h|M=e) is1/26. Is calculation correct? – huffandpuff Jan 29 '20 at 19:59