返回题库

数字位数与 0 的个数:协方差

Covariance of Digits and Zeros in Random Card Draw

专题
Probability / 概率
难度
L4

题目详情

有 111 张卡片编号 1 到 111,随机均匀抽一张。

XX 为卡片上的数字位数(1 到 3),令 YY 为数字中 0 的个数。

Cov(X,Y)\mathrm{Cov}(X,Y)

In a scenario with 111 cards numbered from 1 to 111, a card is drawn at random.
Let XX be the number of digits on the card (ranging from 1 to 3), and YY the number of zeros.
Calculate Cov(X,Y)\text{Cov}(X, Y).

解析

可列联合分布并计算:

E[X]=225111,E[Y]=21111,E[XY]=54111.\mathbb{E}[X]=\frac{225}{111},\quad \mathbb{E}[Y]=\frac{21}{111},\quad \mathbb{E}[XY]=\frac{54}{111}.

因此

Cov(X,Y)=E[XY]E[X]E[Y]=5411122511121111=1269123210.103.\mathrm{Cov}(X,Y)=\mathbb{E}[XY]-\mathbb{E}[X]\mathbb{E}[Y] =\frac{54}{111}-\frac{225}{111}\cdot\frac{21}{111} =\frac{1269}{12321}\approx 0.103.

Original Explanation

Step 1: Construct the joint probability mass function (pmf)

XX Y=0Y = 0 Y=1Y = 1 Y=2Y = 2
1 9/1119/111 00 00
2 81/11181/111 9/1119/111 00
3 1/1111/111 10/11110/111 1/1111/111

Step 2: Compute expectations

  • Expected number of digits:
E[X]=9111(1)+90111(2)+12111(3)=225111\mathbb{E}[X] = \frac{9}{111}(1) + \frac{90}{111}(2) + \frac{12}{111}(3) = \frac{225}{111}
  • Expected number of zeros:
E[Y]=91111(0)+19111(1)+1111(2)=21111\mathbb{E}[Y] = \frac{91}{111}(0) + \frac{19}{111}(1) + \frac{1}{111}(2) = \frac{21}{111}
  • Expected value of the product:
E[XY]=9111(1)+10111(3)+1111(6)=54111\mathbb{E}[XY] = \frac{9}{111}(1) + \frac{10}{111}(3) + \frac{1}{111}(6) = \frac{54}{111}

Step 3: Compute covariance

Cov(X,Y)=E[XY]E[X]E[Y]\text{Cov}(X, Y) = \mathbb{E}[XY] - \mathbb{E}[X] \cdot \mathbb{E}[Y] =5411122511121111=1269123210.103= \frac{54}{111} - \frac{225}{111} \cdot \frac{21}{111} = \frac{1269}{12321} \approx 0.103