Wize University Statistics Textbook > Probability

Probability of Dependent Events (Conditional Probability)

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Probability of Dependent Events (Conditional Probability)

Events A and B are dependent if the occurrence of one has an affect on the probability of the occurrence of the other.


Conditional Probability

The probability that event A will occur given that event B has already occured is called the "conditional probability of event A given event B", and is denoted by P(A∣B)P(A|B).


Note: P(B∣A)P(B|A) is the probability that event B will occur given that event A already occured.




Multiplication Rule

For any two events A and B, we have the following multiplication rules:


Image illustrating Probability of Dependent Events (Conditional Probability)




We can rewrite these rules by isolating for the conditional probability, giving us the following formulas for conditional probability:

Image illustrating Probability of Dependent Events (Conditional Probability)


Example

There are 6 possible outcomes of a fair die. Sample space S={1,2,3,4,5,6}S=\left\{1,2,3,4,5,6\right\}


A= {4,5,6 }A=\ \left\{4,5,6\ \right\}

B= {1,3,5}B=\ \left\{1,3,5\right\}


Find P(A∣B)P\left(A\mid B\right).


There is only 1 outcome {5} that are in both A and B out of the sample space of 6 possible outcomes {1,2,3,4,5,6}

So, P(A∩B)=16P\left(A\cap B\right)=\frac{1}{6}


There are 3 outcomes {1,3,5} that are in the sample space of 6 possible outcomes {1,2,3,4,5,6}

So, P(B)=36P\left(B\right)=\frac{3}{6}


Therefore,

P(A∣B)=P(A∩B)P(B)=1636=13\displaystyle P\left(A\mid B\right)=\frac{P\left(A\cap B\right)}{P\left(B\right)}=\frac{\frac{1}{6}}{\frac{3}{6}}=\frac{1}{3}

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Conditional Probability: Tree Diagram

P(A∣B) =P\left(A\mid B\right)\ = the conditional probability that event A will occur given that event B already occurred.

P(A∣Bc) =P\left(A\mid B^c\right)\ = the conditional probability that event A will occur given that event B did not occur.


As you can see, event A could occur in more than one way, depending on whether event B occurs or not. The probability that event A will occur is therefore the sum of all the outcomes where Event A occurs:


Image illustrating Conditional Probability: Tree Diagram

Similarly, event B could occur more than one way, depending on whether event A occurs or not. The probability that event B will occur is the sum of all the outcomes where Event B occurs:


Image illustrating Conditional Probability: Tree Diagram



Tree Diagram

A tree diagram shows all the possible outcomes and can help you visualize the problem. It consists of branches that are labeled with probabilities.


Suppose A and B are two dependent events, the following tree diagram shows all the possible outcomes:

Image illustrating Conditional Probability: Tree Diagram


Notice that Event B occurs twice:

  1. given that Event A occurs; and
  2. given that Event Ac occurs.

Therefore, the probability of Event B occurring is the sum of the two probabilities that Event B occurs:


P(B)=P(B∣A)⋅P(A)+P(B∣Ac)⋅P(Ac)\boxed{P(B)=P(B|A)\cdot P(A)+P(B|A^c)\cdot P(A^c)}


Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Bayes’ Theorem

Bayes’ Theorem describes the probability of an event based on conditions that might be related to the event. In other words, suppose we already know the outcome is true and wish to infer the prior probability of the event.


Examples

  • Mr. Smith is diagnosed with appendicitis. What’s the probability that he is older than 30 years old?
  • Julia agreed to a second date with Richard. What’s the probability that he paid for dinner?
  • Paul adopted a cat. What’s the probability that the cat is black?


Bayes' Theorem formula

Image illustrating Bayes’ Theorem


Example


Image illustrating Bayes’ Theorem


Find P(A|B):


P(A∣B)=P(B∣A)P(A)P(B)=P(B∣A)P(A)P(B ∣A)P(A)+P(B ∣Ac)+P(B ∣Ac)P(Ac)=0.050.05+0.15=0.25\displaystyle P(A|B)=\frac{P(B|A)P(A)}{P\left(B\right)}=\frac{P(B|A)P(A)}{P(B\ |A)P(A)+P(B\ |A^c)+P(B\ |A^c)P(A^c)}=\frac{0.05}{0.05+0.15}=0.25

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Example: Bayes' Theorem

4%4\% of dogs have an infection. Of those with an infection, 10%10\% are German Pinschers (GP). 1%1\% of those that aren't infected are German Pinschers.


Tree diagram:


Image illustrating Example




(a) If we randomly select a dog, what is the probability that it's a German Pinscher?


P(GP)=(0.04)(0.10)+(0.96)(0.01)=0.0136P\left(GP\right)=\left(0.04\right)\left(0.10\right)+\left(0.96\right)\left(0.01\right)=0.0136




(b) Phoebe owns a German Pinscher. What is the probability that her dog is infected?


Bayes' Theorem:


P(I ∣ GP)\displaystyle P\left(I\ |\ GP\right)


=P(I ∩GP)P(GP)\displaystyle =\frac{P\left(I\ \cap GP\right)}{P\left(GP\right)}


=P(I)P(GP∣I)P(I)P(GP∣I)+P(Ic)P(GP∣Ic)\displaystyle =\frac{P\left(I\right)P\left(GP\mid I\right)}{P\left(I\right)P\left(GP\mid I\right)+P\left(I^c\right)P\left(GP\mid I^c\right)}


=(0.04)(0.10)(0.04)(0.10)+(0.96)(0.01)\displaystyle =\frac{\left(0.04\right)\left(0.10\right)}{\left(0.04\right)\left(0.10\right)+\left(0.96\right)\left(0.01\right)}


=0.0040.0136\displaystyle =\frac{0.004}{0.0136}


≈0.2941\approx0.2941


Alternatively, you can use the tree diagram instead of the Bayes' Theorem formula:

P(I∣GP)=P(I∩GP)P(GP)\displaystyle P(I|GP)=\frac{P(I\cap GP)}{P(GP)}

  • We can find the numerator by following the I and GP branches: P(I∩GP)=0.04×0.10=0.004P(I\cap GP)=0.04\times0.10=0.004
  • We already found the denominator in part a): P(GP)=0.0136P(GP)=0.0136

Therefore, the probability is P(I∣GP)=0.0040.0136≈0.2941\displaystyle P(I|GP)=\frac{0.004}{0.0136}\approx0.2941


Katie could put a ball in either Slot A or Slot B and hopes to win a prize. The ball will bounce around and will either land in a winning box or the losing box. Suppose she puts the ball in Slot A 40% of the time; Slot B 60% of the time. If she puts the ball in Slot A, the ball lands in the winning box 15% of the time. If she puts the ball in Slot B, the ball lands in the losing box through the first channel 60% of the time and into the same losing box through the second channel 20% of the time. See illustration below:

Illustration for practice question: Bayes' Theorem

Katie won. What is the probability that she put the ball in Slot A?

Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice