Discord

INAIO Guide Stage 1 9Random Variables and Expected Value

9.1 Discrete random variables

Turn outcomes into numbers, build a discrete probability distribution, and check that its probabilities sum to one.

A random experiment produces an outcome; a random variable turns that outcome into a number you can study. It might count successes, record a cost, or give a score. This is the bridge from basic probability to expected value.

This is foundational to intermediate probability. Begin with OpenStax's discrete-distribution lesson. You should know sample spaces and event probabilities first.

A basic idea: one number for each outcome

Let XX be the number of heads in two fair tosses. The four equally likely outcomes are TT,TH,HT,HHTT,TH,HT,HH, and XX assigns them 0,1,1,20,1,1,2. Several outcomes can produce the same value. The distribution gathers their probabilities.

Value xx 00 11 22
P(X=x)P(X=x) 1/41/4 1/21/2 1/41/4
Bar chart for the number of heads in two tosses: probabilities one quarter at zero, one half at one, and one quarter at two.Bar chart for the number of heads in two tosses: probabilities one quarter at zero, one half at one, and one quarter at two.
Different outcomes can share the same random-variable value.

A quick tour of properties

For a discrete variable XX, its probability mass function is pX(x)=P(X=x)p_X(x)=P(X=x). Every value has 0≤pX(x)≤10\le p_X(x)\le1, and the probabilities over all possible values add to 11. To find P(X≥k)P(X\ge k), add the probabilities at values at least kk. A count always takes nonnegative integer values; a payoff can be negative.

Application 1: count heads

What is the chance of at least one head in two fair tosses?

  1. The table gives P(X=1)=1/2P(X=1)=1/2 and P(X=2)=1/4P(X=2)=1/4.
  2. These possible values cannot occur together, so add them.
  3. P(X≥1)=1/2+1/4=3/4P(X\ge1)=1/2+1/4=3/4.

Application 2: a small reward game

A machine gives 55 points for a red token, 22 points for blue, and no reward for green. Their probabilities are 0.10.1, 0.30.3, and 0.60.6. Let YY be the reward.

Reward yy 00 22 55
P(Y=y)P(Y=y) 0.60.6 0.30.3 0.10.1

The probabilities sum to 11. The chance of a reward of at least 22 is 0.3+0.1=0.40.3+0.1=0.4. The distribution is about rewards, so its values are 0,2,50,2,5, not the colour names.

Resources

SourceTitleWhy read it
OpenStaxDiscrete random variablesLearn to tabulate values and their probabilities.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments