İnteraktif Dersler

Discrete random variables

Lecture notes

Definition

A random variable and its table

A random variable gives every outcome of an experiment a number. Its distribution table lists each value with its probability .
1/401/211/42
Example
Two fair coins, = the number of heads. HH, HT, TH, TT are equally likely., , .
Rule

The probabilities add up to 1

Every probability is between and , and together they make exactly → . A table that does not add up to is not a distribution.
0.100.410.320.23
Example
→ a valid table. → not valid, whatever the values of are.
Rule

Find k

When a probability is unknown or holds , put the sum equal to and solve for . If is squared there are two roots: reject the one that gives a negative probability or one above .
k12k23k34k4
Example
for ., so and the table is .
Rule

P(X ≥ a) and the complement

The probability of an event is the sum of the probabilities of the values in it. Often the complement is shorter → .
0.100.410.320.23
Example
with ., the same as .
0.0510.120.1530.340.45
Definition

A table by counting a machine

When dice, coins or a spinner make , list the equally likely outcomes and count the ways to get each value; is the number of ways divided by the number of outcomes.
123412234233343444441234
Example
Two dice, = the sum. is made in of the pairs..
234567134567824567893567891046789101157891011126123456
Tip

Relative frequencies against the theory

An experiment gives counts. Divide each count by the total to get relative frequencies and compare them with the theoretical probabilities: they are close, not equal, and come closer with more repeats.
Example
A spinner with is spun times → .Relative frequencies ; the largest gap to the theory is .
0.510.320.23961632413
Definition

F(x) and P(a < X ≤ b)

adds the probabilities up to and including . Its graph is a staircase that never goes down and ends at . .
0.5100123
Example
with gives ..
01230.10.80.7
Definition

E(X) as a weighted mean

The expected value is the mean of the distribution: multiply each value by its probability and add, .
0.100.410.320.23μ=1.6
Example
with .. The plain mean of the four values ignores the weights.
Definition

E(X) as a balance point

Put the bars on a beam as weights. It balances at , where the pulls on the two sides cancel. A fulcrum anywhere else tilts the beam to the heavier side.
0.100.410.320.231.6
Example
Fulcrum at for the table above → .Negative, so the beam tilts left. At the sum is .
0.100.410.320.232
Special case

E(X) need not be a value of X

A fair die has , a number no throw gives. is the long-run average, not the most likely value, and it always lies between the smallest and the largest value.
1/611/621/631/641/651/66μ=3.5
Example
or , each with ., a value can never take.
0.500.51μ=0.5
Rule

The long run

The mean of many repeats settles near . The typical gap for repeats is about , and covers most runs: four times as many repeats halve the gap.
204060123456nm3.5
Example
A die thrown by the computer (a fixed seed): the mean of the first is , of is , of is .Each is within of .
Definition

Var(X): the average squared distance

The variance is the average of the squared distances to the mean. Squares make every distance count and big distances count most.
0.100.410.320.230.84
Example
: the squared distances for are ..
Rule

A shortcut: E(X²) − μ²

: the mean of the squares minus the square of the mean. It needs no distances and gives the same number, never a negative one.
Example
A fair die → and ..
σ123456μ
Definition

Standard deviation and its unit

The standard deviation is a typical distance from the mean, in the unit of . The variance is in the unit squared: minutes give minutes².
σ0.500.350.210μ=3.5
Example
Minutes late → with ., , min², min.
Watch out!

Same mean, different spread

Two distributions can have the same and still be very different: the mean says where the middle is, the standard deviation says how far the values lie from it. Give both.
σ0.2510.520.253σ0.2500.520.254
Example
→ and → , both with .Both have , but and , so is twice .
Rule

The new variable aX + b

For → and , so . Adding moves the table, multiplying by stretches it.
01231.6−21472.8
Example
→ with (, ). ., , .
Watch out!

b never counts, a is squared

never changes the spread. A variance is never negative, so is squared → , not . The standard deviation uses .
Example
as above, ., (not ), .
σ0.240.360.480.110μ=6.8
Rule

