Green poop, leafy greens and probability of disease, how can I formalize this reasoning? Read everything before making your judgment, this is a serious probability question, it is not a joke.
Today when I woke up and went to do my usual business, my poop was green. I got worried, and very nervous, and thought that I might have a serious disease.
Mathematically, we can say that after I saw my poop was green, I updated my probability
$$P(\text{disease}|\text{green poop}, \text{everything else I did yesterday}) = \text{high}$$
So continuing our story, I was super worried and then searched the internet for "what causes green poop." Then I learned that eating leafy greens causes green poop! And yesterday I did eat leafy greens. So now, after this information, my new assessment was:
$$P^*(\text{disease}|\text{green poop}, \text{everything else I did yesterday}) = \text{low}$$
Where I'm using $P^*$ here to represent my updated probability measure. But this is the trick where I am at a loss,  so here goes my question: how can I formalize mathematically my reasoning above? After all, all the evidence was already avaialble to me, I already knew I had eaten leafy greens. What I did not know was that they could have been an explanation for the green poop. Can you formalize mathematically exactly what type of updating I did to move from high to low probability?
 A: I use the following binary variables:

*

*Poop is green: G

*Am sick: D

*Ate leafy greens: L

First, let's see how you can reach $P(D=1|G=1) = 0.8$. While you "knew" that you had eaten leafy greens and that it could cause green poop, when you thought about it first, you only considered a disease as a potential cause. That is, you only had in mind the probabilistic graph D -> G in mind, meaning $P(D,G) = P(D)P(G|D)$. For example, $P(D=1) = 0.1$ (you felt fine other than the poop), and $P(G=1|D=1)$ is also low (you know very little diseases that cause green poop), therefore $P(D=1,G=1)$ is pretty low. So how come you have $P(D=1|G=1)=0.8$? The alternative $P(D=0|G=1)$ is even lower: yes, $P(D=0)=0.9$ is high, yet having green poop while not being sick is extremely extremely unlikely (because most days, I am fine, yet my poop is not green)! You can check that by fixing actual probabilities.
Now when you learn or are reminded about leafy greens on the internet, you update your graph and add a potential cause "leafy greens". Formally, $P(D,G,L) = P(L) P(D) P(G|D,L)$. Now, because $P(L)=1$ (I know for sure I ate greens yesterday) and $P(G=1|D=d,L=1)$ for any $d$ is high: that's what I was "reminded" about on the internet: sick or not, leafy greens cause green poop.
By Bayes rules, $P(D|G,L) \propto P(D) P(L) P(G|D,L)$ and by fixing concrete probabilities you will find a low probability of disease thanks to the high $P(G=1|D=d,L=1)$.
That's an instance of explaining away: in the V-shaped graph, when you fix the value of the effect (G), the two causes are now dependent (D and L are dependent given G). The observation that one of the cause is present will decrease the probability of the other (in our case, drastically) and vice versa: if one cause is not present, the probability of the other cause will go up (in our case, you didn't eat leafy greens so you'd still think you are sick with high probability).
I tried to find a good reference for explaining away but did not. Pearl's automobile example seems to be frequently given, for example here.
Relating this to Ben's answer
Yes, I did change the model by adding an edge in the graph, and it is not a fully "Bayesian" formalisation of the problem. I am reasoning like a scientist who incrementally builds a Bayesian model.
Your want to model your own thought process: you know that leafy greens are a relevant cause that you used to ignore, and therefore you want to put the variable I in the graph. Thanks to Ben's answer, you realize that the probabilistic graph of causes can be encoded in a very flexible way, where every possible cause can have no to a huge influence on the inference you are trying to draw, via these "gating" variables like I. I think that you were looking for Ben's answer, actually.
However, I want to point out that even though Ben's fully Bayesian model might (might only, see next paragraph) be a good (although HUGE) model for "thought processes", it does not reflect scientific elaboration of models. Imagine that I is binary, 1 if L causes G and 0 otherwise. A Bayesian scientist needs to put a prior over I, and in doing so, should think about whether L causes G. But as you said, you did not learn that $I=1$ on the internet; you were merely reminded about it. So if you had thought about it, you would have put a very probable I as a prior. In that case, you see that there is no updating going on and you just recover the analysis I provided with the second model. On the contrary, if you did not think about the cause, you would have built the first model I presented. In other words, if the Bayesian scientist is not fully satisfied with his model, he needs to build another one and his approach is not "fully Bayesian" (in the extreme, formal and dogmatic sense of the term).
Most importantly, I am still puzzled by Ben's answer, though, because he did not specify the prior over I. If we are modelling thought processes, we could see beliefs of an individual as continually updated throughout his life. For Ben's answer to be fully complete and convincing, we need the "prior" probability (before seeing the information on the internet) $P(I=1)$ to be low. Why would it be the case? I don't think the individual has been exposed to evidence for that in his life. There is something wrong.
Therefore, I am more inclined to imagine that we do approximate Bayesian inference in our heads with very partial graphs that are "instantiated" by extracting pieces of a "full knowledge graph" in an imperfect way.
I am very curious to hear Ben's opinion on that. There are probably tons of resources discussing the problem (maybe in the "objective vs subjective" or "Bayesian vs frequentist" debates?), but I'm not an expert.
A: It seems to me you are looking at the Bayes's theorem and in particular at the prior probability.
Your data ($green\;poop, \; etc$) is the same before and after checking the internet. However, initially, your prior probability is either neutral or in favour of disease since green poop is odd. After checking the internet your prior shifts in favour of not-disease and that updates the posterior towards $P(disease|green\,poop,\; etc)=low$. Mathematically, I guess you could use a beta distribution to model your prior belief more or less strongly in favour or against the disease.
A: This kind of problem can be handled using Bayesian analysis, but it requires a bit of care.  The tricky bit here is that there is a distinction between the conditioning event "ate leafy greens" and the other conditioning event "information showing that eating leafy greens causes green poo".  You already know you ate leafy greens in both scenarios, so that conditioning event is not what is changing your probability.  Rather, it is the additional information you have obtained from your internet search that is telling you that leafy greens cause green poo, and therefore lead you to reduce your inferred probability of disease.
To simplify this analysis, I will assume that the only relevant conditioning event from the previous day is that you ate leafy greens (i.e., the event "ate leafy greens" will be equivalent to "everything I did yesterday).  This removes explicit conditioning on the remainder of what happened that day.  I will use the following events:
$$\begin{align}
\mathcal{D} & & & \text{Disease}, \\[6pt]
\mathcal{G} & & & \text{Green poop}, \\[6pt]
\mathcal{L} & & & \text{Ate leafy greens}, \\[6pt]
\mathcal{I} & & & \text{Information showing that } \mathcal{L} \text{ causes } \mathcal{G}. \\[6pt]
\end{align}$$
The circumstance you are describing is that $\mathbb{P}(\mathcal{D}|\mathcal{G} \cap \mathcal{L})$ is high but $\mathbb{P}(\mathcal{D}|\mathcal{G} \cap \mathcal{L} \cap \mathcal{I}) $ is low (i.e., the addition of the new information lowers the probability that you have a disease).  There are many reasonable ways that you could be led to this outcome, but a general structure would look like the DAG below.  Disease can cause green poo, but it can also be cauesd by eating leafy greens.  (The joint path for the latter depends on the fact that the causal pathway from leafy greens to green poo is not known unless you obtain the information to that effect.)
                                                            
In this case, the effect of gaining the information that relates eating leafy greens with green poo is that it "opens the pathway" at the bottom of the DAG, and thereby provides an alternative reason to believe that green poo could occur in the absence of a disease.  This leads you to lower the conditional probability of disease accordingly.  It would be possible to formalise this analysis further by giving some appropriate probability values to the various events of interest, but I will not pursue that level of detail.  Hopefully this structural discussion assists you in understanding the nature of the inference you are making.  Suffice to say, your reduction in the inferred probability of disease is a sensible conclusion from the additional conditioning information you obtained.
A: $$statistics \neq mathematics$$
We can mathematically express probabilities (like you did two times) but they are not the real probabilities and instead only probabilities according to some model.
So a probability expression has a "probability" to fail. By how much... that depends on the quality of the model.
If your model is considered good (which is not well expressed mathematically), such that the effect of the bias of your model, having an influence on the discrepancy between calculations and reality, is negligible in comparison to the random error/variation occuring within the model, then we may consider the inaccuracies of the model negligible.
In your example we could say that your first model was not very accurate, and that is why it's result is so different from the more accurate second model. There is no contradiction.
Probabilities obtained from models, like p-values or posterior densities, are not real probabilities, and only a reflection of the real situation. These reflections can be distorted to various extents. This distortion is almost never the subject of the (mathematical) considerations/models.
