Thread: Expectation for a Simple Problem

1. Expectation for a Simple Problem

Hello Everyone!

Suppose you have 6000 songs on your playlist, each of these songs have an equal probability of being played next (I assume even the song that is currently played).
How many songs are expected to play before the song you're listening to now repeats?

I thought of it in this way:
Let $A$ be the event: Current songs replays itself, and $B$ be the event that a new song plays.
Obiously, $A$ and $B$ are independent therefore $P(B) = 1 - P(A)$.
$P(A) = \frac{1}{6000}$ and $P(B) = \frac{5999}{6000}$.
It follows that $E(X) = P(A) + 5999\times P(B) = \frac{1}{6000}+5999\times \frac{5999}{6000} = 5998$ songs.

Is this approach correct?

Thanks!

2. If we indicate with n the number of songs, the probability that a song is replied in k 'trials' is $P_{k,n} = \frac{1}{n}\ (1-\frac{1}{n})^{k-1}$, so that the requested expected value is...

$\displaystyle E(k)= \sum_{k=0}^{\infty} \frac{k}{n}\ (1-\frac{1}{n})^{k-1}$ (1)

Kind regards

$\chi$ $\sigma$

3. How to compute the series of the previous post?... let's start remebering that for $|x|<1$ is...

$\displaystyle \sum_{k=0}^{\infty} x^{k}= \frac{1}{1-x}$ (1)

... and deriving both terms we have...

$\displaystyle \sum_{k=0}^{\infty} k\ x^{k-1}= \frac{1}{(1-x)^{2}}$ (2)

Setting $x= 1-\frac{1}{n}$ in the formula for $E(k)$ we have drived we obtain...

$\displaystyle E(k)= \frac{1}{n}\ \sum_{k=0}^{\infty} k\ (1-\frac{1}{n})^{k-1} = \frac{1}{n}\ \frac{1}{(1-1+\frac{1}{n})^{2}} = n$ (3)

... and that is not a surprise!...

Kind regards

$\chi$ $\sigma$

4. Let me get this staright

So you mean I'm set to listen 6000 songs before I get to listen the song I am listening to right now?

Thanks