Conditional probability

Introduzione alla statistica

George Boorman

Curriculum Manager, DataCamp

Multiple meetings

Sampling without replacement

Box with Amir, Claire, Damian.png

Introduzione alla statistica

Multiple meetings

Sampling without replacement

Claire's name pulled out.png

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

Introduzione alla statistica

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

Introduzione alla statistica

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

Introduzione alla statistica

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

Introduzione alla statistica

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
Introduzione alla statistica

Venn diagrams

venn_diagram_showing_two_events_and_an_overlap_where_both_events_occur.png

Introduzione alla statistica

Kitchen sales over $150

venn_diagram_number_of_orders_over_150_dollars_and_number_kitchen_orders.png

Introduzione alla statistica

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} $$

Introduzione alla statistica

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} $$

Introduzione alla statistica

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)$
Introduzione alla statistica

Let's practice!

Introduzione alla statistica

Preparing Video For Download...