EC 285 - 2026-09-29 - Lecture 06

EC 285 - Lecture 06 - 2026-09-29

Introductory Statistics · Zara Liaqat · SB 106

Week 4 · 16:01-17:16 · 74 min · Full transcript · Flashcards

Overview

This lecture started Chapter 4, Discrete Random Variables and Probability Distributions. It set out the three-step pattern used for every distribution in the rest of the course: the probability function, the expected value and the variance. It then defined random variables and built a full probability distribution for tossing two coins, with its cumulative probabilities, mean, variance and standard deviation. It ended with linear functions of random variables, which lead into portfolio analysis after the midterm. The named distributions on the slides (Bernoulli, binomial, Poisson) and joint distributions were not reached. Chapter 4 is not on Midterm 1.

How the distribution chapters work

The three-step pattern

Every probability distribution in this course, discrete or continuous, gets described in the same three steps. First comes the function, which says when to use the distribution and gives the probabilities. Second comes the expected value, which is the average. Third comes the variance, which measures the spread.

Why: Together the three steps give a complete description of a distribution. You know which values can happen and how likely each is, where the centre is, and how spread out it is.

Exam

The formula sheets for Midterm 2 and the final list each distribution by name, with its mean and variance. (Check the sheets: Bernoulli, binomial, Poisson and uniform have their mean and variance written out. The normal entry gives only its density, and the exponential gives only its density and cumulative function.) The Midterm 1 sheet does not list the distributions. It only has the normal density. She said to "use that formula sheet like the memory aid", but "you still need to know how to apply those formulas", and that is what the class examples are for. Things like standard deviations, averages and medians are not on the Midterm 1 sheet, so remember them.

Random variables

This picks up the discrete versus continuous split from Chapter 1 (Lecture 02).

Random variable

A random variable is a possible numerical value from a random experiment. It is random because you don't know the outcome ahead of time, and several outcomes are possible.

Discrete and continuous

Why: The two types need different tools. Chapter 4 is the only chapter on discrete random variables. Continuous ones start in Chapter 5 and fill most of the rest of the course.

Capital X and small x

Capital X is the random variable itself, as defined in the question. Small x is one specific value that X can take. In the die-rolling example (one die rolled twice), X is "the number of 4s" and x is 0, 1 or 2.

Why: Formulas such as P(X=x) use both letters at once, so you need to keep them apart to read the formulas.

Exam

"This big versus small x is consistently used throughout the course. It will always be the case that the big X is the random variable and the small x is one specific value."

Probability distributions

Probability distribution function

The probability distribution function lists every possible value of a random variable together with its probability. You can give it as a table, as a chart, or as both. P(X=x) is read as "the probability that the random variable X takes the specific value x". The notation looks different from P(A) in Chapter 3, but the idea is the same.

Why: The value of a random variable is unknown ahead of time, so the best full description is every value it could take and how likely each one is. That also shows the centre and the spread.

Properties: every P(x) is between 0 and 1, and the probabilities over all possible values add up to 1.

0≤P(x)≤1∑xP(x)=1

where P(x) is the probability that X takes the value x, and the sum runs over every possible x.

Example: number of heads in two coin tosses

Toss two coins and let X be the number of heads. Describe the probability distribution of X. The four equally likely outcomes are HH, HT, TH and TT.

  1. x=0 (TT), x=1 (HT or TH), x=2 (HH) -- list every possible value of X; there is no fourth option.
  2. P(X=0)=14=0.25 -- one favourable outcome (TT) out of four.
  3. P(X=1)=24=0.5 -- two favourable outcomes (HT, TH) out of four.
  4. P(X=2)=14=0.25 -- one favourable outcome (HH) out of four.
  5. 0.25+0.5+0.25=1 -- check that the probabilities add to 1.

Answer: P(X=0)=0.25, P(X=1)=0.5, P(X=2)=0.25 -- getting exactly one head is the most likely result.

She also drew this distribution as a bar chart, with one bar at each of 0, 1 and 2, all the same width. Plain vertical lines are fine too.

left=-0.5; right=2.5; bottom=0; top=0.6
---
(0,0.25)
(1,0.5)
(2,0.25)

x is the number of heads, and y is the probability of that number.

A discrete random variable gives a chart of separate bars like this one. A continuous random variable gives a smooth curve, often bell-shaped.

Skewness review

This came up as an aside while she sketched a continuous curve with a long right tail. It reviews "Shape and skewness" from Lecture 02. A distribution with a long right tail is right-skewed. In a right-skewed distribution the median is less than the mean.