X + Y: the independence rule

always. For independent and also : the variances add, not the standard deviations.
σ23456789101112μ=7
Example
Two dice, each with and ., , .
Watch out!

2X is not X₁ + X₂

doubles one throw; adds two separate throws. Same mean, but and . For copies and .
3.42468101272.4234567891011127
Example
A die → ., but .
Rule

When X and Y depend on each other

Without independence , with . For independent variables .
σ0.400.210.42μ=1
Example
each or with and ()., , , .
Definition

Expected pay-off and the fair stake

Give each outcome its pay-off: the net result = prize − stake. The expected net result is what a player gains on average. The game is fair when : the stake equals the expected prize.
0.6−20.300.18μ=−0.4
Example
A prize draw → with , with , else nothing. The expected prize is .A ticket of gives ; the fair price is .
Rule

The organiser’s share and insurance

In the long run the organiser keeps stake − expected prize per ticket, and an insurer needs a premium above the expected claim. For customers the totals add up: the mean grows with , the standard deviation only with .
Example
A claim of has chance ( in ) → . A premium of leaves per customer. customers give ; each, so about in total, and the profit stays above .
Tip

A decision: mean and spread

Compare options by the expected value and by the spread. A higher mean is better only if you can live with the risk; an option with a sure pay-off has standard deviation .
0.700.320μ0.540.59μ
Example
→ with , else → , . → or , equally likely → , . has the higher mean and the smaller spread.
Tip

The guess test and a fair penalty

With choices a guess is right with chance . For for a right answer and for a wrong one, guessing is fair when , that is .
3/4−1/41/41μ=1/16
Example
choices, for a wrong answer → per question.Guessing all gives marks on average. The fair penalty is .
Tip

Stock: unsold items and lost sales

With stock and demand : unsold when , lost sales when . Find the expected unsold and lost numbers, price them, and choose the stock with the lowest expected cost.
0.180.290.4100.2110.112
Example
Demand with ; unsold costs , a lost sale . For :unsold , lost , cost . For the cost is , for it is .
Tip

Warranty: many items together

Each of independent items fails with chance and a repair costs . One item costs on average; items give and , so the spread grows only with .
Example
, , → ., . With items the mean is , but is only .
Tip

Which course asks what

Cambridge A level: table, and (Paper 5), and sums (Paper 6). IB SL: table, , uses; IB HL: variance and linear combinations. AP Statistics: table, mean and SD of a discrete variable. UK GCSE: risk and expected outcome. UK A level: the table only, no mean or variance (Further Maths). Wiskunde A and C vwo → and (school exam); D: also rules for dependent variables. CCSS: S-MD.
Example
Ask which course your class follows, then choose the cards: the table and for all, , and sums for IB HL, Cambridge Paper 6 and wiskunde D, pay-offs for GCSE and CCSS.

Exercises

