Probability calculation with Bayesian Networks

In summary, the conversation discusses the calculation of $P(S|W)$ or $P(S=1|W=1)$ by using the chain rule and the assumed independence of variables. The formula for calculating $P(S=1,W=1)$ is also provided, and it involves finding the sum of all permutations of the variables. The final answer for $P(S=1,W=1)$ is 0.2781.
  • #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?
 
Last edited:
Physics news on Phys.org
  • #2
Hi tmt,

The article explains, with the assumed independence of R and S, and with the assumed independence of W and C, that:
$$P(C,S,R,W)=P(C)\,P(S|C)\,P(R|C)\,P(W|S,R)$$
And that:
\begin{array}{lcl}
P(S=1,W=1)
&=& \sum_{c,r} P(C=c, S=1, R=r, W=1) \\
&=& P(C=0, S=1, R=0, W=1) + P(C=0, S=1, R=1, W=1) \\
&& + P(C=1, S=1, R=0, W=1) + P(C=1, S=1, R=1, W=1) \\
&=& P(\lnot C, S, \lnot R, W) + ... \\
&=& P(\lnot C)\,P(S|\lnot C)\,P(\lnot R|\lnot C)\,P(W|S,\lnot R) + ... \\
&=& 0.5 \cdot 0.5 \cdot 0.8 \cdot 0.9 + ... \\
&=& 0.2781
\end{array}
 

FAQ: Probability calculation with Bayesian Networks

What is a Bayesian Network?

A Bayesian Network is a graphical model that represents the probabilistic relationships among a set of variables. It consists of nodes and directed edges, where the nodes represent variables and the edges represent the dependencies between them.

How is probability calculated in a Bayesian Network?

In a Bayesian Network, probability is calculated using Bayes' theorem, which states that the probability of a particular event occurring is dependent on prior knowledge or information about related events. This prior knowledge is represented by the conditional probabilities assigned to each variable in the network.

What is the difference between Bayesian Networks and other probabilistic models?

Bayesian Networks differ from other probabilistic models in that they explicitly represent the dependencies between variables, allowing for more accurate probability calculations. They also allow for the incorporation of new information and updating of probabilities as new data is obtained.

Can Bayesian Networks be used for both discrete and continuous variables?

Yes, Bayesian Networks can be used for both discrete and continuous variables. For discrete variables, the probabilities are represented as discrete values, while for continuous variables, probability distributions are used to represent the range of possible values.

How are Bayesian Networks used in real-world applications?

Bayesian Networks are used in a wide range of applications, including risk assessment, medical diagnosis, financial analysis, and natural language processing. They are also commonly used in artificial intelligence and machine learning for decision making and prediction tasks.

Similar threads

Replies
2
Views
1K
Replies
36
Views
3K
Replies
1
Views
1K
Replies
6
Views
2K
Replies
15
Views
2K
Back
Top