3

I'm a little confused about how to use Bayes' theorem when I don't have any way to establish an initial prior.

Say I have a sensor that can detect whether there is flouride in a water sample. Let's denote $P(F | M)$ as the probability that a positive measurement is correct, i.e. there is indeed flouride in the water. And let's add some numbers as an example:

  • $P(F|M) = 0.7$ (and therefore $P(\bar{F}|M) = 0.3$)
  • $P(F|\bar{M}) = 0.1$ (and therefore $P(\bar{F}|\bar{M}) = 0.9$)

where $\bar{M}$ denotes a negative measurement (indicating that there isn't flouride) And $\bar{F}$ denotes that there really is no flouride in the water.

Let's compute $P(M|F)$. Using Bayes:

$$ \begin{align} P(M|F) &= \frac{P(F|M) \cdot P(M)}{P(F)} \\ &= \frac{P(F|M) \cdot P(M)}{P(F|M)P(M) + P(F|\bar{M})P(\bar{M})} \space\space\space\space \text{(total probability on denominator)} \\ &= \frac{0.7 \cdot P(M)}{0.7 \cdot P(M) + 0.1 \cdot P(\bar{M})} \end{align} $$

So now what do I do about the $P(M)$ and $P(\bar{M})$?

  • $P(F)=P(F|M)P(M)+P(F|M^c)P(M^c)$. So not $P(F)=P(F|M)+P(F|M^c)$ – drhab Jun 09 '22 at 13:05
  • @drhab right! So then would I set $P(M) = 0.5$ because I don't have any other reasonable prior? If so I end up getting $P(M|F) = 0.875$. – Alexander Soare Jun 09 '22 at 13:09
  • 2
    If know nothing more that $P(F|M)$ and $P(F|M^c)$ then it is simply not possible to find $P(M|F)$. You can at most find an expression for $P(M|F)$ in $P(M)$ (as you did in your edit). – drhab Jun 09 '22 at 13:16
  • @drhab that makes sense mathematically, but intuitively I find it hard to grasp that "I know that if my sensor lights up green there's a 70% chance there is flouride, and if my sensor lights up red there's a 90% chance there is not flouride. But I have no idea what my sensor is likely to do if I know there is flouride." Is that really right? – Alexander Soare Jun 09 '22 at 13:47
  • @drhab I think I've got it now. The fact is I don't know what the % of samples with flouride is,. My $P(F|M) = 0.7$ could say more about the latter than about my sensor itself. – Alexander Soare Jun 09 '22 at 13:58

1 Answers1

2

This is a classic problem. You can't know what a positive test (for a disease or for fluoride) means if you know only the false positive and true positive rates. You need the incidence of the disease (fluoride) in the population.

See Applied Probability- Bayes theorem

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199
  • Thanks, so say we know 50% of water samples have flouride in them. How do I incorporate that information into the last line of my working? Without typing it out above I went down the route of plugging in total probability: $P(M) = 0.5 \cdot P(M | F) + 0.5 \cdot P(M|\bar{F})$ and similar for $P(\bar{M})$. Now I have one equation in two unknowns (the unknowns are $P(M | F)$ and $P(M | \bar{F})$). To get the second equation, I need to write Bayes' rule for $P(M | \bar{F})$. Then I need to solve the equations simultaneously. Is that right? – Alexander Soare Jun 09 '22 at 13:29
  • I haven't looked at your algebra. The link in my answer describes how I do these problems. As an aside, I wonder whether $0,5$ is a reasonable prior for whether a water sample had been fluoridated. – Ethan Bolker Jun 09 '22 at 13:34
  • I'm also now confused about your answer. You say "you can't know what a positives test means". But I do. I state that $P(F | M) = 0.7$. I know that a positive test means that there's 0.7 probability of there being flouride. What I'm trying to compute is: if there is flouride, what's the probability of a positive test? – Alexander Soare Jun 09 '22 at 13:42
  • I think it's because I'm doing literally the reverse of the typical disease/test toy problem. My problem switches the knowns / unknowns. – Alexander Soare Jun 09 '22 at 13:56
  • 1
    @AlexanderSoare Since you've accepted my answer I assume it's helped, and you can apply it in your reversed version of the problem. – Ethan Bolker Jun 09 '22 at 14:01
  • correct. thank you – Alexander Soare Jun 09 '22 at 14:15