1

This looks very simple, but it's totally over my head. Any clue is appreciated.

Randomly choose one ball out of $n$ different balls, calculate the expected number of experiments when the same ball appears again.

My solution is: $E(e)= 2P(n=2) + 3P(n=3) + \cdots + dP(n=d) + (d+1)P(n=d+1)$

The ball will be the same to the one of the previous balls in the $d+1$ experiments for sure. The probability: $$P(e=i) = (i-1)d(d-1) \cdots (d-i+1)/d^i,$$ but I don't know how to find $E(e)$. Any suggestions would be appreciated.

Vedran Šego
  • 11,372
Aliex
  • 11
  • The problem says you have $n$ different balls, and then suddenly you use the letter $d$. Are there actually $d$ different balls? –  Jul 18 '13 at 03:31
  • I made a mistake, there are n different balls. I just want to find out the expected time when the first repetition appear. I should change d to n in the question. Sorry for the confusion. – Aliex Jul 18 '13 at 05:20

2 Answers2

0

I think that you are on the right track. Two observations: 1. There must be 2 or more trials 2. If there are n+1 trials then one ball will be chosen twice.

Now, let p(m) be the probability that a ball is chosen twice in m trials. This is equivalent to the probability that there are m different balls in the m trials. So, p(m) = 1 - p(m different balls) = 1 - nPm/(n^m)

Now, E = sum i*p(i), i=2...n = sum i*(1 - nPm/(n^m)), i=2..n

im sure it is possible to simplify this expression further...

damian
  • 1
  • Thanks for damian's suggestion and encouragement. But I think the complementary set of {m different balls} is that {1 same balls,2 same balls,...,m sames balls}, This is not what we want. Here we just want the probability that in the i-th trivial the first repetition appear. P(e=i)=(i−1)d(d−1)⋯(d−i+1)/d^i is the probability that in the i-th trivial the first repetition appear, is it right? – Aliex Jul 18 '13 at 02:10
0

It should be:

$$P(e=i)=\frac{(i-1)d(d-1)(d-2)\ldots (d-i+2)}{d^i}$$

I don't think there is a nice solution for calculating the expected value. Numerically, for $d=1,2,3,4,5,6\ldots$, I get the expected values are $2,\frac{5}{2},\frac{26}{9},\frac{103}{32},\frac{2194}{625},\frac{1223}{324}, \frac{472730}{117649}$.

The numerator is identified by OEIS as the integral

$$\int_0^\infty e^{-x}(1+x/d)^ddx$$

while the denominator is identified by OEIS the numerator (upon reducing to lowest terms) of the following expression:

$$\frac{(d+1)^d}{d!}$$

Alex R.
  • 32,771
  • Thanks so much for your respond, you are right. – Aliex Jul 18 '13 at 03:00
  • The integral $\int_0^\infty e^{-x}(1+x/d)^d, dx$ is the expected value, not the numerator. My answer here explains why: http://math.stackexchange.com/questions/314220/variance-of-time-to-find-first-duplicate –  Jul 18 '13 at 03:14
  • Thanks,Byron, I get a lot from your work. Wonderful! – Aliex Jul 18 '13 at 05:06
  • @ByronSchmuland Can you recommend some reference about how to change the expect calculation into the integral calculation. I know your answer is correct, but just confused how the expect can be changed into the integral calculation and I want to read in detail about the mathematical knowledge used . Thanks, Byron. – Aliex Jul 28 '13 at 05:18
  • @Aliex Which step don't you understand? The step from the integral to the sum is explained by $n!=\int_0^\infty x^n e^{-x},dx$, proved in the link. –  Jul 28 '13 at 14:26
  • @Aliex See also http://math.stackexchange.com/questions/143097/alternative-formula-for-expected-value-of-a-discrete-random-variable –  Jul 28 '13 at 15:01
  • @ByronSchmuland, Thank you so much, this does make a big difference to me. – Aliex Aug 04 '13 at 06:43