3
$\begingroup$

i am trying to solve some probability question. Here are they

  1. poll found that 73% of households own digital cameras. A random sample of 9 households is selected

    A. What is the probability that 2 of the households own a digital camera?

    B.What is the probability that at most 1 of households owns a digital camera?

    C. What is the probability that at least 1 household owns a digital camera?

    D. Now suppose a random sample of 450 households is selected. Use R to find the probability that at least 350 own a digital camera

I have answered A, B and C using R

P0<-(factorial(9))/((factorial(0)*factorial(9-0))) * (0.73^0) * ((1-0.73)^(9-0))
P1<-(factorial(9))/((factorial(1)*factorial(9-1))) * (0.73^1) * ((1-0.73)^(9-1))
P2<-(factorial(9))/((factorial(2)*factorial(9-2))) * (0.73^2) * ((1-0.73)^(9-2)) 
list("Number11A" = P2, "Number11B" = P0+P1, "Number11C" = 1-P0,"Number11D Mean" = 9*0.73,"Number11D Standard Deviation"= sqrt(9*0.73*(1-0.73))) #Number_11A

I found that A , B and C will be ( 0.002006756,0.0001931818 , 0.9999924)

However, I cannot understand question D as this question has a sample . Thank you very much for your help.

$\endgroup$
  • 1
    $\begingroup$ Please add the [self-study] tag & read its wiki. $\endgroup$ – gung - Reinstate Monica Oct 23 '15 at 4:49
  • $\begingroup$ @gung Thank you sir, i have add self-study tag. $\endgroup$ – user3292755 Oct 23 '15 at 5:38
  • 1
    $\begingroup$ A, B, and C contain a sample too; D is simply changing the sample size from 9 to 350. $\endgroup$ – Dougal Oct 23 '15 at 6:11
  • $\begingroup$ @Dougal I have changed 9 into 350, but my R says value out of range in 'gamma' $\endgroup$ – user3292755 Oct 23 '15 at 14:32
5
$\begingroup$

You've correctly combined the relevant pprobabilities based on $\binom{9}{0}$, $\binom{9}{1}$, and $\binom{9}{2}$ for parts A through C.

Now, as I think you've realized, you need to find something using $\binom{450}{350}, \binom{450}{351}, \dots, \binom{450}{450}$.

Using the formula $\binom{450}{350} = \frac{450!}{350! 100!}$ is not great, because, well, $450!$ is big. Really big. Like $10^{1000}$ big. That's a googol to the 10th power. The standard formats computers use for representing numbers can only reliably go up to about $10^{176}$; $450!$ is way bigger than that.

So you'll need to do it a different way.

A few possibilities:

  • Figure out how to compute $\binom{450}{n}$ without directly using $450!$.
  • Realize that this is probably a common problem, and R probably already has a way built in to compute large binomial coefficients.
  • There's actually a more direct function in R to do exactly what you're looking for. What would it be called?
$\endgroup$
  • $\begingroup$ Hi Sir, thank you for responding with the answer. I've tried it using online calculator, and it turns out really small number. $\endgroup$ – user3292755 Oct 25 '15 at 12:29
1
$\begingroup$

In problems posed like that one, without the size of the population from which the sample was taken, one must assume each of the responses $X_i$ as an independent realization of a Bernoulli with $p=.73$, so the number $X$ of households in the sample with a camera is the sum $X=X_1+X_2+\ldots+X_{450}$ of the individual responses, which will have a Binomial distribution with $n=450$ and $p=.73$.

One way to solve this question without resorting to direct computation of factorials would be the normal approximation, which gives $$P(X\ge350)\approx P(Y>350-.5),$$ where $Y$ has Normal distribution with $\mu=np=450\times.73=328.5$ and $\sigma^2=np(1-p)= 450\times.73\times.27=88.695,$ and where the "$-.5$" is due to Yates' continuity correction.

So, $$P(X\ge350) \approx P(Y> 350-.5) = P(Z>(349.5-328.5)/\sqrt{88.695}) \approx P(Z>2.23),$$ which can be obtained from linear interpolation from Standard Normal distribution table.

$\endgroup$
  • $\begingroup$ Hi Sir @user87237 thanks for answering my question, i really appreciate your help. I'm going to try out what you have stated because i haven't tried it yet $\endgroup$ – user3292755 Oct 25 '15 at 12:38
  • $\begingroup$ Why, thank you, Sir @user3292755! It was a pleasure to be helpful. =) $\endgroup$ – Marcelo Ventura Oct 25 '15 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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