Statisticians, help please.

Zenmervolt

Elite member
Oct 22, 2000
24,514
44
91
I've been out of the classroom too long and cannot remember how to calculate this:

If 1 person in 40 in a population has trait X, how large does a group need to be to have a 90% chance of containing a person with trait X?

I can't for the life of me remember what the equations are for that one. I'm digging out my dusty old Statistics textbook too, but I'm hoping someone here knows as well. If you answer, I'd prefer the equations used to arrive at that answer as opposed to just a number.

ZV

EDIT: OK, I found the good old "trial and error" way of figuring it, should have thought of that earlier. If 1 in 40 have trait X, then 39 in 40, or 97.5% do not. So simply figure the probability of the entire group not having trait X (0.975^[# people in group]) and once that hits 10% I've found my number. I blame the rustiness on having been out of school for 4 years and not having messed with Statistics in at least 6.
 
Oct 20, 2005
10,978
44
91
Originally posted by: Zenmervolt
I've been out of the classroom too long and cannot remember how to calculate this:

If 1 person in 40 in a population has trait X, how large does a group need to be to have a 90% chance of containing a person with trait X?

I can't for the life of me remember what the equations are for that one. I'm digging out my dusty old Statistics textbook too, but I'm hoping someone here knows as well. If you answer, I'd prefer the equations used to arrive at that answer as opposed to just a number.

ZV

EDIT: OK, I found the good old "trial and error" way of figuring it, should have thought of that earlier. If 1 in 40 have trait X, then 39 in 40, or 97.5% do not. So simply figure the probability of the entire group not having trait X (0.975^[# people in group]) and once that hits 90% I've found my number. I blame the rustiness on having been out of school for 4 years and not having messed with Statistics in at least 6.

You sure that's right?
 

Zenmervolt

Elite member
Oct 22, 2000
24,514
44
91
Originally posted by: Schfifty Five
Originally posted by: Zenmervolt
I've been out of the classroom too long and cannot remember how to calculate this:

If 1 person in 40 in a population has trait X, how large does a group need to be to have a 90% chance of containing a person with trait X?

I can't for the life of me remember what the equations are for that one. I'm digging out my dusty old Statistics textbook too, but I'm hoping someone here knows as well. If you answer, I'd prefer the equations used to arrive at that answer as opposed to just a number.

ZV

EDIT: OK, I found the good old "trial and error" way of figuring it, should have thought of that earlier. If 1 in 40 have trait X, then 39 in 40, or 97.5% do not. So simply figure the probability of the entire group not having trait X (0.975^[# people in group]) and once that hits 90% I've found my number. I blame the rustiness on having been out of school for 4 years and not having messed with Statistics in at least 6.

You sure that's right?

Except that I mis-typed and said 90% when I should have said 10%. :)

ZV
 

frostedflakes

Diamond Member
Mar 1, 2005
7,925
1
81
I think the way you figured it out is right, but IIRC, the statistical way of calculating something like this out would be confidence intervals. Not completely sure, though, I always thought statistics was kind of confusing. :p
 

RedArmy

Platinum Member
Mar 1, 2005
2,648
0
0
N=[1.28s/B]^2 where s is the range divided by 4 (this is for a general estimate, you can also replace s with the st dev to get a more exact answer) and B is the specified bound on the error of estimation. The 1.28 is from the Z critical value for 90%.
 

Paperdoc

Platinum Member
Aug 17, 2006
2,510
379
126
This is not a confidence interval calculation - it is probabilities. You are correct in calculating the negative way - that is, what is the probability that NOBODY in the group of n people has the trait? Let p be the (fractional) probability of an event, and let q be the (fractional) probability that the event does NOT happen. That is, p+q=1. In your case, p = 0.025, and q = 0.975 in the population. You want to find a value of n such that the product of n probabilities of value 0.975 is 0.900 or less. That is, 0.975^n<=0.90 (the probability that NOBODY in the group has the trait; hence there's a 10% probability that at least one person DOES have the trait. (Note that this does not preclude there being two or three people with the trait, but that's another calculation.)

Logarithms are how to get this. If 0.975^n = 0.90, then
log (0.975^n) = log (0.90)
Recall that log (x^n) = n log (x)

So solve for n [log (0.975)] = log (0.90)
n (-0.010995384) = -0.045757491
n = 4.161518

We find that 0.975^4 = 0.9037, not quite good enough
0.975^5 = 0.8811, meets the requirement that there is less than a 90% chance of the entire group is free of the trait, and hence at least a 10% probability that someone in the group DOES have the trait.