A table has with . Find . Easy
0.1510.3520.33k4
Show solution
The probabilities add up to .
, so .
Check → , and is between and .
with . Find . Easy
0.110.320.430.24
Show solution
Add the values in the event → .
Or by the complement → .
Check → both routes give .
with . Find . Easy
0.200.310.320.23μ=1.5
Show solution
Multiply each value by its probability → , , , .
Add → .
Check → the table is symmetric about , so the balance point is .
A spinner has equal sectors numbered . is the number it shows. Give the table and . Easy
1/211/421/43
Show solution
Two of the four sectors show → and .
.
and
Check → , and lies between and .
and . Find , and for . Easy
Show solution
.
; the does not count.
.
, ,
Check → and .
with . Find and . Easy
12340.10.60.5
Show solution
Add up the probabilities → , , .
.
and
Check → .
for . Find , and . Medium
4k13k22k3k4
Show solution
The weights are → , so .
The table is , so .
.
, ,
Check → , and the bars fall away to the right, so lies left of the middle .
Two fair dice are thrown. is the larger of the two numbers. Give the table and find . Medium
123456122345623334563444456455555656666666123456
Show solution
Count the pairs with larger number → of the ; .
; check .
.
and
Check → is above : the larger of two numbers tends to be high.
with . Find by both routes. Medium
0.510.320.24μ=1.9
Show solution
.
Route 1 → .
Route 2 → and .
,
Check → the two routes agree, and a variance is never negative.
is the score of a fair die with faces. Find , and for . Medium
Show solution
and .
.
and .
, ,
Check → the variance is positive although : it is times .
A wheel pays with chance , with chance and nothing otherwise. Find the fair stake. A ticket costs : what does the organiser expect to gain from plays? Medium
1/803/821/28
Show solution
Expected prize → . The fair stake equals it.
At a stake of the organiser gains per play.
For plays → .
Fair stake ; expected gain
Check → the player expects per play, so in all.
A die has . How big is the typical gap between the mean of throws and for and for ? Medium
Show solution
The typical gap is about .
→ .
→ , half as big.
About for and for
Check → four times as many throws halve the gap; .
Two fair dice are thrown and is the sum. Find , and . Hard
234567134567824567893567891046789101157891011126123456
Show solution
Count the pairs → the sums come in ways, so .
Each die has and , and the dice are independent.
and .
, ,
Check → the table of the sum gives and .
with . Find and . Hard
0.611k2k²3
Show solution
The sum is → , so .
, so or . A probability cannot be negative, so .
The table is and .
and
Check → and would give a probability .
and have , , , . Let . Find and when and are independent, and when . Hard
Show solution
in both cases.
Independent → , so .
With add → .
; (independent), (with )
Check → the cross term is negative because and have opposite signs, so a positive covariance lowers the variance.
A player pays for a wheel that pays (chance ), () or nothing, so or . Find and , and the mean and SD of the total of plays. Hard
Show solution
.
, so .
plays → mean , .
, ; the total has mean and
Check → the organiser gains , about to , above .
Demand is to with . Unsold costs , a lost sale . Which stock out of costs least? Hard
0.180.290.4100.2110.112
Show solution
→ unsold , lost , cost .
→ unsold , lost , cost .
→ unsold , lost , cost .
with an expected cost of
Check → a lost sale costs more than an unsold item, so the best stock is above the most likely demand .
and are each or with and . Find and , and check with the table of . Hard
0.300.410.32μ=1
Show solution
, so and .
, so .
.
and
Check → is with ; , and .
Are you a teacher?

Start live lessons with these applications for your whole class. Free to try for one month.

Try it free

Fits these school years

IB (MYP, Diploma): Diploma, year 1, Diploma, year 2

Cambridge International: AS Level, A Level

Netherlands: Vwo · Mathematics A, Vwo · Mathematics C, Vwo · Mathematics D

England (GCSE, A Level): Year 12 (A Level), Year 13 (A Level), Year 10 (GCSE), Year 11 (GCSE)

USA (Common Core): Algebra 2, Precalculus

What the applications of this topic teach 6 applications

Distribution table: values and probabilities

  • Writing a distribution table and checking that probabilities add up to 1
  • Finding k and P(X ≥ 2) from a table or the cumulative F(x)
  • Building a table from dice, coins or a bag and comparing with an experiment

Expected value: the balance point

  • Finding E(X) as a weighted mean
  • Seeing E(X) as the balance point of bars on a beam
  • Explaining that E(X) is the long-run average

Variance and spread: how far from the mean?

  • Finding Var(X) as the average squared distance to the mean
  • Giving the standard deviation exactly and as a decimal
  • Comparing two tables with the same mean

Change and combine: aX + b and X + Y

  • Finding E and Var of aX + b from the rules
  • Finding E and Var of X + Y for independent variables
  • Using the covariance when X and Y depend on each other

Expected pay-off: games, insurance, decisions

  • Working out the expected net result of a game and the fair price
  • Finding the expected claim, margin and spread of an insurance
  • Comparing two options by expected value and spread

Random variables in everyday life

  • Working out if a prize draw ticket price is fair
  • Finding the expected mark of a guess test and a fair penalty
  • Finding expected unsold items and the cost of a warranty