In one of our lessons on Bayesian Networks, our teacher wrote this derivation down:
$$P(R | H, S) = \frac{P(H|R,S)P(R|S)}{P(H|S)}$$
I'm having serious trouble in trying to verify that this derivation is correct. This is what I found:
$P(R | H, S) = \frac{P(R, H, S)}{P(R, S)}$ (Conditional probability law)
And now (if the teacher's statement is correct) $\frac{P(R, H, S)}{P(R, S)} = \frac{P(H|R,S)P(R|S)}{P(H|S)}$ should hold. I'm stuck at this point trying to verify the equality. What am I doing wrong?
\begin{align} \frac{P(H|R,S)P(R|S)}{P(H|S)} &= \frac{\frac{P(H,R,S)}{P(R,S)}\cdot\frac{P(R,S)}{P(S)}}{\frac{P(H,S)}{P(S)}}\\ &=\frac{P(H,R,S)}{P(H,S)} \end{align}
Your mistake is corrected as follows:
$$P(R | H, S) = \frac{P(R, H, S)}{P(\color{red}{H}, S)}$$