Math 2.0

problem

Coupon collector's problem

Problem

There are n≥1n \ge 1 different types of coupons. Each draw gives a coupon of a uniform random type, independently of the other draws. Let TT be the number of draws needed to collect all nn types. Find E[T]E[T].

Remarks

Solution: write T=t1+⋯+tnT = t_1 + \dots + t_n, where tit_i is the number of draws to get a new type when i−1i - 1 types are known. Each tit_i counts trials up to the first success, with success probability pi=(n−i+1)/np_i = (n - i + 1)/n. So E[ti]=1/piE[t_i] = 1/p_i by the mean of the geometric distribution. By linearity of expectation, E[T]=n(11+12+⋯+1n)=nHnE[T] = n \left(\frac{1}{1} + \frac{1}{2} + \dots + \frac{1}{n}\right) = n H_n, where HnH_n is the nn-th harmonic number. So E[T]=nln⁡n+γn+12+o(1)E[T] = n \ln n + \gamma n + \frac{1}{2} + o(1), with the Euler–Mascheroni constant γ≈0.5772\gamma \approx 0.5772. The tit_i are independent, so Var⁡(T)=∑i(1−pi)/pi2<π2n2/6\operatorname{Var}(T) = \sum_i (1 - p_i)/p_i^2 < \pi^2 n^2 / 6.

Explanations

L1 human

To collect all nn pictures of a series, you need about nln⁡nn \ln n purchases, not nn. The last pictures are the slow ones: when only one type is missing, you wait on average nn draws for it. For n=50n = 50, E[T]=50H50≈225E[T] = 50 H_{50} \approx 225.

What this node needs for W1
  • an inventory row: the row of the inventory that the node accounts for (0 of 1)

The writing levels say how complete the text of a node is. They do not measure its truth.

Sources

  1. Web https://en.wikipedia.org/wiki/Coupon_collector's_problem, Calculating the expectation
  2. Web https://en.wikipedia.org/wiki/Coupon_collector's_problem, Calculating the variance