Conditional probability

Introdução à estatística

George Boorman

Curriculum Manager, DataCamp

Multiple meetings

Sampling without replacement

Box with Amir, Claire, Damian.png

Introdução à estatística

Multiple meetings

Sampling without replacement

Claire's name pulled out.png

$$P(\text{Claire}) = \frac{1}{3} = 33\%$$

Introdução à estatística

Dependent events

Probability of the second event is affected by the outcome of the first event

Two columns: First pick column containing Amir, Brian, Claire, Damian. Second pick column is empty.png

Introdução à estatística

Dependent events

Probability of the second event is affected by the outcome of the first event

Claire in first column points to Claire in second column with probability 0%.png

Introdução à estatística

Dependent events

Probability of the second event is affected by the outcome of the first event

 

Sampling without replacement = each pick is dependent

Amir, Brian, and Damian in first column points to Claire in second column with probability 33%.png

Introdução à estatística

Conditional probability

  • Conditional probability is used to calculate the probability of dependent events

    • The probability of one event is conditional on the outcome of another

train_at_a_platform.png

1 Image credit: https://unsplash.com/@pixeldan
Introdução à estatística

Venn diagrams

venn_diagram_showing_two_events_and_an_overlap_where_both_events_occur.png

Introdução à estatística

Kitchen sales over $150

venn_diagram_number_of_orders_over_150_dollars_and_number_kitchen_orders.png

Introdução à estatística

Kitchen sales over $150

 

venn_diagram_number_of_orders_over_150_dollars_and_number_kitchen_orders.png

 

 

$$P(Order > 150 | Kitchen) = \frac{\frac{20}{1767}}{\frac{181}{1767}}$$

 

$$P(Order > 150 | Kitchen) = \frac{20}{181} $$

Introdução à estatística

The order of events matters

 

venn_diagram_number_of_kitchen_orders_and_orders_over_150_dollars.png

 

 

$$P(Kitchen | Order > 150) = \frac{\frac{20}{1767}}{\frac{601}{1767}}$$

 

$$P(Kitchen | Order > 150) = \frac{20}{601} $$

Introdução à estatística

Conditional probability formula

$$P(A | B) = \frac{{P(A \ \cap \ B)}}{{P(B)}}$$

  • $P(A | B)$ → Probability of event A, given event B

  • $P(A \ \cap \ B)$ → Probability of event A and event B

    • Divided by the probability of event B → $P(B)$
Introdução à estatística

Let's practice!

Introdução à estatística

Preparing Video For Download...