In: Statistics and Probability
SOLVE THE FOLLOWING USING STATISTICAL SOFTWARE R, POST YOUR CODE:
PROBLEM 1.
Suppose we have 100 independent draws from some population distribution whose shape is unknown but where the population mean is 10 and SD is 2.5. Suppose tha tn=100 is sufficiently large that for the sample mean to have an approximately normal distribution.
(a) What is the chance that the sample mean is within 0.1 units of the population mean?
(b) What is the chance that the sample mean exceeds the population mean by at least 0.25 units?
PROBLEM 2.
We are interested in estimating the concentration of a biomarker on the basis of measurements of a number of technical replicates. Suppose measurements of such replicates will be approximately normally distributed with unknown mean (the true concentration) and known SD = 0.75 units. How many replicates should we measure if we wish our 95% confidence interval for the true concentration to have width <1 units?
PROBLEM 1.
(a)
Standard error of mean =
The sampling distribution of sample mean is N( 10, s = )
P[|x - | 0.1] = P[-0.1 < (x - ) < 0.1] = P[(x - ) < 0.1] - P[(x - ) < -0.1]
= P[x < + 0.1] - P[x < - 0.1]
Running below R code, we get P[|x - | 0.1] = 0.3108435
mu = 10
sigma = 2.5
n = 100
s = sigma/sqrt(n)
pnorm(mu+0.1, mu, s) - pnorm(mu-0.1, mu, s)
(b)
P[x - 0.25] = P[x > + 0.25]
Running below R code, we get P[x > + 0.25] = 0.1586553
mu = 10
sigma = 2.5
n = 100
s = sigma/sqrt(n)
pnorm(mu+0.25, mu, s, lower.tail = FALSE)
PROBLEM 2.
Required sample size is,
n = (z / E)2
where z is the z value for 95% confidence interval (p = 0.95 + (1 - 0.95)/2 = 0.975)
is population SD = 0.75
E is the largest margin of error = width interval / 2 = 1/2 = 0.5
Required sample size using below R code is n = 8.64 9
z = qnorm(0.975) #For 95% confidence interval
E = 1/2
sigma = 0.75
(z * sigma / E)^2 #Sample size