- #1
tmt1
- 234
- 0
Given this base data (taken from Graphical Models )$P(C) = 0.5$
$P(\lnot C) = 0.5$
$P(R | C) = 0.8$
$P(R | \lnot C) = 0.2$
$P(\lnot R | C) = 0.2$
$P(\lnot R | \lnot C) = 0.8$
$P(S | C) = 0.1$
$P(S | \lnot C) = 0.5$
$P( \lnot S | \lnot C) = 0.5$
$P( \lnot S | C) = 0.9$
$P(W | \lnot S, \lnot R) = 0.0$
$P(W | S, \lnot R) = 0.9$
$P(W | \lnot S, R) = 0.9$
$P(W | S, R) = 0.99$
$P(\lnot W | \lnot S, \lnot R) = 1.0$
$P(\lnot W | \ S, \lnot R) = 0.1$
$P(\lnot W | \lnot S, R) = 0.1$
$P(\lnot W | S, R) = 0.01$
Now, I need to calculate $P(S | W)$ or $P(S = 1 | W = 1)$ which is equal to
$\frac{P(S = 1, W = 1)}{P(W = 1)}$
or
$\frac{\sum_{c, r}^{} P(C = c, S = 1, R = r, W = 1)}{ P(W = 1)}$
I'm not sure how to begin calculating this, I think I have to use the chain rule though.
I think we need to find all the permutations of of c and r, which is these 4:
$P(R | C) = 0.8$
$P(R | \lnot C) = 0.2$
$P(\lnot R | C) = 0.2$
$P(\lnot R | \lnot C) = 0.8$
So in the first example, $P(R | C) = 0.8$, then $P(C) = 0.5$ and $P(R) = 0.8$ so for the first iteration of the sigma expression it would be
$P(C = 0.5, S = 1, R = 0.8, W = 1)$ and then I need to find the chain rule for this permutation? How would this be calculated?
$P(\lnot C) = 0.5$
$P(R | C) = 0.8$
$P(R | \lnot C) = 0.2$
$P(\lnot R | C) = 0.2$
$P(\lnot R | \lnot C) = 0.8$
$P(S | C) = 0.1$
$P(S | \lnot C) = 0.5$
$P( \lnot S | \lnot C) = 0.5$
$P( \lnot S | C) = 0.9$
$P(W | \lnot S, \lnot R) = 0.0$
$P(W | S, \lnot R) = 0.9$
$P(W | \lnot S, R) = 0.9$
$P(W | S, R) = 0.99$
$P(\lnot W | \lnot S, \lnot R) = 1.0$
$P(\lnot W | \ S, \lnot R) = 0.1$
$P(\lnot W | \lnot S, R) = 0.1$
$P(\lnot W | S, R) = 0.01$
Now, I need to calculate $P(S | W)$ or $P(S = 1 | W = 1)$ which is equal to
$\frac{P(S = 1, W = 1)}{P(W = 1)}$
or
$\frac{\sum_{c, r}^{} P(C = c, S = 1, R = r, W = 1)}{ P(W = 1)}$
I'm not sure how to begin calculating this, I think I have to use the chain rule though.
I think we need to find all the permutations of of c and r, which is these 4:
$P(R | C) = 0.8$
$P(R | \lnot C) = 0.2$
$P(\lnot R | C) = 0.2$
$P(\lnot R | \lnot C) = 0.8$
So in the first example, $P(R | C) = 0.8$, then $P(C) = 0.5$ and $P(R) = 0.8$ so for the first iteration of the sigma expression it would be
$P(C = 0.5, S = 1, R = 0.8, W = 1)$ and then I need to find the chain rule for this permutation? How would this be calculated?
Last edited: