[Prob] (Coupon collector)

Suppose there are n types of toys, which you are collecting one by one, with the goal of getting a complete set. When collecting toys, the toy types are random (as is sometimes the case, for example, with toys included in cereal boxes or included with kids’ meals from a fast food restaurant).

Assume that each time you collect a toy, it is equally likely to be any of the n types. What is the expected number of toys needed until you have a complete set?

Solution: Let N be the number of toys needed; we want to find E(N). Our strategy will be to break up N into a sum of simpler r.v.s so that we can apply linearity. So write

N = N1 + N2 + · · · + Nn,

where N1 is the number of toys until the first toy type you haven’t seen before (which is always 1, as the first toy is always a new type), N2 is the additional number of toys until the second toy type you haven’t seen before, and so forth.

with

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-13 01:32:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-13 01:32:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-03-13 01:32:02       82 阅读
  4. Python语言-面向对象

    2024-03-13 01:32:02       91 阅读

热门阅读

  1. 简单聊一下 Python 协程

    2024-03-13 01:32:02       46 阅读
  2. 【More Effective C++】条款24:了解虚函数的成本

    2024-03-13 01:32:02       53 阅读
  3. html 如何引入 百度地图

    2024-03-13 01:32:02       41 阅读
  4. 前端面试练习24.3.11

    2024-03-13 01:32:02       37 阅读
  5. MYSQL环境搭建面试题

    2024-03-13 01:32:02       34 阅读
  6. PTA L1-009 N个数求和(C++)

    2024-03-13 01:32:02       39 阅读
  7. url中可以包含@吗

    2024-03-13 01:32:02       39 阅读