3.41 Sampling at school.

For a sociology class project you are asked to conduct a survey on 20 students at your school. You decide to stand outside of your dorm’s cafeteria and conduct the survey on a random sample of 20 students leaving the cafeteria after dinner one evening. Your dorm is comprised of 45% males and 55% females.

  1. Which probability model is most appropriate for calculating the probability that the 4th person you survey is the 2nd female? Explain.

Negative Binomial is most appropriate; each student represents an independent “trial” with dichomotous outcome (male or female). The kth (and last) success is defined as the student being female, and probability of success in each trial is constant.

  1. Compute the probability from part (a).
p<-.55
n<-4
k<-2
p_4thFem<-(factorial(n-1)/(factorial(k-1)*factorial(n-k)))*(p^k)*((1-p)^(n-k))

The probability that the 4th person is the 2nd female is \({n-1\choose k-1}p^k (1-p)^{(n-k)}={4-1\choose2-1}(.55)^2 (1-.55)^{4-2}=\frac{3!}{1!2!}(.55)^2 (.45)^2=\) 0.184.

  1. The three possible scenarios that lead to 4th person you survey being the 2nd female are {M,M,F,F}, {M,F,M,F}, {F,M,M,F} One common feature among these scenarios is that the last trial is always female. In the first three trials there are 2 males and 1 female. Use the binomial coefficient to confirm that there are 3 ways of ordering 2 males and 1 female.
bin_coefficient<-(factorial(3)/(factorial(1)*factorial(2)))

The binomial coefficient is \({n\choose k}={3\choose1}=\frac{3!}{1!2!}=\) 3.

  1. Use the findings presented in part (c) to explain why the formula for the coefficient for the negative binomial is \(n-1 \choose k-1\) while the formula for the binomial coefficient is \(n \choose k\).

The last trial’s success is defined as the last student being female in the negative binomial distribution which is determined by including the binomial coefficient, which returns the number of combinations of the first 3 trials. In (c) we calculated the number of ways to order 2 males and 1 female (3 trials); in (b) we calculated the probability that the 4th trial would be a success.