Probability – Lecture 2: Dependent vs Independent Events, Conditional Probability, and Continuous Distributions

1. Independent vs Dependent Events

Definition: Independent Events

Two events are independent if the occurrence of one does not affect the probability of the other.

Example (Real Life):
Tossing a coin and rolling a die.

Formal Definition:
If A and B are independent, then:

P(A and B)=P(A)×P(B)P(A \text{ and } B) = P(A) \times P(B)


Definition: Dependent Events

Two events are dependent if the outcome of one affects the probability of the other.

Example (Real Life):
Drawing two cards from a deck without replacing the first.

Note:
In dependent events, the probabilities change as the experiment progresses.


2. Conditional Probability

Conditional probability is the probability that event B happens given that event A has happened.

Formula:

P(BA)=P(A and B)P(A)P(B | A) = \frac{P(A \text{ and } B)}{P(A)}

Example (Real Life):
In a class of 30 students, 18 are girls. Among the girls, 10 play soccer.
What is the probability that a student plays soccer, given that she is a girl?

P(SoccerGirl)=1018=59P(\text{Soccer} | \text{Girl}) = \frac{10}{18} = \frac{5}{9}


3. Independent Events and Conditional Probability

If A and B are independent, then:

P(BA)=P(B)P(B | A) = P(B)

Why? Because A has no effect on B.

So for independent events:

P(A and B)=P(A)×P(B)P(A \text{ and } B) = P(A) \times P(B)


4. Visualizing with Venn Diagrams

Venn Diagrams help show the relationships between sets and events.

Let:

The overlap shows students who play both sports → P(A and B)

Conditional probability is about focusing only on part of the diagram.
For example, given event A (we're inside circle A), what part of that is also in B?

Use:

P(BA)=P(A and B)P(A)P(B | A) = \frac{P(A \text{ and } B)}{P(A)}

Visual Explanation:


5. Introduction to Continuous Probability Distributions

What is a Continuous Distribution?

Example (Real Life):


The Probability Density Function (PDF)

In continuous distributions, we talk about a density, not individual outcomes.

P(5X10)P(5 \leq X \leq 10)

Think of it like the area under a curve on a graph.


Example: Uniform Distribution

Suppose the time it takes to microwave popcorn is uniformly distributed between 2 and 4 minutes.

P(2.5X3)=32.542=0.52=0.25P(2.5 \leq X \leq 3) = \frac{3 - 2.5}{4 - 2} = \frac{0.5}{2} = 0.25

Exercises

1. Independent or Dependent?

Identify whether the following pairs of events are independent or dependent:

a) Flipping a coin and rolling a die
b) Drawing two cards from a deck without replacement
c) Rain today and whether you carry an umbrella

Solution
a) Flipping a coin and rolling a die
These events are independent. The outcome of flipping a coin does not affect the outcome of rolling a die.

b) Drawing two cards from a deck without replacement
These events are dependent. Drawing the first card changes the total number of cards in the deck, affecting the probability of the second draw.

c) Rain today and whether you carry an umbrella
These events are dependent. If it rains, you're more likely to carry an umbrella. One event influences the other.

2. Conditional Probability Basics

A bag contains 3 red and 2 blue marbles. A marble is drawn and not replaced, then a second marble is drawn.

What is the probability that:

a) The first is red and the second is blue?
b) Both are red?

Solution
There are 3 red and 2 blue marbles (total = 5). The draws are without replacement, so probabilities change after the first draw.

a) First is red, second is blue

P(Red1Blue2)=P(Red1)×P(Blue2Red1)P(\text{Red}_1 \cap \text{Blue}_2) = P(\text{Red}_1) \times P(\text{Blue}_2 \mid \text{Red}_1)

=35×24=620=310= \frac{3}{5} \times \frac{2}{4} = \frac{6}{20} = \frac{3}{10}

b) Both are red

P(Red1Red2)=35×24=620=310P(\text{Red}_1 \cap \text{Red}_2) = \frac{3}{5} \times \frac{2}{4} = \frac{6}{20} = \frac{3}{10}

3. Venn Diagram Logic

Interpret the formulas of independent events and conditional probability by drawing Venn diagrams.

Hint: Return back to the lecture notes on conditional probability.

4. In a class:

a) Draw a Venn diagram
b) How many play only basketball?
c) How many play neither sport if the class has 35 students?

Solution:

We are given:

a) Venn Diagram

Two overlapping circles:

b) How many play only basketball?

208=1220-8 = \boxed{12}

c) How many play neither sport (class has 35 students)?

Total playing at least one sport:

12(only B)+7(only S)+8(both)=2712 (\text{only B}) + 7 (\text{only S}) + 8 (\text{both}) = 27

3527=8 students play neither\boxed{35 - 27 = 8} \text{ students play neither}

5. Drawing Cards

