Lecture notes · Math for Computer Science · Lecture 18

Probability Introduction

MIT 6.042J Mathematics for Computer Science, lecture 18, explained in plain English

Want this lecture to stick? In LessonBound you get checked practice questions for every part, can ask about anything you don't get, and can listen with your screen off. Free, no ads.

Learn this lecture free

Watch or read the original lecture: MIT OpenCourseWare.

Part 1 · 0:00–10:00

The professor explains why probability matters in math and computer science, warns that gut feelings often fail, and introduces the Monty Hall game show problem.

Key ideas

Words to know

probability
How likely something is to happen, measured with numbers.
intuition
A quick gut feeling about an answer, without working it out step by step.
probabilistic algorithm
A set of computer steps that uses coin flips or random numbers to get a result, often running faster as a result.
false positive
A test that says you have something when you actually do not.

Example

Think of a friend hiding a coin in one of three cupped hands and asking you to guess. Your gut might say the choice does not matter, but writing down each possible outcome and its chance shows the real answer. The lesson makes the same point: writing the steps beats trusting your feelings.

3 checked practice questions for this part are in the app.

Part 2 · 10:00–20:00

The class is testing whether a game show contestant should switch boxes, and the professor warns that a gut feeling can mislead you on this kind of question.

Key ideas

Words to know

probability
How likely something is to happen, often written as a number or fraction.
intuition
A feeling or gut sense about what is true, without working it out step by step.
trials
Single attempts at the same experiment or game, such as one round of the box game.
hand-waving argument
A quick explanation that sounds convincing but skips the real proof.

Example

A friend says a card trick worked for them three times in a row, so it must always work. Three successes do not prove that, because a few lucky results can happen by chance. The same idea applies to the box game, where three wins do not tell us the true odds.

3 checked practice questions for this part are in the app.

Part 3 · 20:00–30:00

This part tells the Monty Hall story, where experts argued about whether to switch doors, and introduces the first step for solving probability problems: listing all possible outcomes.

Key ideas

Words to know

sample space
The full list of everything that could happen in an experiment or game.
outcome
One single result that could happen. The lesson also calls it a sample point or atomic event.
experiment
Any situation with an uncertain result, such as a game show, that you can study for chances.
intuition
A gut feeling about what is right, without working through the steps.

Example

Imagine a game with a million doors where you pick one, and the host opens every other door except one, leaving 777,777 closed. The lesson uses this to show why it feels like the one left closed is likely to have the car. It is a helpful picture, but the lesson says it is not a proof.

3 checked practice questions for this part are in the app.

Part 4 · 30:00–40:00

This part shows how to list every possible outcome of the Monty Hall game when the player always switches, using a tree diagram.

Key ideas

Words to know

outcome (sample point)
One complete possible result of the game, with every random choice filled in.
sample space
The full set of all possible outcomes.
tree method
A way of listing all outcomes by drawing branches for each choice, one step at a time, like a decision tree.
switch
In this game, the player changes from the box they first picked to the other closed box.

Example

Think of a school raffle where one ticket wins. Writing down where the prize was, who picked which ticket, and which ticket was shown as a non-winner gives you one complete record of the event. Doing this for every possible way it could go gives you the full list of outcomes.

3 checked practice questions for this part are in the app.

Part 5 · 40:00–50:00

This part explains that solving the Monty Hall puzzle needs more than a list of possible outcomes, because each outcome also needs a probability, and the starting assumptions must be stated.

Key ideas

Words to know

sample space
The full list of every result that could happen in an experiment.
probability function
A rule that gives each outcome a number between 0 and 1 showing how likely it is.
probability space
The sample space together with the probability function for each outcome.
assumption
Something you accept as true at the start of a problem so you can work it out, which you should write down.

Example

Flip a fair coin. The chance of heads is 1/2, so if you flip it many times, about half the flips should land heads. That is what a probability means: the share of times an outcome shows up when you repeat the experiment a lot.

3 checked practice questions for this part are in the app.

Part 6 · 50:00–1:00:00

This part shows how to find the chance of each possible result in the Monty Hall game by multiplying along each path in a tree, then adding up the paths that win.

Key ideas

Words to know

sample point
One possible final result of the whole process, such as one full path through the game from start to finish.
sample space
The full list of all possible final results of the process.
event
A group of results that we care about, such as all the ways the player wins.
subset
A smaller group taken from a bigger group. Every event is a subset of the sample space.

Example

Think of a tree with branches for each choice in the game. To find how likely one final result is, follow its branch and multiply the chances at each fork, like 1/3 times 1/3 times 1/2 to get 1/18. To find how likely a group of results is, such as all the winning ones, add up their chances.

3 checked practice questions for this part are in the app.

Part 7 · 1:00:00–1:10:00

This part shows how to work out chances in two games, the Monty Hall-style box choice and a dice game, and introduces the idea of a uniform sample space.

Key ideas

Words to know

probability
How likely something is to happen, written as a number from 0 (never) to 1 (certain), or as a fraction like 1/3.
sample space
The full list of everything that could possibly happen in a game or test, such as all the faces a die can show.
tree diagram
A drawing that branches out from a starting point to show every possible result, so you can count them one by one.
uniform
The same in every case. A uniform sample space means every possible outcome has the same chance of happening.

Example

Picture three boxes with one prize hidden in one of them. If you pick a box and then switch to a different one, you are choosing from the two boxes you did not start with, and the lesson shows that switching wins more often than staying. Thinking about the boxes this way helps you see why the 1 in 3 odds for your first pick matter.

3 checked practice questions for this part are in the app.

Part 8 · 1:10:00–1:20:00

This part shows that in a game of three dice, each die can beat one of the others, so there is no single best die, and it explains how rolling the dice twice changes the odds.

Key ideas

Words to know

probability
How likely something is to happen, written as a fraction or number. A probability of 5/9 means it happens in 5 out of 9 equal chances.
sample space
The full list of all the possible results of an experiment. Here, the nine possible outcomes from picking one number on each die.
transitive
A rule where, if A beats B and B beats C, then A also beats C. The dice game breaks this rule, so probabilities here are not transitive.
tiebreaker
A rule for deciding a winner when two results are equal. The professor uses it when counting who wins the matchups.

Example

Think of rock, paper, and scissors. Rock beats scissors, scissors beats paper, and paper beats rock, so no single choice is best overall. The three dice in this lesson work the same way: each one beats another, and none beats all three.

3 checked practice questions for this part are in the app.

Part 9 · 1:20:00–1:23:53

This part shows how counting every possible roll of two special dice can reveal surprising wins that go against our intuition, and that the pattern can reverse depending on how many times the dice are rolled.

Key ideas

Words to know

outcome
One possible result of an experiment. Here, one pairing of a value from one die with a value from the other die.
leaf
The end point of a branch in a tree diagram. Each leaf stands for one possible result.
tournament
A set of games where every pair of players plays once, and one player always wins each game.
arbitrarily
As much as you want. The lesson says the dice can get as strange as you like.

Example

Picture three friends, A, B, and C, playing a game where each pair plays a match. Suppose A usually beats B, B usually beats C, and C usually beats A. No one is the clear best, and the results loop around in a circle, just like the dice in this lesson.

3 checked practice questions for this part are in the app.

← Lecture 16: Counting Rules I

Notes written by AI (Claude) from the lecture's official transcript, so check anything important against the lecture. MIT OpenCourseWare · CC BY-NC-SA 4.0 · not affiliated with or endorsed by MIT. These notes are shared under the same license.

LessonBound · Free lecture notes · Privacy · Terms · New York