Expected value and random variable practice problems

By Jude Wallis · Published

This set has eight practice problems on discrete random variables: finding an expected value from a probability table, computing the standard deviation, judging whether a game is fair, and comparing expected values. Work each one first, then check every step in the solution.

AP Statistics: Unit 2 (topics 2.8 Introduction to Random Variables and Probability Distributions, 2.9 Parameters of Random Variables). In the Fall 2026 AP Statistics course, constructing a discrete probability distribution is Unit 2 topic 2.8 (learning objective 2.8.A), and calculating the mean and standard deviation of a discrete random variable is topic 2.9 (objective 2.9.A), with interpretation in context in 2.9.B. The expected value is the probability-weighted mean, and fair-game and comparison questions apply it. Combining two random variables was removed from this course, so each problem here uses a single random variable.

What these problems build

These 8 problems build the two core skills of Unit 2 topic 2.9: reading a probability table and turning it into an expected value, μX=xiP(xi)\mu_X = \sum x_i P(x_i), and into a standard deviation, σX=(xiμX)2P(xi)\sigma_X = \sqrt{\sum (x_i - \mu_X)^2 P(x_i)}, where μX\mu_X (say "mu") is the mean and σX\sigma_X (say "sigma") is the standard deviation. Later problems apply those tools to fair-game questions and to choosing between two options by comparing expected values.

Work each problem with pencil and paper before opening the solution, and keep every probability-weighted product visible so your arithmetic is easy to check. For the underlying concepts see the Unit 2 page on probability and random variables and parameter vs statistic. To confirm a single answer, use the expected value calculator, and find more sets on the practice page.

Problem 1

An online bookshop records the number of books XX in a single customer order. The distribution is shown below.

Books ordered xx1234
P(x)P(x)0.50.30.150.05

Find the expected number of books per order.

Show the worked solution
  1. Write the expected value formula for a discrete random variable, which weights each value by its probability: E(X)=μX=xiP(xi)E(X) = \mu_X = \sum x_i P(x_i), where μX\mu_X (say "mu") is the mean, xix_i is a possible value, and P(xi)P(x_i) is its probability.

  2. Check that the probabilities add to 1: 0.5+0.3+0.15+0.05=1.000.5 + 0.3 + 0.15 + 0.05 = 1.00, so the table is a valid distribution.

  3. Multiply each number of books by its probability: 1(0.5)=0.51(0.5) = 0.5, 2(0.3)=0.62(0.3) = 0.6, 3(0.15)=0.453(0.15) = 0.45, and 4(0.05)=0.204(0.05) = 0.20.

  4. Add those products: 0.5+0.6+0.45+0.20=1.750.5 + 0.6 + 0.45 + 0.20 = 1.75 books.

  5. Read the result as a long-run average: over many orders the store averages about 1.75 books per order, even though no single order can hold 1.75 books.

E(X)=μX=1.75E(X) = \mu_X = 1.75 books per order.

Problem 2

A food truck lets each customer add side dishes. Let XX be the number of sides one customer adds, with the distribution below.

Sides xx012
P(x)P(x)0.20.50.3

Find the mean and the standard deviation of XX.

Show the worked solution
  1. Find the mean first, since the standard deviation formula needs it. Use μX=xiP(xi)\mu_X = \sum x_i P(x_i): 0(0.2)+1(0.5)+2(0.3)=0+0.5+0.6=1.10(0.2) + 1(0.5) + 2(0.3) = 0 + 0.5 + 0.6 = 1.1 sides.

  2. Set up the standard deviation formula, the square root of the probability-weighted squared distances from the mean: σX=(xiμX)2P(xi)\sigma_X = \sqrt{\sum (x_i - \mu_X)^2 P(x_i)}, where σX\sigma_X (say "sigma") is the standard deviation.

  3. Find each squared deviation from μX=1.1\mu_X = 1.1: (01.1)2=1.21(0 - 1.1)^2 = 1.21, (11.1)2=0.01(1 - 1.1)^2 = 0.01, and (21.1)2=0.81(2 - 1.1)^2 = 0.81.

  4. Weight each squared deviation by its probability: 1.21(0.2)=0.2421.21(0.2) = 0.242, 0.01(0.5)=0.0050.01(0.5) = 0.005, and 0.81(0.3)=0.2430.81(0.3) = 0.243.

  5. Add the weighted values to get the variance: 0.242+0.005+0.243=0.4900.242 + 0.005 + 0.243 = 0.490.

  6. Take the square root for the standard deviation: σX=0.490=0.7\sigma_X = \sqrt{0.490} = 0.7 sides.

μX=1.1\mu_X = 1.1 sides and σX=0.49=0.7\sigma_X = \sqrt{0.49} = 0.7 sides.

Problem 3

A pottery studio tracks the number of bowls XX a student finishes in one session. One probability is missing from the table.

Bowls xx2345
P(x)P(x)0.3?0.250.15

Find the missing probability, then find the expected number of bowls per session.

