Skip to content
Prev 209 / 20628 Next

Multilevel Probability Question

Yes, very rare

For a simple random sample without replacement of 120 teachers from the
2000,
the probability that every teacher comes from a different school is:

#  probs[k] is the probability that the kth drawn teacher is not from any
of the previously drawn teacher's schools
# and equals 1 - the probability that the teacher drawn IS from one of the
previously drawn teacher's schools.
# After drawing one teacher from a school there are 4 left from that
schoold, so after drawing k-1 teachers there are 4*(k-1) teachers
# out of 2000-k-1 teachers that could be drawn
# The probability that all of the 120 teachers are from different schools
is the product
[1] 8.258304e-08
# picking 27 teachers from different schools is reasonably likely
[1] 0.4861363

Rob



                                                                           
             Chuck Cleland                                                 
             <ccleland at optonli                                             
             ne.net>                                                    To 
             Sent by:                  "Martin Henry H. Stevens"           
             r-sig-mixed-model         <stevenmh at muohio.edu>               
             s-bounces at r-proje                                          cc 
             ct.org                    r-sig-mixed-models at r-project.org    
                                                                   Subject 
                                       Re: [R-sig-ME] Multilevel           
             06/12/2007 08:51          Probability Question                
             AM
Martin Henry H. Stevens wrote:
Creating the population described and taking a simple random sample of
120 teachers, it seems it would be very rare for no two teachers to come
from the same school:

pop <- data.frame(TEACHER = 1:2000, SCHOOL = rep(1:400, 5))

table(replicate(1000000, any(table(pop[sample(2000, size = 120,
replace=FALSE),]$SCHOOL) > 1)))

   TRUE
1000000

  There are obviously some samples where every teacher would come from a
different school, but I'm not sure how you might find the specific
probability.

hope this helps,

Chuck
--
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894

_______________________________________________
R-sig-mixed-models at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models