# How to formalize the following intutive reasoning (Bayes' rule)?

Disclaimer: I am not a statistician, but a computer scientist working a lot with probability distributions. I am asking this question to help me understand how statistical frameworks and terminology can be applied formally to the reasoning below.

Consider the following example, e.g. borrowed from a tweet of E. Yudkowski:

Suppose you think you're 80% likely to have left your laptop power adapter somewhere inside a case with 4 otherwise-identical compartments. You check 3 compartments without finding your adapter. What's the probability that the adapter is inside the remaining compartment?

There are two intuitive answers to this question:

(A) 80%. If I was 80% sure the adapter is in the case before, and I rule out 3 compartments, then the entire 80% suspicion now falls to the fourth;

(B) 50%. Compartment 4 and "compartment 5" (everywhere else) are equally likely.

It is straightforward to formally obtain answer (B) using conditional probability. Let the binary random variable $$X$$ indicate whether the adapter is in the case or not, $$P(X=1)=0.8$$. If $$X=1$$, choose $$Y$$ uniformly in $$\{1,\ldots,4\}$$, otherwise let $$Y=5$$. Define the indicator variable $$I = [Y>3]$$. Then

$$P(Y=4|I=1) = 0.5$$

I found it much harder to give a mathematical explanation for answer (A), i.e. the 80%. My question is: How to formalize that line of reasoning?

Here is one way to do it: If we "fix" the value $$X=x$$, then the conditional probabilities agree with the conclusions of reasoner A: $$P(Y=4|I=1,X=1) = 1$$ and $$P(Y=5|I=1,X=0)=1$$. Now, if we marginalize out $$X$$, we obtain as desired

$$\sum_{x \in \lbrace 0,1\rbrace} P(Y=4|I=1, X=x)P(X=x) = 0.8$$

Is there a name or notation for this mode of inference? It reminds me of Jeffrey's update where a variable is similarly "fixed" during inference. I'm not very familiar with causal inference, but is it possible to describe reasoning (A) in those terms, e.g. do-calculus? I'm happy about any pointers or bits of terminology. Thanks

• Surely A is difficult to formalise because it's wrong? Commented Apr 3, 2023 at 9:56
• A and B model the situation differently; my question is which model corresponds to the reasoning of A :) Commented Apr 3, 2023 at 10:05

The issue here is that your prior does not fully specify the joint distribution of the relevant events at issue. If you let $$\mathscr{E}_1,\mathscr{E}_2,\mathscr{E}_3,\mathscr{E}_4$$ denote the individual events that each of the four respective compartments contain the laptop (only one of which can be true at most), then all you have specified in the prior probability:

$$\pi \equiv \mathbb{P}(\mathscr{E}_1 \cup \mathscr{E}_2 \cup \mathscr{E}_3 \cup \mathscr{E}_4).$$

This is not a full specification of prior probabilities for each of the possible outcomes. However, suppose you are further willing to specify the prior probability of finding the laptop in a particular compartment if it is in any of the compartments. We will denote these probabilities as:

$$\phi_i \equiv \mathbb{P}(\mathscr{E}_i | \mathscr{E}_1 \cup \mathscr{E}_2 \cup \mathscr{E}_3 \cup \mathscr{E}_4).$$

Now, if you observe that compartments 1-3 are empty then your posterior probability that the laptop is in the remaining compartment is:

\begin{align} \mathbb{P}(\mathscr{E}_4 | \bar{\mathscr{E}}_1 \cap \bar{\mathscr{E}}_2 \cap \bar{\mathscr{E}}_3) &= 1 - \mathbb{P}(\bar{\mathscr{E}}_4 | \bar{\mathscr{E}}_1 \cap \bar{\mathscr{E}}_2 \cap \bar{\mathscr{E}}_3) \\[14pt] &= 1 - \frac{\mathbb{P}(\bar{\mathscr{E}}_1 \cap \bar{\mathscr{E}}_2 \cap \bar{\mathscr{E}}_3 \cap \bar{\mathscr{E}}_4)}{\mathbb{P}(\bar{\mathscr{E}}_1 \cap \bar{\mathscr{E}}_2 \cap \bar{\mathscr{E}}_3)} \\[6pt] &= 1 - \frac{1 - \mathbb{P}(\mathscr{E}_1 \cup \mathscr{E}_2 \cup \mathscr{E}_3 \cup \mathscr{E}_4)}{1 - \mathbb{P}(\mathscr{E}_1 \cup \mathscr{E}_2 \cup \mathscr{E}_3)} \\[6pt] &= 1 - \frac{1 - (\phi_1 + \phi_2 + \phi_3 + \phi_4) \pi}{1 - (\phi_1 + \phi_2 + \phi_3) \pi} \\[6pt] &= \frac{\phi_4 \pi}{1 - (\phi_1 + \phi_2 + \phi_3) \pi}. \\[6pt] \end{align}

In your particular specification of the problem you have $$\pi = 0.8$$ which means that the resulting posterior probability that the laptop is in the remaining compartment can be anywhere from zero up to 80%. (The latter result is obtained by taking $$\phi_1 = \phi_2 = \phi_3 = 0$$ and $$\phi_4 = 1$$.) Suppose alternatively that you are of the view that if the laptop is in one of the compartments then it is equally likely to be in any of them. This is reflected by choosing prior probabilities $$\phi_1 = \phi_2 = \phi_3 = \phi_4 = \tfrac{1}{4}$$ which then leads to the posterior probability 50%.

• If specifying the $\phi_i$ is part of the prior, then they should all be equal by symmetry (all compartments are indistinguishable), so your reasoning gives answer (B). The case $\phi_1 = \phi_2 = \phi_3 = 0$ occurs after incorporating the evidence, so my questions remains how to systematically update from the prior assignment to the latter one. Commented Apr 3, 2023 at 11:32
• @Dario: Not necessarily. What if one of the compartments is laptop sized and the others are matchbox size? Or what if the person knows they always use one particular compartment in preference to the others? There are many reasons that there might be a lack of symmetry.
– Ben
Commented Apr 3, 2023 at 11:36
• Fair point! But this is not what I was getting at with the example (the symmetry assumption is made clear both in the tweet "otherwise-identical compartments" and when I choose $Y|X=1$ to be uniform). Commented Apr 3, 2023 at 11:45
• Fair enough, but even with identical compartments there can be behavioural patterns on the part of the user that could lead to non-symmetry. Certainly fine to make an assumption here and proceed accordingly, but just don't make the mistake of thinking that the simplifying assumption is necessitated by the problem.
– Ben
Commented Apr 11, 2023 at 0:46