Skip to main content
edited body
Source Link
whuber
  • 333.5k
  • 63
  • 792
  • 1.3k

Let $X_i$ be the random variable equal to $1$ when there is exactly one ball of color $i$ ($i = 1, 2, \ldots, m$; to avoid confusion I write $m$ instead of $N$). The count of color $i$ follows a Binomial($p_i$, $n$) distribution, implying the expectation of $X_i$ is

$$\eqalign{ \mathbb{E}[X_i] = &\sum_{j=0}^{n} \binom{n}{j} p_i^j (1-p_i)^{n-j} X_i(j) \cr = &\binom{n}{1} p_i (1-p_i)^{n-1} \cr = &n p_i (1-p_i)^{n-1}. }$$

The number of unique colors is the sum of the $X_i$. Because expectation is linear we obtain

$$\eqalign{ \mathbb{E}[X] = &\sum_{i=1}^{m}\mathbb{E}[X_i] = \sum_{i=0}^{m}n p_i (1-p_i)^{n-1} \cr = &n\sum_{i=1}^{m} p_i (1-p_i)^{n-1}. }$$$$\eqalign{ \mathbb{E}[X] = &\sum_{i=1}^{m}\mathbb{E}[X_i] = \sum_{i=1}^{m}n p_i (1-p_i)^{n-1} \cr = &n\sum_{i=1}^{m} p_i (1-p_i)^{n-1}. }$$

Let $X_i$ be the random variable equal to $1$ when there is exactly one ball of color $i$ ($i = 1, 2, \ldots, m$; to avoid confusion I write $m$ instead of $N$). The count of color $i$ follows a Binomial($p_i$, $n$) distribution, implying the expectation of $X_i$ is

$$\eqalign{ \mathbb{E}[X_i] = &\sum_{j=0}^{n} \binom{n}{j} p_i^j (1-p_i)^{n-j} X_i(j) \cr = &\binom{n}{1} p_i (1-p_i)^{n-1} \cr = &n p_i (1-p_i)^{n-1}. }$$

The number of unique colors is the sum of the $X_i$. Because expectation is linear we obtain

$$\eqalign{ \mathbb{E}[X] = &\sum_{i=1}^{m}\mathbb{E}[X_i] = \sum_{i=0}^{m}n p_i (1-p_i)^{n-1} \cr = &n\sum_{i=1}^{m} p_i (1-p_i)^{n-1}. }$$

Let $X_i$ be the random variable equal to $1$ when there is exactly one ball of color $i$ ($i = 1, 2, \ldots, m$; to avoid confusion I write $m$ instead of $N$). The count of color $i$ follows a Binomial($p_i$, $n$) distribution, implying the expectation of $X_i$ is

$$\eqalign{ \mathbb{E}[X_i] = &\sum_{j=0}^{n} \binom{n}{j} p_i^j (1-p_i)^{n-j} X_i(j) \cr = &\binom{n}{1} p_i (1-p_i)^{n-1} \cr = &n p_i (1-p_i)^{n-1}. }$$

The number of unique colors is the sum of the $X_i$. Because expectation is linear we obtain

$$\eqalign{ \mathbb{E}[X] = &\sum_{i=1}^{m}\mathbb{E}[X_i] = \sum_{i=1}^{m}n p_i (1-p_i)^{n-1} \cr = &n\sum_{i=1}^{m} p_i (1-p_i)^{n-1}. }$$

Source Link
whuber
  • 333.5k
  • 63
  • 792
  • 1.3k

Let $X_i$ be the random variable equal to $1$ when there is exactly one ball of color $i$ ($i = 1, 2, \ldots, m$; to avoid confusion I write $m$ instead of $N$). The count of color $i$ follows a Binomial($p_i$, $n$) distribution, implying the expectation of $X_i$ is

$$\eqalign{ \mathbb{E}[X_i] = &\sum_{j=0}^{n} \binom{n}{j} p_i^j (1-p_i)^{n-j} X_i(j) \cr = &\binom{n}{1} p_i (1-p_i)^{n-1} \cr = &n p_i (1-p_i)^{n-1}. }$$

The number of unique colors is the sum of the $X_i$. Because expectation is linear we obtain

$$\eqalign{ \mathbb{E}[X] = &\sum_{i=1}^{m}\mathbb{E}[X_i] = \sum_{i=0}^{m}n p_i (1-p_i)^{n-1} \cr = &n\sum_{i=1}^{m} p_i (1-p_i)^{n-1}. }$$