Basic Understanding of Bayesian Belief Networks

Bayesian Belief Network is a graphical representation of different probabilistic relationships among random variables in a particular set. It is a classifier with no dependency on attributes i.e it is condition independent. Due to its feature of joint probability, the probability in Bayesian Belief Network is derived, based on a condition β€” P(attribute/parent) i.e probability of an attribute, true over parent attribute.

(Note: A classifier assigns data in a collection to desired categories.)

  • Consider this example:

  • In the above figure, we have an alarm β€˜A’ – a node, say installed in a house of a person β€˜gfg’, which rings upon two probabilities i.e burglary β€˜B’ and fire β€˜F’, which are – parent nodes of the alarm node. The alarm is the parent node of two probabilities P1 calls  β€˜P1’ & P2 calls β€˜P2’ person nodes.
  • Upon the instance of burglary and fire, β€˜P1’ and β€˜P2’ call person β€˜gfg’, respectively. But, there are few drawbacks in this case, as sometimes β€˜P1’ may forget to call the person β€˜gfg’, even after hearing the alarm, as he has a tendency to forget things, quick.  Similarly, β€˜P2’, sometimes fails to call the person β€˜gfg’, as he is only able to hear the alarm, from a certain distance.

Q) Find the probability that β€˜P1’ is true (P1 has called β€˜gfg’), β€˜P2’ is true (P2 has called β€˜gfg’) when the alarm β€˜A’ rang, but no burglary β€˜B’ and fire β€˜F’ has occurred.  

=> P ( P1, P2, A, ~B, ~F) [ where- P1, P2 & A are β€˜true’ events and β€˜~B’ & β€˜~F’ are β€˜false’ events]

[ Note: The values mentioned below are neither calculated nor computed. They have observed values ]

Burglary β€˜B’ –

  • P (B=T) = 0.001 (β€˜B’ is true i.e burglary has occurred)
  • P (B=F) = 0.999  (β€˜B’ is false i.e burglary has not occurred)

Fire β€˜F’ –

  • P (F=T) = 0.002 (β€˜F’ is true i.e fire has occurred)
  • P (F=F) = 0.998 (β€˜F’ is false i.e fire has not occurred)

Alarm β€˜A’ –

B F P (A=T) P (A=F)
T T 0.95 0.05
T F 0.94 0.06
F T 0.29 0.71
F F 0.001 0.999
  • The alarm β€˜A’ node can be β€˜true’ or β€˜false’ ( i.e may have rung or may not have rung). It has two parent nodes burglary β€˜B’ and fire β€˜F’ which can be β€˜true’ or β€˜false’ (i.e may have occurred or may not have occurred) depending upon different conditions.

Person β€˜P1’ –

A P (P1=T) P (P1=F)
T 0.95 0.05
F 0.05 0.95
  • The person β€˜P1’ node can be β€˜true’ or β€˜false’ (i.e may have called the person β€˜gfg’ or not) . It has a parent node, the alarm β€˜A’, which can be β€˜true’ or β€˜false’ (i.e may have rung or may not have rung ,upon burglary β€˜B’ or fire β€˜F’).

Person β€˜P2’ –

A P (P2=T) P (P2=F)
T 0.80 0.20
F 0.01 0.99
  • The person β€˜P2’ node can be β€˜true’ or false’ (i.e may have called the person β€˜gfg’ or not). It has a parent node, the alarm β€˜A’, which can be β€˜true’ or β€˜false’ (i.e may have rung or may not have rung, upon burglary β€˜B’ or fire β€˜F’).

Solution: Considering the observed probabilistic scan –

With respect to the question β€”  P ( P1, P2, A, ~B, ~F) , we need to get the probability of β€˜P1’. We find it with regard to its parent node – alarm β€˜A’. To get the probability of β€˜P2’, we find it with regard to its parent node β€” alarm β€˜A’.

We find the probability of alarm β€˜A’ node with regard to β€˜~B’ & β€˜~F’ since burglary β€˜B’ and fire β€˜F’ are parent nodes of alarm β€˜A’. 

From the observed probabilistic scan, we can deduce – 

 P ( P1, P2, A, ~B, ~F)

= P (P1/A) * P (P2/A) * P (A/~B~F) * P (~B) * P (~F)

= 0.95 * 0.80 * 0.001 * 0.999 * 0.998

= 0.00075