A card is drawn from a deck. Then a second card is drawn without replacement.

a) What is the probability both are aces?
b) What is the probability the second card is an ace given the first was an ace?

Hint: There are 4 aces in 52 cards.

Solution
There are 52 cards in a deck, with 4 aces. Cards are drawn without replacement, so the total changes after each draw.

a) Probability both cards are aces
First card is an ace: (452)( \frac{4}{52} )
Second card is an ace (only 3 left out of 51): (351)( \frac{3}{51} )

P(Ace1Ace2)=452×351=122652=1221P(\text{Ace}_1 \cap \text{Ace}_2) = \frac{4}{52} \times \frac{3}{51} = \frac{12}{2652} = \frac{1}{221}

b) Probability second card is an ace given the first was an ace

P(Ace2Ace1)=3510.0588P(\text{Ace}_2 \mid \text{Ace}_1) = \frac{3}{51} \approx 0.0588

This is a conditional probability based on the first card already being an ace.

6. Continuous Probability

The time to complete an online quiz is uniformly distributed between 10 and 30 minutes.

a) What is the probability a student finishes in less than 15 minutes?
b) What is the probability a student takes more than 25 minutes?
c) What is the probability a student takes between 18 and 22 minutes?

Hint: Use the formula:

P(aXb)=barange widthP(a \leq X \leq b) = \frac{b - a}{\text{range width}}

Solution
The quiz time is uniformly distributed from 10 to 30 minutes.
Total range: (30 - 10 = 20)

a) Probability of finishing in less than 15 minutes:

151020=520=0.25\frac{15 - 10}{20} = \frac{5}{20} = 0.25

b) Probability of taking more than 25 minutes:

302520=520=0.25\frac{30 - 25}{20} = \frac{5}{20} = 0.25

c) Probability of taking between 18 and 22 minutes:

221820=420=0.2\frac{22 - 18}{20} = \frac{4}{20} = 0.2

7. Real-Life Dependent Event

A factory has a 5% chance a part is defective. If a part is found defective, another one is checked.

a) What is the chance both parts are defective?
b) What does this suggest about the assumption of independence?

Hint: Think about whether the second part's probability should be the same as the first.

Solution
Probability a part is defective = 0.05

a) Probability both parts are defective:
**
0.05 \times 0.05 = 0.0025
**
That’s a 0.25% chance if the events are independent.

b) Does independence hold?
In real life, defects may be caused by the same machine or batch, making defects dependent. So, the second defect might be more likely if the first one was defective.

Advanced exercises

Exercise 1: Conditional Probability and Bayes-Like Reasoning

In a school, 40% of students play chess. Among those who play chess, 70% also play video games. Among those who don't play chess, only 20% play video games.

Questions:

a) What is the probability that a randomly chosen student plays both chess and video games?
b) What is the probability that a student plays video games?
c) If a student plays video games, what is the probability they play chess?

Exercise 2: Multiple Dependent Draws

An urn contains 6 red balls and 4 blue balls. Three balls are drawn without replacement.

Questions:

a) What is the probability all three balls are red?
b) What is the probability the second ball is red given the first one was red?
c) What is the probability that exactly one red ball is drawn?

Exercise 3: Independence Testing

In a survey:

Are the events "liking tea" and "liking coffee" independent?

Exercise 4: Continuous Probability - Uniform Distribution

A factory machine produces metal rods with lengths uniformly distributed between 98 cm and 102 cm.

Questions:

a) What is the probability that a randomly chosen rod is longer than 100 cm?
b) What is the probability it is between 99.5 cm and 101 cm?
c) The rods are considered defective if their length is not within ±1 cm of 100 cm. What proportion of rods are defective?

Exercise 5: Continuous Probability - Time Modeling

A website's page load time (in seconds) follows a continuous distribution. Assume the load time follows a triangular distribution with minimum = 0.5s, most likely = 1s, and maximum = 2s.

Questions:

a) Sketch the distribution shape (optional).
b) Which value is most probable?
c) Why is the probability of the load time being exactly 1s still zero?
d) Estimate the probability the load time is between 0.5 and 1.5 seconds (conceptually or with software).

Exercise 6: Medical Testing Scenario

A disease affects 2% of a population. A test correctly detects it 95% of the time if a person has it (true positive rate), and falsely identifies it 5% of the time if the person does not have it (false positive rate).

Questions:

a) If a person tests positive, what is the probability they actually have the disease?

Exercise 7: Simulating Dependent Events

A student arrives late to school on rainy days 40% of the time, and on dry days only 10% of the time. Suppose it rains on 30% of school days.

Questions:

a) What is the overall probability the student is late on a random day?
b) If the student is late, what is the probability that it was raining?


For extra and more interesting exercises, check out one of MIT's problem sets on MIT 18.05 Problem Set 1 website!

Summary