Discrete Random Variables; Probability Mass Functions; Expectations
MIT 6.041 Probabilistic Systems Analysis and Applied Probability, lecture 5, 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 freeWatch or read the original lecture: MIT OpenCourseWare.
Part 1 · 0:00–10:00
This part explains what a random variable is: a rule that gives a number to each outcome of an experiment, and how such rules can be sorted into discrete and continuous types.
Key ideas
- A random variable gives a number to each possible outcome of an experiment. Picking a random student and measuring their height is the example used. 2:20
- The random variable H (height) is the rule itself. The numbers like 60 or 71 inches are the values that rule produces for one particular student. 4:17
- A function of a random variable is also a random variable. For example, height converted to centimeters is still random, because one outcome fixes its value. 6:04
- Random variables are either discrete, taking separate whole-number values like rounded inches, or continuous, taking any value in a range like infinitely precise height. Discrete ones come first because they are easier. 7:32
- Keep the rule and its values separate in your head. The random variable is a function, not a number, and not a variable in the everyday sense. 9:17
Words to know
- random variable
- A rule that assigns a number to each possible result of an experiment. Despite the name, the rule itself is not random.
- sample space
- The full set of all possible results of an experiment. In the lesson, it is all the students in the class.
- discrete
- Made of separate, countable values, such as whole numbers, with gaps between them.
- probability mass function
- A compact way to list each possible numerical value of a random variable together with how likely it is.
Example
Imagine picking one student at random from a class and measuring their height in inches. The measuring rule is the random variable, and the number you read off the tape, like 60 or 71, is one of its values. If you then convert that same height to centimeters, you have a new rule built from the first one, and it is also a random variable.
3 checked practice questions for this part are in the app.
Part 2 · 10:00–20:00
This part explains how a random variable turns chance outcomes into numbers, and how a probability mass function (PMF) shows how likely each number is.
Key ideas
- A random variable is a rule that takes each outcome of an experiment and gives back a number. Once you pick a specific outcome, the rule gives one specific number. 10:17
- Capital letters like X name the random variable, and lowercase letters like x name the numbers it can take. Keeping them apart stops you from mixing up the rule and its results. 10:38
- The PMF is a bar graph. The height of the bar at a number x is the total probability of all outcomes that lead to x. 13:17
- Every PMF bar is zero or more, and all the bars together add up to one. This is because every outcome leads to some number. 13:39
- In the coin example, the number of tosses until the first head gives a geometric PMF. The chance of first seeing heads on toss k is found by multiplying the chances of the tails and the final head, since each toss is independent. 16:30
Words to know
- random variable
- A rule that turns each outcome of a chance experiment into a number.
- sample space
- The full set of all possible outcomes of an experiment.
- probability mass function (PMF)
- A list or bar graph showing how likely each possible number from a random variable is.
- geometric
- A pattern where each step is a fixed multiple of the one before, so the bars shrink at a steady rate.
Example
Imagine a teacher picks one student from a class and writes down that student's test score. Each student is an outcome, and the score is the number the rule gives back. A PMF would then show how likely each score is, based on how likely each student is to be picked.
3 checked practice questions for this part are in the app.
Part 3 · 20:00–30:00
This part explains how to build a probability mass function (PMF) and introduces the expected value, which is a long-run average of a random variable.
Key ideas
- A PMF lists the chance that a random variable takes each value. To find the chance for one value, add up the probabilities of all the outcomes that give that value. 20:20
- In the coin example with 4 tosses, there are 6 ways to get exactly 2 heads. The general formula uses the 'n choose k' count to count those ways. 22:09
- When you plot the PMF for many coin tosses, the bars form a bell shape. Middle numbers of heads are common, and very high or very low numbers are rare. 24:02
- The expected value is a weighted average. Multiply each value by its probability, then add them up. If you play a game many times, this is the average payout you should expect. 26:37
- The expected value can also be seen as a center of gravity. For a uniform variable with symmetric values, symmetry tells you the expected value is the middle, which is n over 2. 29:54
Words to know
- PMF (probability mass function)
- A rule or bar graph that shows the chance of each possible number a random variable can take.
- Random variable
- A number whose value depends on the result of a random experiment, like the number of heads in several coin tosses.
- Expected value
- The average result you would get if you repeated the experiment a very large number of times, found by weighting each value by its probability.
- n choose k
- The number of different ways to pick k items from n items when order does not matter. For example, 4 choose 2 is 6.
Example
Imagine a game where you win 1 dollar one time in six, 2 dollars half the time, and 4 dollars one time in three. If you played a huge number of times, your average win per game would be 2.5 dollars, because the bigger wins count more when they happen more often.
3 checked practice questions for this part are in the app.
Part 4 · 30:00–40:00
This part shows how to find the average (expected value) of a new quantity built from a random variable, and some simple rules for how averages behave.
Key ideas
- A new random variable can be built from an old one by applying a formula to it, such as Y = g(X). Once you know the value of X, the value of Y is fixed. 31:28
- You can find the average of Y without first working out Y's full probability table. You can use the probabilities of X and the formula g directly. The lecturer calls this a shortcut, and says it needs a proof, so it is not just true by definition. 35:05
- The average of a function is usually not the same as the function of the average. You cannot simply plug the average into the formula and expect the right answer. 36:16
- A fixed number, like 2, is a special random variable that always gives the same result. Its average is just that number. 38:26
- If you multiply a quantity by a fixed number, its average gets multiplied by that same number. The height example shows this: converting inches to centimeters multiplies the average height by 2.5. 39:34
Words to know
- random variable
- A rule that gives a number for each possible outcome of an experiment. The number changes depending on what happens.
- expected value
- The long-run average result you would get if you repeated the experiment many times, weighting each value by how likely it is.
- function of a random variable
- A new random variable made by applying a formula to an existing one, so its value depends on the first one's value.
- law of the unconscious statistician
- The name for the shortcut that lets you find the average of a function of X using only X's probabilities. The lecture says it must be proved, not just assumed.
Example
Imagine a shop where the number of apples you buy is random, and each apple costs the same fixed price. The average total cost is the average number of apples times the price, and not the price applied to the average apples in a tricky way. The lecture's height example works the same way: if every height is multiplied by 2.5, the average height is multiplied by 2.5 too.
3 checked practice questions for this part are in the app.
Part 5 · 40:00–50:34
This part explains how multiplying or shifting a random variable changes its average, and introduces variance as a way to measure how spread out the values are.
Key ideas
- If you multiply every value by a number, the average gets multiplied by that same number. For example, doubling every height doubles the average height. 40:20
- If you add a fixed amount to every value, the average goes up by that same amount. This is the linearity property: for a straight-line function, the average of the function equals the function of the average. 41:49
- Variance measures how spread out the values are. It is the average of the squared distance of each value from the mean, so big distances count extra. 45:33
- Variance is never negative, because it is built from squared distances, and squares of numbers cannot be negative. 48:26
- Adding a constant to a random variable does not change its variance. Multiplying by a constant alpha multiplies the variance by alpha squared. 49:09
Words to know
- Random variable
- A number whose value depends on the result of an experiment, so it can come out differently each time.
- Expected value (expectation)
- The long-run average value you would get if you repeated the experiment many times, weighted by how likely each value is.
- Variance
- A measure of how spread out the values are around the average. A big variance means values are far from the average on typical runs.
- Linearity
- A simple straight-line rule: you can multiply by a number and add a number, and the average follows the same steps.
Example
Think of a class where everyone's height is recorded in inches. If the teacher converts every height to centimeters by multiplying by about 2.54, the class average also gets multiplied by 2.54. If the gods then give everyone a 10 cm bonus, the average goes up by exactly 10 cm, and the spread of heights stays the same.
3 checked practice questions for this part are in the app.
← Lecture 2: Conditioning and Bayes' Rule · Lecture 8: Continuous Random Variables →
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