Hugh R.

asked • 06/11/25

A problem in probability

There are n balls marked 1, 2, ..., n in a container. Drawing one ball at a time, record its number, then put it back. Repeat this r times. If X is the number of different balls drawn, what is the expectation and variance of X?

3 Answers By Expert Tutors

By:

Hugh R.

Your formula for E(X) when n=r=3 would produce E(X)=8/9<1, which is absurd. As far as r>0, we always have E(X) greater than or equal to 1.
Report

06/18/25

Douglas Z.

tutor
For n=3, r=3, n(1-(1-1/n)^r) = 3(1-(2/3)^3) = 19/9 = 2.111 > 1. The expected value is indeed at least 1 when r is positive, although the variance can be less than 1.
Report

06/19/25

Douglas Z.

tutor
I think you overlooked one of the "1-" parts of the formula E[X] = n(1-(1-1/n)^r). This formula agrees with the example you gave earlier, n=5, r=3, E[X] = 5(1-(4/5)^3) = 5(1-64/125) = 61/25.
Report

06/23/25

Hugh R.

It seems that you did not consider that there is a possibility that some balls are never drawn, especially when r < n. For instance, if n = 5 and r = 3, E(X) = 61/25.
Report

06/13/25

Huaizhong R.

tutor
Obviously the answer depends on both n and r. Whereas the case r=1 does give the obvious answer E(X)=1. The case r=2 is different. The probability of X=1 is {n\choose 1}(1/n)^2=1/n, the probability of X=2 is {n\choose 2}2!(1/n)^2=(n-1)/n. So E(X)=1/n+2(n-1)/n=(2n-1)/n. If r=3, P(X=1)={n\choose 1}(1/n)^3=1/n^2, P(X=2)={n\choose 2}P(3,2)(1/n)^3=3(n-1)/n^2, where P(3,2) is the number of permutations choosing 2 from 3. P(X=3)={n\choose 3}={n\choose 3}P(3,3)(1/n)^3=(n-1)(n-2)/n^2. Thus we have E(X)=1/n^2+6(n-1)/n^2+3(n-1)(n-2)/n^2=3n(n-1)/n^2. When n=5, this gives us 61/25 indeed! Hugh was right!
Report

06/13/25

Huaizhong R.

tutor
There was an error in my comment: the answer for case r=3 is [3n(n-1)+1]/n^2. I missed that +1 in the numerator, although it should be pretty easy to spot and fix.
Report

06/13/25

Joshua L.

tutor
Looks like I missed the boat on this one. Sorry. Thanks so much, Huaizhong.
Report

06/13/25

Huaizhong R.

tutor
The general case looks quite challenging, at least so it seems for now. I would be very interested in any progress on this.
Report

06/14/25

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.