Skip to main content

Expected number of draws


Problem: Consider a set of n objects from which m are drawn randomly at a time, with replacement.  What is E(n,m), the expected number of draws I have to make to have drawn all of the objects?

Note that we solved a similar problem and got the value of E(n,1) some time back in this problem.


  1. found an approximate bound using wald's equation.'s_equation.

    imagine the experiment with m=1.its known that
    E(n,1)= n H(n),
    where H(n)=1+1/2+1/3+....1/n

    now let x1= number of draws to pick m distinct objects. After x1 draws, let x2=number of draws to pick m distinct objects, and so on till u see see all the n objects.

    then E[X1]=E[X2]=...=n[1/(n)+1/(n-1)+...1/(n-m+1)]=n/[H(n)-H(n-m)]

    If S is total number of draws
    i.e. S=X1+X2+.......,then as per wald's equation,

    Now, E[S]-m < E(n,1) <=E[S].

    Inequality is there because last object will be drawn in the last set of m,

    [H(n)+m/n]/[H(n)-H(n-m)] > E(n,m) > = H(n)/[H(n)-H(n-m)]

    where H(r)=1/r+ 1/(r-1)+..1/2+1

  2. A small corection.

    i wrote in previous post that
    E[S]-m < E(n,1) <= E[S].

    this needs to be changed to
    E[S-X] < E(n,1) <= E[S].

    where X is the number of draws required to pick the last group of m distinct objects. The reason is that by definition, the S draws cover all n objects and first S-X draws do not cover all n objects.

    With this correction,we get

    A+1 > E(n,m) >= A

    where A= H(n)/[H(n)-H(n-m)]

    and H(r)=1/r+ 1/(r-1)+..1/2+1.

  3. Not entirely sure if this solution is correct - do comment :)

    Consider a bit-string of length n. 1 denotes the corresponding object has already been selected, 0 denotes that it has not been selected. We need to find the expected number of turns needed for all the bits to become 1, which would be the same as the expected number of turns needed for any individual bit to become a 1.

    The total number of ways in which we can have m 1's in the bit string is nCm.
    Consider the i-th bit. Number of ways in which this bit is 1 is (n-1)C(m-1).
    So probability that the i-th bit is 1, P(i) = (n-1)C(m-1) / nCm = m/n
    If N is the expected number of turns needed for the i-th bit to be 1, N * P(i) = 1, so N = n/m
    This is the same for any bit. So expected number of moves is n/m.

  4. Sorry... the solution I posted is grossly wrong...

  5. Consider the stage when i of the n objects have turned up. The probability that in the next draw we shall get one of the remaining (n-i) objects is (n-i)Cm/ nCm. Hence the expected number of steps required to get to get one of these (n-i) objetcs = nCm/(n-i)Cm [geometric distribution]
    So, expected number of steps required to get all objects = sum(i=1 to n-m) of [nCm/(n-i)Cm]

  6. Can anybody tell me how to solve this? I do not understand chera's solution well.


Post a Comment

Popular posts from this blog

Asking a girl out

This is not a puzzle. So, for those of you who follow this puzzle blog, please bear with me for just one post. Interesting Math in this article though :P

Most of my friends already read an article that I wrote more than an year back - "Speak Up"

Here, inspired by the movie, The Beautiful Mind, I give a mathematical analysis of asking a girl out. Nice time it is. Feb 10. No plans for Feb 14 and I am sure this article makes me look even more geekier and all the more reason for me to believe that I will be alone, yet again. But what the hell, lets do it!

Note: This is not an independent analysis. There are many "mathematics sites" which does "similar" analysis.

@Consultants, correct me if I am wrong in my estimates. :P

Why is there a need to be selective?

From the age of 15, I guess there are approximately 3,600 girls I have liked (On average days, I don't see new girls. But going outside, I like about 30 girls. Saying that I go out once every week right …

Consecutive Heads

Let's say A keep tossing a fair coin, until he get 2 consecutive heads, define X to be the number of tosses for this process; B keep tossing another fair coin, until he get 3 consecutive heads, define Y to be the number of the tosses for this process.

1) Calculate P{X>Y}
2) What's the expected value of X
3) What's the expected value of Y

This is probably the hardest puzzle I have ever put on my blog. Hence, I will post its solution in the post directly rather than on comment.

(Solved by me finally after 13 months :))

Make a state diagram. Let the state be (a,b) where a is the number of consecutive heads streak "A" is on currently and b is the number of consecutive heads streak "B" is on currently.

So, (0,3) (1,3) are final accepted states and (2,0) (2,1) (2,2) (2,3) are failure states. If you get tails, your contribution to the state reaches to "0"

f(State) = P(X>Y | "State" configuration initially)

f(0,0) = 1/4[f(…

Fraction Brainteaser

Sent to me by Gaurav Sinha

Siddhant writes a Maths test and correctly answers 5 out of 6 Arithmetic questions and 20 out of 28 Geometry questions. In total, Siddhant scores 25 out of 34. 

Vaibhav writes another Maths test and correctly answers 20 out of 25 Arithmetic questions and 6 out of 9 Geometry questions. in total, Vaibhav scores 26 out of 34.

Note that
a) Vaibhav scores more than Siddhant
b) Siddhant score better than Vaibhav in both individual topics - 5/6 > 20/25 and 20/28 > 6/9

How is it possible?