Expected Value of choosing a specific object from n objects

657 Views Asked by At

I came across a probability question I can't figure out. Any help will be appreciated.

You are given n balls of k different types. One of these types(say type 1) is the one you want. The probability of drawing a ball of type say 'x' is

|x|/n

where |x| is the number of balls of type x.

In one turn, you can pick any ball from the bag. Let us assume it is type 'x'. But before the next turn, all balls of type 'x' must be removed from the bag. So now the bag contains n-|x| balls. And then you proceed with the next turn. (Here also |x| is the number of balls of type x)

The game ends when you pick a ball of the type you want(i.e, type 1).

What is the expected number of turns I need to play to end the game?

2

There are 2 best solutions below

8
On

You don't mention relative probabilities of drawing different types, so I'll assume they are the same. Notice that this problem doesn't change if you take out all the balls that you'd take out doing the trial before you actually draw! This is exactly the same question as asking what's the expected number of draws from a bag of $\frac{n}{k}$ balls before you get the one you like! Thus the answer is $\frac{n}{2k}$.

EDIT: There's no precise answer that can be given based on the distribution you provided, because it depends on what the distribution is. However, my comment still holds in a modified form. The reduction is the exact same, but with the note that the drawing is non-uniform, instead it is P(drawing the representative ball for group x)=$\frac{|x|}{n}$.

0
On

Better way would be to go around calculating the count the times you will have to choose K times to get desired balls. For i steps let count be Ci So ans will be smthing like : (1*C1 + 2*C2 ....k*Ck)/(C1+C2...Ck)

Now problem is to find an efficient way to get C1,C2,C3..Ck.

So think of some Intellegent way (maybe dynamic programming or some algorithm) to get these. And please share the method if you find one!