Why: The large values in the right tail pull the average up, but they barely move the middle value.

Exam

This is Chapter 2 material, so it is fair game for Midterm 1. The class got it wrong at first: someone said left-skewed, and the answer is right-skewed. She said "These are all potential exam questions, and I'm a bit worried that nobody is able to answer them", and called it "a potential exam, an easy MCQ setting."

Cumulative probability function

The cumulative probability F(x0) is the probability that X does not exceed the value x0. It is the sum of the probabilities of every value up to and including x0.

F(x0)=P(X≤x0)

where x0 ("x naught") is one particular value of X.
Not on any formula sheet, so memorise it. The exponential distribution's F(t) on the Midterm 2 and final sheets is a different, specific formula.

Properties:

0≤F(x0)≤1if x0<x1 then F(x0)≤F(x1)

where x0 and x1 are two values of X, with x1 the larger.

The two cumulative probabilities can be equal. That happens when x1 is not a possible outcome (and no possible value lies between x0 and x1), so its probability is zero and adds nothing to the running total. The cumulative probability of the largest possible value is always 1, because X is certain to be at or below it.

Why: It is more information about the discrete case. For example, P(X≤1) is the chance of 1 head or fewer. Its main use comes with continuous variables. There, a probability such as "the class midterm average is between 70 and 75" is found by taking the difference of two cumulative probabilities.

Example: cumulative probabilities for two coin tosses

Use the two-coin table: P(0)=0.25, P(1)=0.5, P(2)=0.25.

  1. F(0)=0.25 -- no values lie below 0, so this is just P(0).
  2. F(1)=0.25+0.5=0.75 -- add P(1) to the running total.
  3. F(2)=0.75+0.25=1 -- add P(2); the last value always reaches 1.

Answer: F(0)=0.25, F(1)=0.75, F(2)=1 -- for example, there is a 75% chance of getting at most one head.

Expected value and variance

These use the two-coin table, and they are the discrete, probability-weighted versions of the mean and variance from Chapter 2 (Lectures 02 and 03).

Expected value

The expected value of X is its mean, or average. It is written E[X] or μ (the Greek letter mu). There is "no difference" from the mean you have seen before. If you are asked for the expected value, give the average.

Why: It is a weighted average. If every value were equally likely, say 13 each, you would just add the values and divide by 3. Here the values have different probabilities, so each one is weighted by how likely it is.

E[X]=μ=∑xxP(x)

where x runs over every possible value of X and P(x) is its probability.
Not on any formula sheet, so memorise it. The sheets only give E[X] for the named distributions.

Example: expected number of heads in two coin tosses

Use the table P(0)=0.25, P(1)=0.5, P(2)=0.25. From the chart, the centre looks to be about 1.

  1. E[X]=0(0.25)+1(0.5)+2(0.25) -- multiply each value by its probability, then add.
  2. =0+0.5+0.5 -- work out each product.
  3. =1 -- add them.

Answer: μ=1 -- on average you get one head, which matches the middle of the chart.

Exam

"It's so important… even at the end of the term, I've seen students not knowing this concept, and we are going to use this so many times." Also: "this formula is not on the formula sheet, so you have to remember this."

Variance and standard deviation

The variance σ2 of X is the average of the squared gaps from the average. Each gap is weighted by its probability. The standard deviation σ is the square root of the variance.

Why: It is the same idea as the Chapter 2 variance. For each value, find how far it is from the mean, square that gap, and average the squares. The only change is that the average is now weighted by probability. The slide gives the general rule E[g(X)]=∑xg(x)P(x) for the expected value of any function of X. The variance is that rule with g(X)=(X−μ)2.

σ2=E[(X−μ)2]=∑x(x−μ)2P(x)

where μ is the expected value of X, x runs over every possible value, and P(x) is its probability.

σ2=∑xx2P(x)−μ2

This is the rarely used shortcut, and it gives the same answer.

σ=σ2

where σ is the standard deviation.

Not on any formula sheet, so memorise one of the two variance formulas. She prefers the first because it matches the definition: differences from the mean, squared, then averaged.

Example: variance of the number of heads in two coin tosses

Use the table P(0)=0.25, P(1)=0.5, P(2)=0.25 and the mean μ=1 from above.

  1. σ2=(0−1)2(0.25)+(1−1)2(0.5)+(2−1)2(0.25) -- subtract the mean from each value, square it, and weight it by its probability.
  2. =(1)(0.25)+(0)(0.5)+(1)(0.25) -- work out the squared gaps.
  3. =0.25+0+0.25=0.5 -- multiply and add.
  4. σ=0.5≈0.707 -- take the square root to get the standard deviation.

