由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Quant版 - 一道很常见的面试题
相关主题
面试题+website collecting interview problems. a very good one, imo.quiz collection
问个智力题。这次听说天朝的margin是10%
一道面试题求解我也来写个面经吧
[合集] 某公司面试题有人熟悉KMV EDF么?
有一道面试题出个题 (转载)
[合集] a questionOne interview question, tough
[合集] 今早电话面试惨败有没有读过这本书的?觉得写得怎么样?
Head Hunters. 整理中……一些面经
相关话题的讨论汇总
话题: coupons话题: kinds话题: ai话题: frac话题: collect
进入Quant版参与讨论
1 (共1页)
Y******u
发帖数: 1912
1
In a set of cereals, there are 4 kinds of coupons. A child wants to collect
all the 4 kinds of coupons. How many boxes in average should he buy?
n kinds of coupons?
s********7
发帖数: 52
2
二项分布
p*b
发帖数: 30
3
Let k be the number of boxes the child buys.
Let Ai be the event that coupon i is not collected. Then P(Ai)=(1-1/n)^k
The probability that the child collects all coupons is
P((UAi)^c) = 1 -P(UAi) = 1-sum P(Ai)+ sum P(Ai,Aj) -....
= 1 - n(1-1/n)^k + n(n-1)/2 (1-2/n)^k - ...
To understand the problem, we can simplify n(n-1)...(n-i+1)/i! (1-i/n)^k by
n^i/i! exp(-ki/n)
Choose k=n(logn+c), then P((UAi)^c) can be approximated by 1-exp(-c)+exp(-2c
)/2! - ... = exp(-exp(-c))

collect

【在 Y******u 的大作中提到】
: In a set of cereals, there are 4 kinds of coupons. A child wants to collect
: all the 4 kinds of coupons. How many boxes in average should he buy?
: n kinds of coupons?

w*********i
发帖数: 77
4
4\times (\frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4})

collect

【在 Y******u 的大作中提到】
: In a set of cereals, there are 4 kinds of coupons. A child wants to collect
: all the 4 kinds of coupons. How many boxes in average should he buy?
: n kinds of coupons?

B****n
发帖数: 11290
5
This is based on the assumption that the numbers of the four kinds of
coupons are the same.

【在 w*********i 的大作中提到】
: 4\times (\frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4})
:
: collect

w*******x
发帖数: 489
6
1+4/3+4/2+4/1=8.3333
就是拿到一个不一样得长度为1
拿到第二个不一样的平均长度为4/3,etc。。

collect

【在 Y******u 的大作中提到】
: In a set of cereals, there are 4 kinds of coupons. A child wants to collect
: all the 4 kinds of coupons. How many boxes in average should he buy?
: n kinds of coupons?

s*****t
发帖数: 987
7

by
2c
re this
好像某本概率书上面有

【在 p*b 的大作中提到】
: Let k be the number of boxes the child buys.
: Let Ai be the event that coupon i is not collected. Then P(Ai)=(1-1/n)^k
: The probability that the child collects all coupons is
: P((UAi)^c) = 1 -P(UAi) = 1-sum P(Ai)+ sum P(Ai,Aj) -....
: = 1 - n(1-1/n)^k + n(n-1)/2 (1-2/n)^k - ...
: To understand the problem, we can simplify n(n-1)...(n-i+1)/i! (1-i/n)^k by
: n^i/i! exp(-ki/n)
: Choose k=n(logn+c), then P((UAi)^c) can be approximated by 1-exp(-c)+exp(-2c
: )/2! - ... = exp(-exp(-c))
:

B****n
发帖数: 11290
8
我覺得這問題最有意思的倒不是數學怎麼算
而是大家一開始就假定每種coupons的數目一樣 機率都是1/4
從簡化數學的角度這樣也沒錯
不過我從小到大就發現每次要收集什麼東西 幾乎總是有一兩個收集不到 我總是懷疑數
目真的是一樣的嗎

collect

【在 Y******u 的大作中提到】
: In a set of cereals, there are 4 kinds of coupons. A child wants to collect
: all the 4 kinds of coupons. How many boxes in average should he buy?
: n kinds of coupons?

s****i
发帖数: 216
9
X_i the length until the ith coupon,
then X_i-X_(i-1) are independent of each other, i guess
1 (共1页)
进入Quant版参与讨论
相关主题
一些面经有一道面试题
Quant shop 的问题, 请牛人帮忙[合集] a question
[猎头职位]Python Consultant (Contract/Immediate Start/NYC) (转载)[合集] 今早电话面试惨败
look for interview questionsHead Hunters. 整理中……
面试题+website collecting interview problems. a very good one, imo.quiz collection
问个智力题。这次听说天朝的margin是10%
一道面试题求解我也来写个面经吧
[合集] 某公司面试题有人熟悉KMV EDF么?
相关话题的讨论汇总
话题: coupons话题: kinds话题: ai话题: frac话题: collect