---
# System prepended metadata

title: Untitled

---

$$P(R|W) = \frac{P(W|R)}{P(W)}* P(R)$$

$$P(W|R) = P( (W|S) | R) * P(S|R) + P( (W|\hat{S}) | R) * P(\hat{S} | R)$$
$$P(W|R) = 0.99 * 0.01 + 0.8 * 0.99 = 0.8$$

$$P(R|W) = \frac{0.16}{P(W)}$$ 

Now:

$$P(\hat{R}|W) = \frac{P(W|\hat{R})}{P(W)}* P(\hat{R})$$

$$P(W|\hat{R}) = 0.9 * 0.4 = 0.36$$

$$P(\hat{R}|W) = \frac{0.36 * 0.8} {P(W)} = \frac{0.288}{P(W)}$$

Assuming that $$P(R|W) + P(\hat{R}|W) = 1$$ and because $P(W)$ is constant

$$P(R|W) = \frac{0.16}{0.16 + 0.28} = 0.36$$