> Home > Statistics Notes > Probability > Conditional Probability

## Conditional Probability

Suppose we were sampling individuals, and that for every individual, we classified them as SC (smoker with coronary heart disease), SH (smoker with no coronary heart disease), NC (non-smoker with coronary heart disease), and NH (non smoker with no coronary heart disease). Thus, the sample space for this experiment is {SC,NC,SH,NH}. There is no reason to believe that these are equally likely outcomes. After M trials of this experiment, we may calculate the relative frequency of coronary heart disease, which would be the number of people with coronary heart disease out of the total number of people seen so far: (#(SC)+#(NC))/M. We could also write this by adding up the fractions: #(SC)/M + #(NC)/M. Or we could consider the relative frequency of people who are both smokers who have had coronary heart disease, which would be just #(SC)/M, i.e the number of people who happen to be smokers and also have coronary heart disease, out of the total number seen so far. Or we could compute the fraction of smokers out of the total number of people seen: (#(SC)+#(SH))/M. In all these cases, the denominator is just the total number of people seen so far.
But a public health epidemiologist may be interested in for instance the fraction of smokers who have coronary heart disease. In this case, he or she would use just the total number of smokers as the denominator, and the numerator would be the number of smokers with heart disease: #(SC)/(#(SC)+#(SH)). We are going to call the number of smokers #(S)=#(SC)+#(SH); it is the number of smokers with coronary heart disease plus the number without it.
So we can call the frequency of CHD among smokers f(C|S)= #(SC)/#(S); it is the number of smokers with CHD over the total number of smokers. We can also define f(S) to be the frequency of smokers f(S)=#(S)/M. Finally, let's call the relative frequency of having CHD and being a smoker f(SC)=#(SC)/M. We can now take the expression for f(C|S) and divide the numerator and the denominator both by M; this gives us f(C|S)=(#(SC)/M)/(#(S)/M), which is the same as f(C|S)=f(SC)/f(S). So we can find the frequency of CHD among the smokers just from the frequencies.
Since probabilities are meant to be long run limiting frequencies after repeating the experiment infinitely often, it made sense to define a similar concept in probability theory. Suppose that A and B are events; A B is also an event (the event that both A and B occur. Suppose we know the probability of B, and it is P(B) (and not zero). Suppose we also have the probability that both A and B will occur together, i.e. we know what P(A B) is. Then we can define the conditional probability of A given B, written P(A|B), to be P(A B)/P(B); this is analogous to the expression which could relate the relative frequencies of smokers and smokers with CHD above.
Example. Suppose we know that the probability that a person is a smoker is 0.2 (which is 20%), and the probability that a person in our population is both a smoker and has CHD is 2%. Also suppose we happen to know that the probability that a person is both a nonsmoker and has CHD is 4%. Most of our CHD in this population is in the nonsmokers, but then again most of the people are nonsmokers. Then the conditional probability of having CHD given that a person is a smoker would be 0.02/0.2 = 0.1, or ten percent. We can also calculate the conditional probability of having CHD given that a person is a nonsmoker is 0.04/0.8=0.05.

On to independence.