conditional probability
probability questions are asked relative to some universe of possibilities, the sample space , the universe—i like cosmos. the probability of an event , , is thus a fraction of the universe. in , read as , becomes the universe relative to which the part of that lives inside of gets compared, thus conditional probability is defined
or, in other words
select sum(case when condition_a = 'A' then 1 else 0 end) / count(*)
from omega
where condition_b = 'B' disjoint and independent events
two disjoint events have no intersection , and hence, from the formula above . if happens, doesn’t.
whereas and are independent when shrinking the universe to doesn’t change the probability of , i.e. .
it’s worth noting that two disjoint events are maximally dependent! knowing that happened tells everything about , when shrinking the universe to , vanishes completely.
bayes’ rule
from
also the probability of given is
hence the intersection of and can be expressed by both
and
that is to say that knowing makes it possible to know
practical bayes
two events , a disease and a positive test . prevalence is , test accuracy is , and false positive rate .
lay out the events probabilities
remembering that, from rearranging the conditional probability formula
and
what is the probability of actually having the disease upon a positive test?
what is the universe here? the set of all tested subjects.
think of the tested subject, they have a chance of of having the disease and if they do, they have a chance of testing positive: : this is
at the same time, they have chances of not having the disease and if they don’t, they have chances of testing nonetheless positive: and this is
but what are these? from the conditional probability formula, they are intersections! the intersections of the probability of testing positive with the probabilities of both having
and not having
the disease.
what is the interesting question? it’s what is the probability of having the disease upon having tested positive, and the chance of a positive outcome, whether having the disease or not, is
representing the microcosm of all positive tests, hence
or, intuitively
the tested subject, for the record, has a probability of having the disease after a positive test.