# Decision network example

I am reading this example, but could you explain a little more. I don't get the part where it says "then we Normalize"... I know

P(sun) * P(F=bad|sun)  = 0.7*0.2 = 0.14
P(rain)* P(F=bad|rain) = 0.3*0.9 = 0.27


But where do they get

W    P(W | F=bad)
-----------------
sun     0.34
rain    0.66


Example from

-

Research has shown that people have difficulty reasoning in terms of probabilities but can do so accurately when presented with the same questions in terms of frequencies. So, let's consider a closely related setting where the probabilities are expressed as numbers of occurrences:

• In 100 similar situations, it rained 30 times and was sunny 70 times. This matches P(W=Sun) = 0.7 = 70/100 and P(W=Rain) = 0.3 = 30/100.

• From P(F=good|Sun) = 0.8 we compute that 0.8 * 70 = 56 times F will be "good" when W is "sun". Likewise, from P(F=bad|Sun) = 0.2 we compute that 0.2 * 70 = 14 times F will be "bad" when W is "sun".

• From P(F=good|Rain) = 0.1 we compute that 0.1 * 30 = 3 times F will be "good" when W is "rain" and from P(F=bad|Rain) = 0.9 we compute that 0.9 * 30 = 27 times F will be "bad" when W is "rain".

If F is "bad", what can we say? Well, this situation happened 14 + 27 = 41 times. In 14/41 = 0.34 of those times W was "sun"; therefore, we expect P(W=Sun|F=Bad) = 0.34. In the other 27/41 = 0.66 of those times W was "rain"; therefore, P(W=Rain|F=Bad) = 0.66.

Thus, "normalization" means we focus only on those situations where the prior condition holds (F=Bad in the example) and rescale the probabilities to sum to unity (as they must).

This is an archetypal example of Bayes' Theorem which in mathematical terms says that to compute conditional probabilities, focus and rescale.

-

This is a straight forward analysis of Bayes Theorem. Now Bayes Theorem reads:

$$P(H|F,I)=\frac{P(H|I)P(F|H,I)}{P(F|I)}$$

So in your example you have two "hypothesis" SUN and RAIN. $F$ stands for the the forecast, and $I$ for the prior information (or assumptions). The "I" has not been included explicitly in your question, but it is always there. These create 2 equations,

$$P(SUN|F,I)=\frac{P(SUN|I)P(F|SUN,I)}{P(F|I)}$$ $$P(RAIN|F,I)=\frac{P(RAIN|I)P(F|RAIN,I)}{P(F|I)}$$

Now you have been given all probabilities except for the $P(F|I)$. You can explicitly calculate this, but a quicker way is to get rid of it by taking the odds of SUN to RAIN.

$$\frac{P(SUN|F,I)}{P(RAIN|F,I)}=\frac{\frac{P(SUN|I)P(F|SUN,I)}{P(F|I)}}{\frac{P(RAIN|I)P(F|RAIN,I)}{P(F|I)}}=\frac{P(SUN|I)P(F|SUN,I)}{P(RAIN|I)P(F|RAIN,I)}$$

And this odds ratio is given by $\frac{0.14}{0.27}$. And then you can use the exhaustiveness of the two hypothesis - because $$P(SUN|I)+P(RAIN|I)=1\rightarrow P(SUN|F,I)+P(RAIN|F,I)=1$$ $$\rightarrow P(RAIN|F,I)=1-P(SUN|F,I)$$

. And you get:

$$\frac{P(SUN|F,I)}{1-P(SUN|F,I)}=\frac{0.14}{0.27}$$

And re-arranging for $P(SUN|F,I)$ gives:

$$P(SUN|F,I)=\frac{\frac{0.14}{0.27}}{1+\frac{0.14}{0.27}}=\frac{0.14}{0.41}=0.34$$

-