0
$\begingroup$

Consider The following four random binary variables:

enter image description here

Given the following Bayesian network:

enter image description here

With the following conditional probability tables:

enter image description here

I want to calculate the probability that the sprinkler was on overnight, given that Tracey’s grass is wet, meaning I want $\mathbb{P}(S=1\mid T=1)$.

My attempt at this is:

$$\mathbb{P}(S=1\mid T=1)=\frac{\mathbb{P}(T=1\mid S=1)\mathbb{P}(S=1)}{\mathbb{P}(T=1)}=$$ $$\frac{\sum_R\mathbb{P}(T=1\mid R,S=1)\mathbb{P}(S=1)}{\sum_{R,S}\mathbb{P}(T=1\mid R,S)\mathbb{P}(R,S)}=$$ $$\frac{\sum_R\mathbb{P}(T=1\mid R,S=1)\mathbb{P}(S=1)}{\sum_{R,S}\mathbb{P}(T=1\mid R,S)\mathbb{P}(R)\mathbb{P}(S)}$$

And then, numerator is:

$$\mathbb{P}(T=1\mid R=1,S=1)\mathbb{P}(S=1) + \mathbb{P}(T=1\mid R=0,S=1)\mathbb{P}(S=1)=$$ $$1\cdot 0.1+0.9\cdot 0.1=0.19$$

Denominator:
$$\sum_{R,S}\mathbb{P}(T=1\mid R,S)\mathbb{P}(R)\mathbb{P}(S)=$$ $$\mathbb{P}(T=1\mid R=1,S=1)\mathbb{P}(R=1)\mathbb{P}(S=1) +$$ $$\mathbb{P}(T=1\mid R=1,S=0)\mathbb{P}(R=1)\mathbb{P}(S=0) +$$ $$\mathbb{P}(T=1\mid R=0,S=1)\mathbb{P}(R=0)\mathbb{P}(S=1) +$$ $$\mathbb{P}(T=1\mid R=0,S=0)\mathbb{P}(R=0)\mathbb{P}(S=0) =$$ $$1\cdot 0.2\cdot 0.1+1\cdot 0.2\cdot 0.9+0.9\cdot 0.8\cdot 0.1+0\cdot 0.8\cdot 0.9=0.272$$

And overall I get: $\frac{0.19}{0.272}=0.698...$

But the book has a completely different answer... It is not just the final result that is different, but also their work is confusing to me:
enter image description here

How did the go from 3.2.13 to 3.2.14, and more importantly, what's wrong with my answer?

$\endgroup$

1 Answer 1

1
$\begingroup$

In your working of the problem, you correctly write the denominator of your result as

$$\begin{align} \sum_{R,S}\mathbb{P}(T=&1\mid R,S)\mathbb{P}(R)\mathbb{P}(S) = \\ &\mathbb{P}(T=1\mid R=1,S=1)\mathbb{P}(R=1)\mathbb{P}(S=1) + \\ &\mathbb{P}(T=1\mid R=1,S=0)\mathbb{P}(R=1)\mathbb{P}(S=0) + \\ &\mathbb{P}(T=1\mid R=0,S=1)\mathbb{P}(R=0)\mathbb{P}(S=1) + \\ &\mathbb{P}(T=1\mid R=0,S=0)\mathbb{P}(R=0)\mathbb{P}(S=0) \end{align}$$

But in your numerator, you forgot to account for the fact that the probability is conditioned on $R=1$; you need the factor $\mathbb{P}(R=1)$ or $\mathbb{P}(R=0)$ in the calculation of the numerator just like you did in the denominator. The numerator is simply the two terms of the denominator that belong to the event $S=1$:

$$\begin{align} &\mathbb{P}(T=1\mid R=1,S=1)\mathbb{P}(R=1)\mathbb{P}(S=1) + \\ &\mathbb{P}(T=1\mid R=0,S=1)\mathbb{P}(R=0)\mathbb{P}(S=1) \end{align}$$

The calculation from the book is for the probability that Tony's sprinkler was on, given that Tony's grass is wet and Jack's grass is wet. It seems to me that the step from 3.2.13 to 3.2.14 assumes that $J$ and $T$ are conditionally independent given $R,S$. I have not yet been able to convince myself that this assumption is true.

$\endgroup$
1
  • $\begingroup$ Ohh... Great, Thanks! $\endgroup$ Mar 18, 2015 at 13:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .