I have the following problem:
your box is achieving a false positive rate of 0.01 and a false negative rate of 0.001. What fraction of the alarms that your box generates are valid alarms?
I am trying to figure this out, but I am having trouble understanding how to set this problem up. My initial thoughts were to set the problem as such:
P(valid|alarm) = (P(alarm|valid) * P(Valid))/ ((P(alarm|valid) * P(Valid) + (P(not valid|alarm) * P(no alarm))
where (and this is where I get confused):
P(valid) = .99
P(no alarm) = .001
I am not sure what my values/ how to structure this in a logical sense. I think I am confusing what P(valid) and P(alarm|valid) would be. A guide in the right direction would be appreciated. I am new to bayes theorem so I am still trying to wrap my head around it.
Drawing a tree diagram, starting with whether there is a problem before branching out to whether the alarm sounds (valid alarms are then alarms that sound when there is indeed a problem).
A false positive means that the alarm sounds when there is no problem. That is, $P(\textrm{alarm} | \textrm{no problem}) = 0.01$.
Meanwhile, a false negative means that the alarm does not sound when there is a problem. That is, $P(\textrm{no alarm} | \textrm{problem}) = 0.001$.
The probability we want, that is the fraction of alarms that are valid, is then the conditional probability $P(\textrm{problem} | \textrm{alarm})$.