Conditional Probability

Definition: If p(B) > 0, the conditional probability of A given B, denoted p(A|B), is

    \[p(A|B) = \frac{p(A \cap B)}{p(B)}.\]


Theorem: Let S be the sample space of an experiment, and let B be an event of S with p(B)>0. Then

  • p(A|B) \geq 0 for any event A of S.
  • p(S|B) = 1
  • If A_1,A_2,... is a sequence of mutually exclusive events, then

        \[p\left( \bigcup_{i = 1}^{\infty} A_i | B \right) = \sum_{i = 1}^{\infty} p (A_i|B)\]


Example:
In a certain region the probability that a person lives at least 80 years is 0.75, and the probability that he or she lives at least 90 years is at least .63. What is the probability that a randomly selected 80 year old person from this region will survive to become 90? \\


Solution:


Let A be the event that a person lives at least until 80 and let B be the event that a person lives until at least 90. One thing to note is that if a person lives until 90, then they have lived past 80. So we get that A \cap B = B. So

    \begin{align*} p(A) &= .75 \\ p(B) &= p(A\cap B) = .63 \\ \end{align*}

So, to calculate the conditional probability,

    \begin{align*} p(B|A) &= \frac{p(A \cap B)}{p(A)} = \frac{.63}{.75} = 0.84 \end{align*}


Example:
From the set of all families with two children, a family is selected at random and is found to have a girl. What is the probability that the other child of the family is a girl? Assume that in a two-child family all sex distributions are equally probable. \\


Solution:


We let our sample space S be the set of all possible outcomes of having two children,

    \[S = \{(B,B),(B,G),(G,B),(G,G)\}\]

since the probability of having a boy or a girl is equal, the probability for each of the orderings is equal, so each has the probability of \frac{1}{4}. We now let A be the event that the family has two girls, B be the event that it has at least one girl. So, p(B) = \frac{3}{4} and p(A) = p(A \cap B) = \frac{1}{4}, so finally

    \[p(A|B) = \frac{p(A\cap B)}{p(B)} = \frac{1/4}{3/4} = \frac{1}{3}.\]


Law of Multiplication


We can use the relation

    \[p(A|B) = \frac{p(A \cap B)}{p(B)}\]

to not only calculate the conditional probability, but in certain circumstances to calculate p(A\cap B).


Theorem: If p(A_1 \cap A_2 \cap ...\cap A_{n-1}) > 0, then

    \[p(A_1 \cap A_2 \cap ...\cap A_{n-1}) =\]

    \[p(A_1)p(A_2|A_1)p(A_3|A_1\cap A_2)...p(A_n|A_1\cap &A_2\cap ... \cap A_{n-1})\]


Example:
Suppose that five good fuses and two defective ones have been mixed up. To find the defective fuses, we test them one-by-one, and random and without replacement. What is the probability that we are lucky and find both of the defective fuses in the first two tests? \\


Solution:


The probability that the first fuse tested will be defective is \frac{2}{7}, then given that we remove the first defective fuse, the probability that the second fuse we test is also defective will be \frac{1}{6} so the probability that the we get both defective fuses in the first two tests will be

    \[\left(\frac{2}{7}\right) \left(\frac{1}{6}\right)= \frac{1}{21}.\]


Law of Total Probability


Theorem[Simple Law of Total Probability] Let B be an event with p(B) > 0 and p(B^c) > 0. Then for any event A,

    \[p(A) = p(A|B)p(B) + p(A|B^c)p(B^c)\]


Example:
In a trial, the judge is 65\% sure that Susan has committed a crime. Julie and Robert are two witnesses who know whether Susan is innocent or guilty. However, Robert is Susan’s friend and will lie with probability 0.25 if Susan is guilty. He will tell the truth if she is innocent. Julie is Susan’s enemy and will lie with probability 0.30 if Susan is innocent. She will tell the truth if Susan is guilty. What is the probability that in the course of the trial, Robert and Julie will give conflicting testimony? \\


Solution:


To start we need to define the events we are working with, let C be the event that Susan committed the crime, J be the event that Julie tells the truth, and R be the event that Robert tells the truth. So from the above we have

    \begin{align*} P(C) &= .65 \\ P(R|C) &= .75 & P(R^c|C) &= .25 & P(R|C^c) = 1.0 \\ P(J|C) &= 1.0 & P(J|C^c) &= .7 & P(J^c|C^c) &= .3 \end{align*}

The events distinguishing conflict of testimony are R^c \cap J which can only occur when Susan is guilty and R \cap J^c which can only occur when Susan is innocent. So we get that

    \begin{align*} P((R^c \cap J) \cup (R \cap J^c)) &= P(C)P(R^c|C) + P(C^c)P(J^c|C^c) \\ &= (.65)(.25) + (.35)(.3) = 0.2675 \end{align*}

So there is a 26.75\% chance that Robert and Julie will give conflicting testimony.


Definition: Let \set{B_1, B_2, ..., B_n} be a set of nonempty subsets of the sample space S of an experiment. If the events B_1, B_2, ..., B_n are mutually exclusive and \bigcup_{i = 1}^{n} B_i = S, the set \{B_1,B_2,...,B_n\} is called a partition of S.\\


Theorem:[Law of Total Probability] If \{B_1,B_2,...,B_n\} is a partition of the sample space of an experiment and p(B) > 0 for i=1,2,...,n then for any event A of S,

    \begin{align*} p(A) &= p(A|B_1)p(B_1) + p(A|B_2)p(B_2) + ... + p(A|B_n)p(B_n) \\ &= \sum_{i=1}^{n}p(A|B_i)p(B_i) \end{align*}


Example:
Suppose that 80% of seniors, 70% of juniors, 50% of sophomores, and 30% of freshmen use the library of their campus frequently. If 30% of all students are freshmen, 25% are sophomores, 25% are juniors and 20% are seniors, what percent of all students use the library frequently? \\


Solution:


If we let L be the event that a randomly student goes to the library, S_1,S_2,S_3,S_4 be the event that a student is a freshman, sophomore, junior or senior, respectively. From above we have the following:

    \begin{align*} p(S_1) &= .3 & p(S_2)&= .25 \\ p(S_3) &= .25 & p(S_4)&= .2 \\ \\ p(L|S_1) &= .3 & p(L|S_2) &= .5 \\ p(L|S_3) &= .7 & p(L|S_4) &= .8 \\ \end{align*}

We then apply the Law of Total Probability for L

    \begin{align*} p(L) &= p(L|S_1)p(S_1) + p(L|S_2)p(S_2) + p(L|S_3)p(S_3) + p(L|S_4)p(S_4) \\ &= (.3)(.3) + (.5)(.25) + (.7)(.25) + (.8)(.2) \\ &= (.09) + (.125) + (.175) + (.16) = .55 \end{align*}

So we have that if we randomly select a student, there is a 55% chance that that student uses the library frequently. So we can interpret this as that 55\% of all students use the library frequently.