Diagnosis Example : Peptic Ulcer or Viral Gastroenteritis

Warning: This example is not to be taken as a real clinical example. Rather, it is just an example for the purpose of easy understanding of the tool. Please consult your doctor for any real clinical reasons.

Say, you have nausea and vomiting. You are suspecting that it could be either a Peptic Ulcer or Viral Gastroenteritis.

Now, let's start Bayesian Doctor


Select Diachronic Interpretation and add your two hypotheses as shown below.


Now, Click the Lock button to lock your beliefs.


After observations are added, it will look like this.


Now, let's start the causal discovery.

You will see the causal discovery section as below:


If you already know the probability of observing Nausea, when someone really has Peptic Ulcer, then using the slider you can set that probability accordingly.

But if you do not know, you can click the elicit probability button to elicit that probability.

List the symptoms as shown below. You should set the probability of symptoms for the given cause (diseases). Here is a random setup. (Warning: again, this is a random setup. That means, this probability is not shown based on medical information, rather it is based on personal belief. Consult medical information to find the correct probabilities for various symptoms)


If you do not know the probability of any symptoms at all, you can let this program infer the probabilities based on the Principle of Insufficient Reason. According to the principle of insufficient reason, if you have no reason or evidence or information to believe that one event (or hypothesis) is more probable than another, then all events (or hypotheses) can be assigned with equal probability. No need to set any probability numbers in this case.

Therefore, if you do not know the probability of any symptoms at all, uncheck the checkbox here and all probabilities of the symptoms will be assigned equally.

Principle_of_ Insufficient_ Reason

Click OK and you will see the likelihood probability is updated for nausea.


Now, do the same for Viral Gastroenteritis. Again, the probability of symptoms shown here is not based on medical information. Rather it is an example showing, how to brainstorm and update your beliefs. So, if you have some initial beliefs about some symptoms, how you can derive the probability of the root hypothesis. That's all about it. If you are a doctor and if you know the probabilities of symptoms, enter the probabilities and you will get better results.

symptoms_of_ Viral_ Gastroenteritis

Once you click OK, the likelihood of Viral Gastroenteritis will be updated as shown below.


Once you click the Update Beliefs button, your hypotheses will be updated according to the Baye's theorem as shown below.


Same like Nausea, do the Causal Discovery for Vomiting and update the beliefs. Last time, you found that the probability of observing Nausea given Peptic Ulcer is True, is 0.2 (or 20%). As we assume that, for the sake of simplicity, only one of the symptom may show up for a cause, (warning: that is not true in real life. In real life, more than one symptom can show up for the same cause at the same time. This example is just for learning the tool), we can infer that, the probability of observing Vomiting given Peptic Ulcer is true, is 20%. Same like that, the probability of observing Vomiting, given Viral Gastroenteritis is true is 13%. So, lets set up like that,


Once you update the beliefs, the final evaluation will be shown up like this:

belief_updated_final 1


So, you can see that your belief of Peptic Ulcer is updated as 71% and the belief of Viral Gastroenteritis is updated as 29%. So, until now, you can think that there is a high chance that the Peptic Ulcer is the cause. Also, notice the Belief history, which shows how your beliefs were updated over time.

Then, in the next day, you started to experience fever. So you include that observation and perform the causal discovery session again. Notice that, fever is not in the list of possible symptoms for Peptic Ulcer, so we set the likelihood of fever given Peptic Ulcer is true, is 0%. But, as fever is one of the symptoms of Viral Gastroenteritis, we can set the likelihood of fever given Viral Gastroenteritis is true, is 13%.


Now, click the Update Beliefs button. You will see the following updated beliefs.


This time, the hypothesis 'Peptic Ulcer' is rejected.


Notice the Belief history chart. The belief of Peptic Ulcer went higher by 2 observations and then went down to all the way 0 after the 3rd observation. That is the true example of Diachronic Interpretation. Updating beliefs over time, upon evidence.


The tooltip on the data point in the Belief History also shows the observations that caused the belief change.


Last updated on 11 August 2018, Saturday, 12:34:44 PM
If you have any questions or concerns about this tutorial, Please feel free to share your comment.