I am trying to solve this problem:
If I am offered ice-creams in n different sizes, and I don’t know what the sizes are, and I am offered one of each in succession, in random order. So, the strategy I used is, reject the first ice-cream I am offered and choose the first one thereafter that is bigger than their first one i was offered. If the first ice-cream is in fact the biggest one, then I have to put up with the last one.
Let Pn(k) be the probability I choose the Kth biggest ice-cream, where k=1 is the biggest and k=n is the smallest.
Find the expression for Pn(1).
The actual answer is:
$\frac{1}{n} \sum_{r=1}^{n-1} \frac{1}{r} $
Could someone please explain to me how this pattern works, or is this just happen coincidentally.
Thank you very much for your reply.
Update: I knew how the formula works with the help of the answers.
However, I derived it again by myself, I found that there is a factorial, could you guys check for me?
My derivation:
There is n! way to choose the ice cream each time. So, we have:
$\frac{1}{n}\frac{1}{(n-1)}!$(this is the probability that chooses a certain size of ice cream, as you choose one of them, you have $\frac{1}{(n-1)}$ to choose, and choose another, you have $\frac{1}{(n-2)}$ to choose a certain ice cream, so it can be written into this form.
When n=2, we can choose things other than it self, so we have (n-1)! Way to choose from the ice creams in order to get 1. So, the probability for choosing 1 when n =2 is$\frac{(n-1)!}{(n-1)!}$.
When n=3, we can choose things other than itself and 2, so we have $\frac{(n-2)!}{(n-1)!}$ way to choose in order to get things.
Observing this pattern:
$\frac{1}{n} \sum_{1}^{n-1}\frac{1}{(r-1)!}$ way to choose in order to get 1. Could you guys explain to me where things went wrong?
To put it simply, we start with what's the first ice-cream. There are $n$ choices for that, each equally probable. Let's check those cases.
If the first one is the largest, then you've already rejected it, so your chance of getting it is $0$.
If the first one is the $2$nd largest, then you'll definitely get the largest. So, your chance is $1$.
Now, if the first one is the $3$rd largest, there are two options. You either get the largest or the second largest, depending on which comes first. So, you have a chance of $1 \over 2$.
Similarly, for the kth largest, you have a chance of $1 \over k-1$.
Note that, all these cases have probability of $1 \over n$.
So, the total probability $P_n(k) = {1 \over n} \sum\limits_{r=1}^{n-1}{1 \over r}$.