Statistical Inteference Coursera

Week-2, Quiz:2

Question 1

What is the variance of the distribution of the average an IID draw of n observations from a population with mean μ and variance σ2. Ans: The variance of the sample mean is σ^2/n

Question 2

Suppose that diastolic blood pressures (DBPs) for men aged 35-44 are normally distributed with a mean of 80 (mm Hg) and a standard deviation of 10. About what is the probability that a random 35-44 year old has a DBP less than 70? Ans:

mean = 80
sd = 10
round(pnorm(70, mean = 80, sd = 10, lower.tail = T),2)
## [1] 0.16

So 16%

Question 3

Brain volume for adult women is normally distributed with a mean of about 1,100 cc for women with a standard deviation of 75 cc. What brain volume represents the 95th percentile ? Ans: We just need to calculate the quantile corresponding to a probability of 0.95, knowing that the brain volume follows a normal law N(1100,75^2).

qnorm(0.95,mean=1100,sd=75,lower.tail = TRUE)
## [1] 1223.364

Ans is 1223

Question 4

Refer to the previous question. Brain volume for adult women is normally distributed with a mean of about 1,100 cc for women with a standard deviation of 75 cc. Consider the sample mean of 100 random adult women from this population. What is th 95th percentile of the distribution of the sample mean ?

Answer : As the number of people is large enough, we can consider that the sample mean follows a normal distribution N(μ,σ2/n), where μ=1100, σ=75 and n=100.

qnorm(0.95,mean=1100,sd=75/10,lower.tail = TRUE)
## [1] 1112.336

ans. is 1112

Question 5

You flip a fair coin 5 times. About what is the probability of getting 4 or 5 heads ?

choose(5,4)*(0.5)^5 + choose(5,5)*(0.5)^5
## [1] 0.1875
pbinom(3,size=5,prob=0.5, lower.tail = FALSE)
## [1] 0.1875

Question 6

The respiratory disturbance index (RDI), a measure of sleep disturbance, for a specific population has a mean of 15 (sleep events per hour) and a standard deviation of 10. They are not normally distributed. Give your best estimate of the probability that a sample mean RDI of 100 people is between 14 and 16 events per hour.

Answer : The standard error of the mean is σ/√n, where σ=10 and n=100. So the value is 1. We then want to measure the probability of the RDI being inside 1 standard deviation around the mean. Thus it should be around 68%.

Question 7

Consider a standard uniform density. The mean for this density is 0.5 and the variance is 1/12. You sample 1000 observations from this distribution and take the sample mean, what value would you expect it to be near ?

n <- 1000
means <- 0.5
library(ggplot2)
g <- ggplot(data.frame(x = 1:n, y = means), aes(x = x, y = y))
g <- g + geom_hline(yintercept = 0) + geom_line(size = 2)
g <- g + labs(x = "Number of obs", y = "Cumulative mean")
g

approx. answer is 0.5

Question 8

The number of people showing up at a bus stop is assumed to be Poisson with a mean of 5 people per hour. You watch the bus stop for 3 hours. About what’s the probability of viewing 10 of fewer people ?

Answer:

ppois(10, lambda=15)
## [1] 0.1184644

answer is approx. 0.12