Answer: σ2=0.5 and σ≈0.707 -- the number of heads typically sits about 0.7 away from the mean of 1.

Made-up example: checking with the shortcut formula

She set this as optional homework: show that the shortcut formula gives the same variance. Use the same table, with μ=1.

  1. ∑x2P(x)=02(0.25)+12(0.5)+22(0.25) -- square each value and weight it by its probability.
  2. =0+0.5+1=1.5 -- work out and add the products.
  3. σ2=1.5−12=0.5 -- subtract the squared mean.

Answer: σ2=0.5 -- the same answer as the first formula.

Exam

You only need one variance formula: "You only need to remember one." You can pick "whichever you like more." For practice, she pointed to the textbook examples, where the tables are longer and the arithmetic is harder: "This is midterm two, but still important."

Linear functions of random variables

Mean and variance of a linear function

Let X be a random variable with mean μX and variance σX2, and let a and b be constants. Then Y=a+bX is also a random variable, because it moves whenever X moves. If you know the distribution of X, you can work out the mean and variance of Y.

Why: The mean follows the same rule as the variable. Suppose she doubled everyone's grades: the class average would double too. Suppose she added 5 points to everyone's grade: the whole distribution would shift right by 5, so the average goes up by 5, but the spread does not change. That is why a drops out of the variance. The multiplier b is squared because variance squares the gaps from the mean. Scaling every value by b scales every gap by b, and squaring the gap squares b too.

μY=E[a+bX]=a+bμXσY2=Var(a+bX)=b2σX2

where a is the constant that is added, b is the constant that multiplies, and μX and σX2 are the mean and variance of X.
Not on any formula sheet, so memorise it.

Made-up example: a coin game payout

Toss two coins, with X the number of heads (μX=1, σX2=0.5 from above). You get $3 for playing plus $2 per head, so the payout is Y=3+2X.

  1. μY=3+2μX=3+2(1) -- apply the mean rule with a=3 and b=2.
  2. =5 -- the arithmetic.
  3. σY2=22σX2=4(0.5) -- apply the variance rule; the $3 drops out.
  4. =2 -- the arithmetic.

Answer: μY=$5 and σY2=2 -- the $3 flat amount raises the average payout but does nothing to its spread.

Constants and scaling

These side rules explain the formulas above. The expected value of a constant is the constant itself, since it only ever takes one value. The variance of a constant is zero, since it never varies. (In class, someone guessed "the constant" or "the square root of a", but the answer is zero.) Multiplying by a constant scales the mean by that constant and the variance by its square.

Why: A constant such as 0.5 is always 0.5, so its average is 0.5 and it has no spread at all.

E[a]=aVar(a)=0E[aX]=aμXVar(aX)=a2σX2

where a is any constant and μX and σX2 are the mean and variance of X.
Not on any formula sheet, so memorise it.

Made-up example: scaling a random variable

Take the two-coin X (μX=1, σX2=0.5) and the constants a=4 and a=7.

  1. E[7]=7 and Var(7)=0 -- a constant is its own average and has no spread.
  2. E[4X]=4(1)=4 -- multiply the mean by 4.
  3. Var(4X)=42(0.5)=16(0.5)=8 -- multiply the variance by 4 squared.

Answer: E[4X]=4 and Var(4X)=8 -- scaling by 4 multiplies the mean by 4 but the variance by 16.

Portfolio analysis preview

This is the main application of linear functions, and it was only previewed. Suppose you have $1,000 to split between two stocks, X and Y, whose returns are random variables. You might put 50% in each, or 30% and 70% if you like Y more. Your portfolio return W is then a linear combination of X and Y, so it is a random variable too. From the expected returns and variances of X and Y, which come from historical data, you can predict the average return on W and how much it will fluctuate. The same idea works with more than two stocks.

Why: It helps an investor decide how to allocate funds, depending on the stocks' average returns, how much they vary, and how risk-averse the investor is.

A worked example with real numbers is coming after the midterm, either in class or in a tutorial.

Exam checklist

Admin & deadlines


Transcribed automatically from the lecture recording. Slides used: EC 285 - Ch. 04 - Discrete Random Variables (slides).pdf. Course info used: EC 285 - Formula Sheet - Final.pdf, EC 285 - Formula Sheet - Midterm 1.pdf, EC 285 - Formula Sheet - Midterm 2.pdf, EC 285 - Syllabus - Fall 2026.pdf. Audio archived at /mnt/porsche/configs/lectures/archive/2026-09/EC 285 - 2026-09-29 - Lecture 06.opus.