1. ## continuous random variables

how would I compute the answers to the following questions:

A supermarket manager finds that 20% of his customers buy brand X cornflakes. The other 80% buy brand Z.

a) Ina ramdom sample of 10, what is the probability that at least 4 customers buy brand X? [ANS:0.121]

b) In a random sample of 100 customers, what is the probability that between 15 and 30 customers (inclusively) buy brand X? [ANS:0.9119]

c) What is the minimum number of boxes of brand X cornflakes that the manager should have in stock to ensure, with a probability of at least 0.95, that he can meet the brand X demands of a random sample of 225 customers? (Assume 1 box per customer) [ANS:55]

2. Originally Posted by skhan
how would I compute the answers to the following questions:

A supermarket manager finds that 20% of his customers buy brand X cornflakes. The other 80% buy brand Z.

a) Ina ramdom sample of 10, what is the probability that at least 4 customers buy brand X? [ANS:0.121]
Here we are dealing with the binomial distribution, where the probability of
$R$ successes in $N$ trials is:

$
P(R,N)={N \choose R}p^R (1-p)^{N-R}
$
,

where $p$ is the probability of a success on a single trial, and:

${N \choose R}=\frac{N!}{R!(N-R)!}$

is a binomial coefficient.

Now the probability $Prb(4+)$ that at least 4 customers out of 10 buy brand X is
1 minus the probability that 3 or less customers buy brand X. So:

$
Prb(4+)=1-P(0,10)-P(1,10)-P(2,10)-P(3,10)
$

$
=1-{10 \choose 0}0.2^00.8^10-{10 \choose 1}0.2^1 0.8^9$
$-{10 \choose 2}0.2^2 0.8^8-{10 \choose 3}0.2^3 0.8^7
$

$
=1-0.1074-0.2684-0.3020-0.2013=0.1209
$

RonL

3. Originally Posted by skhan
how would I compute the answers to the following questions:

A supermarket manager finds that 20% of his customers buy brand X cornflakes. The other 80% buy brand Z.

b) In a random sample of 100 customers, what is the probability that between 15 and 30 customers (inclusively) buy brand X? [ANS:0.9119]
This still a problem about the binomial distribution, nut now we are in
large sample territory and we will use the normal approximation to the
binomial distribution.

In a sample of 100 the mean number who buy brand X is $\mu=0.2\times 100=20$, and the standard deviation $\sigma=\sqrt{100\times 0.2 \times 0.8}=4$.

Now in the normal approximation to the binaomial distribution we appproximate:

$
P_{binomial(p,N)}(R)\approx P_{normal(\mu,\sigma)}(R-0.5\le x < R+0.5)
$

Now here we are asked for the probability that between 15 and 30 cusyomers
buy brand X, this probability is:

$
P_{binomial(p,N)}(15\mbox{ to }30)\approx P_{normal(\mu,\sigma)}(15-0.5\le x < 30+0.5)
$

$
P_{normal(\mu,\sigma)}(15-0.5\le x < 30+0.5)$
$=P_{normal(0,1)}\left(\frac{14.5-20}{4}\le x < \frac{30.5-20}{4}\right)$
$=P_{normal(0,1)}(-1.375\le x<2.625)\approx 0.9111
$

RonL

4. Originally Posted by skhan
how would I compute the answers to the following questions:

A supermarket manager finds that 20% of his customers buy brand X cornflakes. The other 80% buy brand Z.

c) What is the minimum number of boxes of brand X cornflakes that the manager should have in stock to ensure, with a probability of at least 0.95, that he can meet the brand X demands of a random sample of 225 customers? (Assume 1 box per customer) [ANS:55]
The critical z-score for a standard normal distribution, so that the probability
of not-exceeding it is $0.95$ is $1.645$.

With a sample size of $225$ costomers the mean number who buy brand X is
$0.2\times 225=45$, and the standard devistion is $\sqrt{225 0.2 0.8}=6$.

So the number of customers $N$ corresponding to the critical z-score satisfies:

$\frac{N-45}{6}=1.645$

so $N=54.89$ or rounding up to an integer number of packs $N=55$.

RonL