In: Statistics and Probability
Question 1- Suppose that one of every ten cereal boxes has a prize, Out of a shipment of n = 400 cereal boxes, find the probability that there are somewhere between 40 and 46 boxes with prizes. (Hint:use the dishonest coin principle with p = 0.1 to solve for the mean and standard deviation. Remember the probability is a decimal number, round the answer to the nearest hundredth.)
Question 2- A normal distribution has a mean of 30 cm and 47.5% of the data is between 24 and 30 cm. What is the standard deviation. (Put in the number only.)
In Q1. CLT is used which is mentioned in detail in second question.
Dishonest-coin principle:
Let X denote the number of heads in n tosses of a coin. Suppose n ≥ 30 ( n is large). Let p denote the probability of heads on each toss. Then X has an approximately normal distribution with mean µ = n p and variance σ2 = n p (1 − p).
CODES:
n=400
p=0.1
pbinom(46,n,p)-pbinom(40,n,p)
ex=n*p
ex
varx=n*p*(1-p)
varx
a=(46-ex)/sqrt(varx)
a
b=(40-ex)/sqrt(varx)
b
pnorm(a)-pnorm(b)
#Codes alongwith outputs:
#Q1.
> n=400
> p=0.1
> pbinom(46,n,p)-pbinom(40,n,p)
[1] 0.3180649
>
> ex=n*p
> ex
[1] 40
> varx=n*p*(1-p)
> varx
[1] 36
> a=(46-ex)/sqrt(varx)
> a
[1] 1
> b=(40-ex)/sqrt(varx)
> b
[1] 0
> pnorm(a)-pnorm(b)
[1] 0.3413447
#Q2.
> pnorm(0)
[1] 0.5
> pnorm(0)-47.5/100
[1] 0.025
> qnorm(0.025)
[1] -1.959964
> -6/qnorm(0.025)
[1] 3.061281
> pnorm(30,30,3.061281)-pnorm(24,30,3.061281)
[1] 0.475