Show the worked solution
  1. Use the rule that the probabilities of a discrete distribution must add to 1. Add the three known probabilities: 0.3+0.25+0.15=0.700.3 + 0.25 + 0.15 = 0.70.

  2. Subtract from 1 to get the missing probability for x=3x = 3: P(3)=10.70=0.30P(3) = 1 - 0.70 = 0.30.

  3. Now apply μX=xiP(xi)\mu_X = \sum x_i P(x_i). Multiply each value by its probability: 2(0.3)=0.62(0.3) = 0.6, 3(0.30)=0.93(0.30) = 0.9, 4(0.25)=1.04(0.25) = 1.0, and 5(0.15)=0.755(0.15) = 0.75.

  4. Add the products: 0.6+0.9+1.0+0.75=3.250.6 + 0.9 + 1.0 + 0.75 = 3.25 bowls.

The missing probability is P(3)=0.30P(3) = 0.30, and E(X)=3.25E(X) = 3.25 bowls per session.

Problem 4

At a street fair, a ring-toss booth costs 2 dollars to play. You win a 5-dollar gift card with probability 0.2 and win nothing otherwise. (a) Find your expected net gain per play and state whether the game is fair. (b) Keeping the 2-dollar cost and the 0.2 win probability, what gift-card value would make the game fair?

Show the worked solution
  1. Build the net-gain random variable. If you win, your net gain is the 5-dollar card minus the 2-dollar cost: 52=35 - 2 = 3 dollars, which happens with probability 0.2. If you lose, your net gain is 02=20 - 2 = -2 dollars, with probability 10.2=0.81 - 0.2 = 0.8.

  2. Apply E(net)=xiP(xi)E(\text{net}) = \sum x_i P(x_i): 3(0.2)+(2)(0.8)3(0.2) + (-2)(0.8).

  3. Multiply each term: 3(0.2)=0.63(0.2) = 0.6 and (2)(0.8)=1.6(-2)(0.8) = -1.6.

  4. Add them: 0.6+(1.6)=1.00.6 + (-1.6) = -1.0 dollars. A fair game has an expected net gain of 0, so this game is not fair; on average you lose 1 dollar per play.

  5. For part (b), let WW be the gift-card value. The net gain is W2W - 2 with probability 0.2 and 2-2 with probability 0.8. Set the expected net gain to 0: (W2)(0.2)+(2)(0.8)=0(W - 2)(0.2) + (-2)(0.8) = 0.

  6. Expand and solve: 0.2W0.41.6=00.2W - 0.4 - 1.6 = 0, so 0.2W2.0=00.2W - 2.0 = 0, giving 0.2W=2.00.2W = 2.0 and W=2.00.2=10W = \frac{2.0}{0.2} = 10 dollars.

(a) Expected net gain is 1-1 dollar per play, so the game is not fair. (b) A gift card worth 10 dollars makes the expected net gain 0, a fair game.

Problem 5

A word game offers two bonus rounds after a correct answer, and you may pick only one. Bonus A gives 25 points with probability 0.8 and 5 points with probability 0.2. Bonus B gives 100 points with probability 0.15 and 0 points with probability 0.85. Which bonus has the higher expected point value?

Show the worked solution
  1. Compute the expected value of Bonus A with μX=xiP(xi)\mu_X = \sum x_i P(x_i): 25(0.8)+5(0.2)25(0.8) + 5(0.2).

  2. Multiply and add: 25(0.8)=2025(0.8) = 20 and 5(0.2)=15(0.2) = 1, so E(A)=20+1=21E(A) = 20 + 1 = 21 points.

  3. Compute the expected value of Bonus B the same way: 100(0.15)+0(0.85)100(0.15) + 0(0.85).

  4. Multiply and add: 100(0.15)=15100(0.15) = 15 and 0(0.85)=00(0.85) = 0, so E(B)=15+0=15E(B) = 15 + 0 = 15 points.

  5. Compare the expected values: 21>1521 > 15, so Bonus A is worth more on average even though Bonus B dangles the larger single prize. The 100-point payout is too rare to lift B's average above A's.

Bonus A has the higher expected value, 21 points versus 15 points for Bonus B.

Problem 6

A downtown garage charges 4 dollars per hour and rounds every stay up to a whole hour. Let XX be the number of hours a weekday car stays.

Hours xx1234
P(x)P(x)0.40.350.150.10

(a) Find the expected number of hours per car. (b) Find the expected parking revenue per car. (c) On a day with 250 cars, what total revenue should the garage expect?

