返回题库

20 美元由 5 元与 1 元组成:纸币张数期望

$20 in five-dollar bills and one-dollar bills

专题
Probability / 概率
难度
L4

题目详情

你有 20 美元,由若干张 5 美元与 1 美元纸币组成。若所有可行组合等可能,纸币总张数的期望是多少?

You have $20 but in some combination of $5’s and $1’s. What’s the expected number of bills?

解析

XX 为 5 美元张数,YY 为 1 美元张数,则

5X+Y=20.5X+Y=20.

非负整数解为:

  • X=0,Y=20X=0, Y=20(20 张)
  • X=1,Y=15X=1, Y=15(16 张)
  • X=2,Y=10X=2, Y=10(12 张)
  • X=3,Y=5X=3, Y=5(8 张)
  • X=4,Y=0X=4, Y=0(4 张)

若每种组合等可能,则

E[X+Y]=20+16+12+8+45=12.\mathbb{E}[X+Y]=\frac{20+16+12+8+4}{5}=12.

Original Explanation

Let:

  • XX be the number of 5bills5 bills
  • YY be the number of 1bills1 bills
    Then the total amount of money is: 5X+Y=205X + Y = 20

We are asked to compute the expected value of the total number of bills, i.e.: E[X+Y]\mathbb{E}[X + Y]

Step 1: All valid combinations

We look for all non-negative integer solutions to: 5X+Y=205X + Y = 20

For each value of XX, Y=205XY = 20 - 5X must also be a non-negative integer.

Try all values of XX such that Y0Y \geq 0:

  • X=0X = 0, Y=20Y = 20
  • X=1X = 1, Y=15Y = 15
  • X=2X = 2, Y=10Y = 10
  • X=3X = 3, Y=5Y = 5
  • X=4X = 4, Y=0Y = 0

So there are 5 possible combinations:

  • (0,20)(0, 20) → 20 bills
  • (1,15)(1, 15) → 16 bills
  • (2,10)(2, 10) → 12 bills
  • (3,5)(3, 5) → 8 bills
  • (4,0)(4, 0) → 4 bills

Step 2: Expected number of bills

Assume each combination is equally likely (uniform distribution). Then:

E[number of bills]=15(20+16+12+8+4)=12\mathbb{E}[\text{number of bills}] = \frac{1}{5}(20 + 16 + 12 + 8 + 4) = 12