# Does this reasoning using a combination of contraposition and probabilty work?

We can write "predicate $$P$$ implies predicate $$Q$$", (AKA "100% of the time, when $$P$$ occurs, $$Q$$ occurs",) like so: $$P \implies Q$$ Analogously, we can write "90% of the time, when $$P$$ occurs, $$Q$$ occurs" as $$P \overset{\mbox{90%}}{\implies} Q$$

If we have some set of undesirable (bad), possible events $$B$$, and we have noticed empirically that around 90% of the time, a predicate $$T$$ which we can test for, is false, i.e. given a $$b \in B$$, we can say $$b \overset{\mbox{90%}}{\implies} \neg T$$

With non-probabilistic implications, e.g. $$P \implies Q$$ we can use contraposition to infer $$\neg Q \implies \neg P$$

Given the above definitions, and the statement $$b \overset{\mbox{90%}}{\implies} \neg T$$, it seems like we can infer the following: $$T \overset{\mbox{90%}}{\implies} \neg b$$ which I interpret as "If we ensure predicate $$T$$ is true, then we have prevented 90% of the events in $$B$$".

Is this inference valid? If not, why not?

Your question can be rephrased in conditional probability terms:

Suppose I know $$P(\neg T | b) = 0.9$$. Must it be true that $$P(\neg b | T) = 0.9$$?

The answer is "no"; even if we are given $$P(\neg T | b) = 0.9$$, $$P(\neg b | T)$$ can take any value between $$0$$ and $$1$$, depending on the individual likelihoods of $$b$$ and $$T$$.

Let's take a specific example. Suppose I take a blood test for a disease. This blood test gives me either a "not bad" ($$\neg b$$) or "bad" ($$b$$) result. "Not bad" here means "Test says disease free"; "bad" means "Test says diseased".

But this blood test also has a very high rate of false positives - a 90% rate, in fact. So if I get a "bad" test result, there is a 90% chance that it is not true ($$\neg T$$) that I have the disease, and a 10% chance that it is true ($$T$$) that I have the disease. This is equivalent to $$P(b | \neg T) = 0.9$$.

Stated in this concrete instance, it seems unlikely that the probability $$P(T | \neg b)$$ that my test result is "not bad" given that it is "true" that I have the disease, must be 90%. And indeed, by picking different values for $$P(b)$$ and $$P(T)$$ overall, I can get a range of numbers for this conditional probability.

For instance, suppose $$P(b) = 0.2$$ (a 20% likelihood of getting a "bad" result) and $$P(T) = 0.04$$ (a 4% likelihood of truly having the disease). Then if $$P(\neg T|b) = 0.9$$, it must be that $$P(b \cap \neg T) = P(\neg T | b) * P(b) = 0.9 * 0.2 = 0.18$$ and $$P(b \cap T) = P(b) - P(b \cap \neg T) = 0.20 - 0.18 = 0.02$$, from which we quickly find $$P(\neg b \cap T) = 0.02$$ and $$P(\neg b \cap \neg T) = 0.78$$:

\begin{align*} && T \text{ (infected)} && \neg T \text{ (healthy)} && \text{Total} \\ \neg b \text{ (not bad)} && 0.02 && 0.78 && 0.80 \\ b \text{ (bad)} && 0.02 && 0.18 && 0.20 \\ \text{Total} && 0.04 && 0.96 && 1.00 \ \end{align*}

So in this instance, $$P(\neg b | T) = \frac{P(\neg b \cap T)}{P(T)} = \frac{0.02}{0.04} = 0.5,$$ i.e. I have a 50% chance of getting a negative result if I am truly infected, instead of a 90% chance.

Now let's change those numbers to see that $$P(\neg b | T)$$ also changes. If I take $$P(b) = 0.30$$, $$P(T) = 0.05$$, then I find $$P(b \cap \neg T) = 0.9 * 0.30 = 0.27,$$ $$P(b \cap T) = 0.03$$, $$P(\neg b \cap T) = P(T) - P(b \cap T) = 0.05 - 0.03 = 0.02:$$

\begin{align*} && T \text{ (infected)} && \neg T \text{ (healthy)} && \text{Total} \\ \neg b \text{ (not bad)} && 0.02 && 0.68 && 0.70 \\ b \text{ (bad)} && 0.03 && 0.27 && 0.30 \\ \text{Total} && 0.05 && 0.95 && 1.00, \ \end{align*}

and now we have that $$P(\neg b | T) = \frac{P(\neg b \cap T)}{P(T)} = \frac{0.02}{0.05} = 0.4,$$ i.e. I have a 40% chance of getting a negative result if I am truly infected, instead of a 90% chance.

We can express $$P(\neg b | T)$$ as a function of $$x = P(b)$$ and $$y = P(T)$$ as follows. Since events can't have negative probability, we know that $$P(T \cap b) \leq P(T)$$ and $$P(T \cap b) = 0.1x$$, meaning that $$y \geq 0.1x$$. Any numbers $$0 \leq x, y \leq 1$$ satisfying the constraint $$y \geq 0.1x$$ can make sense in the problem. Then the conditional probability $$P(\neg b | T)$$ is equal to $$P(\neg b | T) = \frac{P(\neg b \cap T)}{P(T)} = \frac{y - 0.1x}{y},$$ which can clearly take on the entire range of values $$(0, 1)$$.

No, it isn't valid. If $$b$$ implies not-$$T$$ always, then there is no overlap between $$b$$ and $$T$$, so we can indeed conclude that $$T$$ implies not-$$b$$. If $$b$$ implies not-$$T$$ $$90$$% of the time, it means there is an overlap between $$b$$ and $$T$$ which covers $$10$$% of $$b$$, but without more information we have no idea what percentage the overlap is of $$T$$.