Show the worked solution
  1. For part (a), apply μX=xiP(xi)\mu_X = \sum x_i P(x_i) to the hours: 1(0.4)+2(0.35)+3(0.15)+4(0.10)1(0.4) + 2(0.35) + 3(0.15) + 4(0.10).

  2. Multiply each term to get 0.40.4, 0.70.7, 0.450.45, and 0.400.40, then add: 0.4+0.7+0.45+0.40=1.950.4 + 0.7 + 0.45 + 0.40 = 1.95 hours.

  3. For part (b), revenue is 4 dollars times the hours, so build a revenue value for each outcome: 4(1)=44(1) = 4, 4(2)=84(2) = 8, 4(3)=124(3) = 12, and 4(4)=164(4) = 16 dollars, each with the same probability as its hour count.

  4. Take the expected revenue with the same weighting: 4(0.4)+8(0.35)+12(0.15)+16(0.10)=1.6+2.8+1.8+1.6=7.84(0.4) + 8(0.35) + 12(0.15) + 16(0.10) = 1.6 + 2.8 + 1.8 + 1.6 = 7.8 dollars per car.

  5. As a check, expected revenue equals 4 dollars times the expected hours: 4×1.95=7.804 \times 1.95 = 7.80 dollars, which matches step 4.

  6. For part (c), the expected total for 250 cars is the per-car expected revenue times the number of cars: 250×7.80=1950250 \times 7.80 = 1950 dollars.

(a) 1.95 hours per car; (b) 7.80 dollars per car; (c) about 1,950 dollars from 250 cars.

Problem 7

A farmers-market stall records the number of reusable bags XX each shopper brings. One probability is missing.

Bags xx0123
P(x)P(x)0.40.3?0.1

(a) Find the missing probability. (b) Find the mean number of bags. (c) Find the standard deviation. (d) Interpret the mean in context.

Show the worked solution
  1. For part (a), the probabilities must add to 1. Add the known values: 0.4+0.3+0.1=0.80.4 + 0.3 + 0.1 = 0.8, so P(2)=10.8=0.2P(2) = 1 - 0.8 = 0.2.

  2. For part (b), apply μX=xiP(xi)\mu_X = \sum x_i P(x_i): 0(0.4)+1(0.3)+2(0.2)+3(0.1)=0+0.3+0.4+0.3=1.00(0.4) + 1(0.3) + 2(0.2) + 3(0.1) = 0 + 0.3 + 0.4 + 0.3 = 1.0 bag.

  3. For part (c), use σX=(xiμX)2P(xi)\sigma_X = \sqrt{\sum (x_i - \mu_X)^2 P(x_i)}. Find each squared deviation from μX=1.0\mu_X = 1.0: (01)2=1(0 - 1)^2 = 1, (11)2=0(1 - 1)^2 = 0, (21)2=1(2 - 1)^2 = 1, and (31)2=4(3 - 1)^2 = 4.

  4. Weight each squared deviation by its probability: 1(0.4)=0.41(0.4) = 0.4, 0(0.3)=00(0.3) = 0, 1(0.2)=0.21(0.2) = 0.2, and 4(0.1)=0.44(0.1) = 0.4.

  5. Add for the variance: 0.4+0+0.2+0.4=1.00.4 + 0 + 0.2 + 0.4 = 1.0, so the standard deviation is σX=1.0=1.0\sigma_X = \sqrt{1.0} = 1.0 bag.

  6. For part (d), interpret the mean: over many shoppers the stall sees an average of about 1 reusable bag per shopper in the long run.

(a) P(2)=0.2P(2) = 0.2; (b) μX=1.0\mu_X = 1.0 bag; (c) σX=1.0=1.0\sigma_X = \sqrt{1.0} = 1.0 bag; (d) shoppers bring about 1 bag each on average over the long run.

Problem 8

A charity fun-run runs a spinner booth. Each spin costs 3 dollars, and the spinner pays out the amounts below.

Payout xx (dollars)02520
P(x)P(x)0.50.30.150.05

(a) Find the expected payout per spin. (b) Find a player's expected net gain per spin and say whether the game is fair. (c) If the booth sells 400 spins, how much profit should the charity expect?

Show the worked solution
  1. For part (a), apply μX=xiP(xi)\mu_X = \sum x_i P(x_i) to the payouts: 0(0.5)+2(0.3)+5(0.15)+20(0.05)0(0.5) + 2(0.3) + 5(0.15) + 20(0.05).

  2. Multiply each term to get 00, 0.60.6, 0.750.75, and 1.01.0, then add: 0+0.6+0.75+1.0=2.350 + 0.6 + 0.75 + 1.0 = 2.35 dollars expected payout per spin.

  3. For part (b), the player pays 3 dollars each spin, so the net gain is the payout minus 3, and the expected net gain is the expected payout minus 3: 2.353=0.652.35 - 3 = -0.65 dollars.

  4. A fair game has an expected net gain of 0. Here the player's expected net gain is 0.65-0.65 dollars, so the game is not fair; a player loses about 65 cents per spin on average.

  5. For part (c), whatever the player loses on average, the booth gains. The booth's expected profit per spin is 0.650.65 dollars, so for 400 spins it is 400×0.65=260400 \times 0.65 = 260 dollars.

(a) 2.35 dollars expected payout; (b) expected net gain 0.65-0.65 dollars, so the game is not fair; (c) about 260 dollars of expected profit from 400 spins.