Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How would I calculate the following:

Chance for getting $M$ samples from each of $N$ Groups given $S$ samples when drawing one by one with replacement.

I want to plot the probability for $M=1$ given Sample sizes $S =1:100$ for $N=10$ Grops.

Example:

I draw one sample and note the group it belong to. $N=10$ groups. (assume equal size of each group) I continue to draw samples $S=50$ times and would now like to know, what is the chance I get more or $M=1$ from each of the 10 groups.

I want to do it generic for $N,M,S$

Does it make sense?

enter image description here

share|improve this question
    
I need some clarification as to what you mean. Can you elaborate, possibly with a small example? –  muzzlator Feb 24 '13 at 14:55
    
added an example –  s093294 Feb 24 '13 at 15:02
    
Thanks, do you want M being exactly 1 or are you happy selecting more than one sample from a given group? –  muzzlator Feb 24 '13 at 15:03
    
more than M samples are okay. –  s093294 Feb 24 '13 at 15:06
    
I can't see any way past doing a rather crude brute force attempt on the multinomial distribution: en.wikipedia.org/wiki/Multinomial_distribution. We could suppose the first $M N$ samples were used to fill out the $N$ groups but there'd be no way to go further from that point without double counting. I think the best way to go from here is to look up existing research or wait until someone who knows how to do it is online :( –  muzzlator Feb 24 '13 at 15:52

1 Answer 1

If we are working specifically for $M = 1$, we can do the following

$$P(1, N, S) = 1 - \sum_{i=1}^{N-1} \left(\begin{array}{c} N \\ i \end{array}\right) \left(\frac{N-i}{N}\right)^S P(1, N-i, S) $$

Edit: I think I fixed it, I needed to multiply by $P(1, N-i, S)$. So we need to calculate it recursively in a way too....

Alternatively we can do inclusion/exclusion to avoid the recursion. 1 - prob(1 fails) + prob(2 fails) - prob(3 fails) ... I'm getting too tired to think so I'll just leave this here and see what someone else says.

share|improve this answer
    
This gets us numbers much more like the graph you posted above so I get the feeling this is fine. –  muzzlator Feb 24 '13 at 16:37
    
Hm I'm getting negative values for $S = 11$. Let me find where the problem is.... –  muzzlator Feb 24 '13 at 16:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.