Imagine this very common situation. You have to go to the movies after office. There is a 50% chance you will get delayed at work. There are 3 routes A, B and C for you to get to the cinema hall from your office, and you are likely to take them with probabilities 0.4, 0.2 and 0.4 respectively.
Whether you reach the cinema hall on time or not, depends on whether you got delayed at work and which route you took. The probabilities of reaching on time or not vary as in the table
You have different queries to make. For example, given that you left work late but still reached on time, what is the route you are most likely to have taken ? Or, given that you chose route C, what is the likelihood that you reached the cinema hall on time ? Or, given that you started late and took route C what is the likelihood that you reached the hall on time ?
The answers to these questions can easily be answered by constructing a Bayesian network for the problem. This is how the network looks like.
For every node you specify the probability values. For the 'LeaveOffice' node variable you specify the two probability values for leaving office late and on time (50%). For the 'RouteTaken' node you specify the probability values for routes A, B and C (0.4,0.2 and 0.4). Finally for the 'ReachOnTime' node variable you specify the probability values conditional to joint of the LeaveOffice and RouteTaken events, as in the table above.
An analysis of this network gives the following answers to our questions.
Q1. Given that you left work late but still reached on time, what is the route you are most likely to have taken ?
The answer is C, which is clear from the output of the analysis
Q2. Given that you chose route C, what is the likelihood that you reached the cinema hall on time ?
The answer is 50%.
Q3. Given that you started late and took route C what is the likelihood that you reached the hall on time ?
The answer is 40%
There are many other questions like these that the Bayesian net can answer.
Whether you reach the cinema hall on time or not, depends on whether you got delayed at work and which route you took. The probabilities of reaching on time or not vary as in the table
You have different queries to make. For example, given that you left work late but still reached on time, what is the route you are most likely to have taken ? Or, given that you chose route C, what is the likelihood that you reached the cinema hall on time ? Or, given that you started late and took route C what is the likelihood that you reached the hall on time ?
The answers to these questions can easily be answered by constructing a Bayesian network for the problem. This is how the network looks like.
For every node you specify the probability values. For the 'LeaveOffice' node variable you specify the two probability values for leaving office late and on time (50%). For the 'RouteTaken' node you specify the probability values for routes A, B and C (0.4,0.2 and 0.4). Finally for the 'ReachOnTime' node variable you specify the probability values conditional to joint of the LeaveOffice and RouteTaken events, as in the table above.
An analysis of this network gives the following answers to our questions.
Q1. Given that you left work late but still reached on time, what is the route you are most likely to have taken ?
The answer is C, which is clear from the output of the analysis
Q2. Given that you chose route C, what is the likelihood that you reached the cinema hall on time ?
The answer is 50%.
Q3. Given that you started late and took route C what is the likelihood that you reached the hall on time ?
The answer is 40%
There are many other questions like these that the Bayesian net can answer.
Output images taken using the UnBBayes software. ( UnBBayes is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public Licence as published by the Free Software Foundation, either version 3 of the license, or (at your option) any later version. )





No comments:
Post a Comment