Conditional Probabilities

Probabilities

  • Marginal probability is the probability of an event occurring regardless of the outcomes of other random variables.
  • Joint probability is the probability of two or more events occurring simultaneously. It represents the likelihood of the intersection of multiple events. For two events A and B, the joint probability is written as P(A ∩ B) or P(A, B).
  • Conditional probability is the probability of an event occurring given that another event has already occurred. It’s denoted as P(A|B), which reads as “the probability of A given B.”

Example

Researchers randomly assigned 72 chronic users of cocaine into three groups: desipramine (antidepressant), lithium (standard treatment for cocaine) and placebo. Results of the study are summarized below.

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm

Marginal probability

What is the probability that a patient relapsed?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

Marginal probability

What is the probability that a patient relapsed?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

P(relapsed) = 48 / 72 ~ 0.67

Joint probability

What is the probability that a patient received the antidepressant (desipramine) and relapsed?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

Joint probability

What is the probability that a patient received the antidepressant (desipramine) and relapsed?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

P(relapsed ∩ desipramine) = 10 / 72 ~ 0.14

Conditional probability

The conditional probability of the outcome of interest A given condition B is calculated as:

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

Conditional probability

What is the probability that a patient relapses if we know they were given desipramine?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

\(P(relapse|desipramine) = \frac{P(relapse \cap desipramine)}{P(desipramine)}\)

\(P(relapse|desipramine) = \frac{10/72}{24/72} = 10/24 = 0.42\)

Conditional probability

What is the probability that a patient relapses if we know they were given lithium?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

Conditional probability

What is the probability that a patient relapses if we know they were given lithium?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

\(P(relapse|lithium) = \frac{18}{24} = 0.75\)

Conditional probability

What is the probability that a patient relapses if we know they were given placebo?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

\(P(relapse|placebo) = \frac{20}{24} = 0.83\)

Conditional probability

If we know that a patient relapsed, what is the probability that they received the antidepressant (desipramine)?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

Conditional probability

If we know that a patient relapsed, what is the probability that they received the antidepressant (desipramine)?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

\(P(desipramine|relapse) = \frac{10}{48} = 0.21\)

Conditional probability

If we know that a patient relapsed, what is the probability that they received lithium?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

\(P(lithium|relapse) = \frac{18}{48} = 0.38\)

Conditional probability

If we know that a patient relapsed, what is the probability that they received placebo?

relapse no relapse total
desipramine 10 14 24
lithium 18 6 24
placebo 20 4 24
total 48 24 72

\(P(placebo|relapse) = \frac{20}{48} = 0.42\)

Practice

glasses no glasses total
Male 15 35 50
Female 20 30 50
total 35 65 100
  • What is the marginal probability of wearing glasses P(glasses)?
  • What is the probability of being male AND wearing glasses P(male ∩ glasses)?
  • What is the probability of a student wearing glasses if we know that the student is male P(glasses|male)?

Practice

glasses no glasses total
Male 15 35 50
Female 20 30 50
total 35 65 100
  • P(glasses) = 0.35
  • P(male ∩ glasses) = 0.15
  • P(glasses|male) = 15/50

Product rule for independent events

The Product Rule for Independent Events states that if two events A and B are independent, then the probability of both events occurring (their intersection) is equal to the product of their individual probabilities.

P(A ∩ B) = P(A) × P(B)

  • The rule only applies when events are independent (the occurrence of one event doesn’t affect the probability of the other)
  • Independence must be verified before applying the product rule

Product rule for non-independent events

If the events are not believed to be independent, the joint probability is calculated slightly differently.

If A and B represent two outcomes or events, then:

P(A ∩ B) = P(A | B) x P(B)

Note that this formula is simply the conditional probability formula, rearranged.

Independence and conditional probabilities

Consider the following (hypothetical) distribution of gender and major of students in an introductory statistics class:

social-sciences no social-sciences total
Male 30 20 50
Female 30 20 50
total 60 40 100

Independence and conditional probabilities

social-sciences no social-sciences total
Male 30 20 50
Female 30 20 50
total 60 40 100
  • What is the probability that a randomly selected student is a social science major?
  • What is the probability that a randomly selected student is a social science major given that they are female?

Independence and conditional probabilities

social-sciences no social-sciences total
Male 30 20 50
Female 30 20 50
total 60 40 100
  • What is the probability that a randomly selected student is a social science major? 60/100 = 0.6
  • What is the probability that a randomly selected student is a social science major given that they are female? 30/50 = 0.6

Independence and conditional probabilities

social-sciences no social-sciences total
Male 30 20 50
Female 30 20 50
total 60 40 100

Since P(social science | male) also equals 0.6, major of students in this class does not depend on their gender: P(social science | female) = P(social science).

Independence and conditional probabilities

In general, if P(A | B) = P(A) then the events A and B are said to be independent.

  • Conceptually: Giving B doesn’t tell us anything about A.
  • Mathematically: We know that if events A and B are independent, P(A and B) = P(A) x P(B). Then:

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