Researchers studying anthropometry collected body girth measurements and skeletal diameter measurements, as well as age, weight, height and gender, for 507 physically active individuals. The histogram below shows the sample distribution of heights in centimeters.
The point estimate for the average height of active individuals is 171.1. The point estimate for the median height of active individuals is 170.3.
The point estimate for the standard deviation height of active individuals is 9.4.
177.8-163
## [1] 14.8
The point estimate for the IQR height of active individuals is 14.8
In order to answer this question let’s calculate Z-scores.
Z_tall <- (180-171.1)/9.4
Z_tall
## [1] 0.9468085
pnorm(Z_tall)
## [1] 0.8281318
# or
pnorm(q = 180, mean = 171.1, sd = 9.4)
## [1] 0.8281318
Let’s assume that the sample is normally distributed. Since the person is 1m 80cm (180 cm) tall is within 0.94 standard deviation of the mean he is not “unusually” tall. He is taller than 82.81% of the people in a sample.
Z_short <- (155-171.1)/9.4
Z_short
## [1] -1.712766
pnorm(Z_short)
## [1] 0.0433778
# or
pnorm(q = 155, mean = 171.1, sd = 9.4)
## [1] 0.0433778
Person who is 1m 55cm (155cm) tall can be considered “unusually” short since his height is -1.71 standard deviations from the mean. He is taller than 4.34% people in the sample.
I expect that the sample the mean and the standard deviation of this new sample will be close to the sample above but they will not be exactly the same.
We use standard error to estimate the mean height of all active individuals.
9.4/sqrt(507)
## [1] 0.4174687
The 2009 holiday retail season, which kicked o↵ on November 27, 2009 (the day after Thanksgiving), had been marked by somewhat lower self-reported consumer spending than was seen during the comparable period in 2008. To get an estimate of consumer spending, 436 randomly sampled American adults were surveyed. Daily consumer spending for the six-day period after Thanksgiving, spanning the Black Friday weekend and Cyber Monday, averaged $84.71. A 95% confidence interval based on this sample is ($80.31, $89.11). Determine whether the following statements are true or false, and explain your reasoning.
The statement is FALSE. 436 American adults is a random sample of the population. Sample mean is always lies within a confident interval. We are 95% confident that the population average is between $80.31 and $89.11.
The statement is FALSE. Even though the sample’s distribution is right skewed this confidence interval is valid because sample size is large enough (larger than 40 without outlines) and the distribution is not strong. In our current case, n=436, which is well above 100 so we rely on the Central Limit Theorem for a normal sampling distribution.
The statement is FALSE. Sample mean is always lies within a confident interval.
The statement is TRUE. We are 95% confident that the population (all American adults) mean (average) is between $80.31 and $89.11.
The statement is TRUE.
The statement is FALSE. According to standard error formula ( se = sd/sqrt(n) ), we would need to use a sample 9 times larger.
sqrt(n)=3 n=9
margin_error_error<-(89.11-80.31)/2
margin_error_error
## [1] 4.4
The statement is TRUE.
Researchers investigating characteristics of gifted children collected data from schools in a large city on a random sample of thirty-six children who were identified as gifted children soon after they reached the age of four. The following histogram shows the dis- tribution of the ages (in months) at which these children first counted to 10 successfully. Also provided are some sample statistics.
I believe that the conditions are satisfied because: 1. The distribution is not strongly skewed 2. The sample size is large enough (it’s greater than 30) 3. We can assume that random sample is independent since it was collected in a large city.
Null Hypothesis: mean equals to 32 Alternative Hypothesis: mean doesn’t equal to 32
#calculate standard error
se<-4.31/sqrt(36)
#calculate Z-score
Z<-(30.69-32)/se
#lower-tail hypothesis testing
p_value <- pnorm(Z)
p_value
## [1] 0.0341013
P-value allows to determine the significance of hypothesis testing results. Based on p-value result we should reject the null hypothesis since p-value is less than 0.1
1-p_value
## [1] 0.9658987
96.59% is greater than 90%. P-value falls into rejection region.
lower <- 32 - (1.645 * se)
upper <- 32 + (1.645 * se)
lower
## [1] 30.81834
upper
## [1] 33.18166
A 90% confidence interval is (30.81834,33.18166)
They don’t contradict each other as hypothesis test proves that population mean is not equal to 32 and it’s with 90% likelihood that population mean lies within (30.81834,33.18166)
Exercise 4.24 describes a study on gifted children. In this study, along with variables on the children, the researchers also collected data on the mother’s and father’s IQ of the 36 randomly sampled gifted children. The histogram below shows the distribution of mother’s IQ. Also provided are some sample statistics.
Null Hypothesis: mean (average IQ) equals to 100 Alternative Hypothesis: mean (average IQ) doesn’t equal to 100
#calculate standard error
se <- 6.5/sqrt(36)
#calculate Z-score
Z<-(118.2-100)/se
#upper-tail hypothesis testing
p_value <- 1-pnorm(Z)
p_value
## [1] 0
We should reject null hypothesis since p-value is less than 0.1.
lower <- 100 - (1.645 * se)
upper <- 100 + (1.645 * se)
lower
## [1] 98.21792
upper
## [1] 101.7821
A 90% confidence interval is (98.21792,101.7821).
They don’t contradict each other as hypothesis test proves that population mean is not equal to 100 and it’s with 90% likelihood that population mean lies within (98.21792,101.7821).
Define the term “sampling distribution” of the mean, and describe how the shape, center, and spread of the sampling distribution of the mean change as sample size increases.
“Sampling distribution” of the mean represents the distribution of sample means. When the sample size is larger the distribution is more symmetric and the mean is closer to the median. In the other words, the samples of larger sizes is more normally distributed than the samples of smaller sizes.
A manufacturer of compact fluorescent light bulbs advertises that the distribution of the lifespans of these light bulbs is nearly normal with a mean of 9,000 hours and a standard deviation of 1,000 hours.
Z <- (10500 - 9000) / 1000
#upper-tail hypothesis testing
p <- 1 - pnorm(Z)
p
## [1] 0.0668072
bulbs <- rnorm(15, mean=9000, sd = 1000)
hist(bulbs, probability = TRUE,breaks=10)
x <- 0:17000
y <- dnorm(x = x, mean = 9000, sd = 1000)
lines(x = x, y = y, col = "blue")
qqnorm(bulbs)
qqline(bulbs)
Looking at the plots above, I would say that the sample size is too small to decide whether it’s normally distributed or not. However, it’s might be normally distributed.
#calculate standard error
se <- 1000 / sqrt(15)
#clculate Z-score
Z <-(10500-9000)/se
p_value <- pnorm(Z, mean=9000, sd=1000)
p_value
## [1] 1.189897e-19
Probability almost equals to 0.
#build sample using upper and lower interval boundaries (maean plus/minus 4 standard deviation which garantees 100% interval)
sample <- seq(9000 - (4 * 1000), 9000 + (4 * 1000), length=15)
#build sample using upper and lower interval boundaries (maean plus/minus 4 standard error which garantees 100% interval)
population<- seq(9000 - (4 * se), 9000 + (4 * se), length=15)
#build normal distribution
norm_sample <- dnorm(sample,9000,1000)
norm_population<- dnorm(population,9000,se)
plot(sample, norm_sample, type="l",col="blue",
xlab="Population and Sampling",
ylab="",main="Distribution of fluorescent light bulbs", ylim=c(0,0.002))
lines(population, norm_population, col="green")
Since the sample is not large enough and the distribution is skewed we can’t estimate the probabilities from parts (a) and (c) .
Suppose you conduct a hypothesis test based on a sample where the sample size is n = 50, and arrive at a p-value of 0.08. You then refer back to your notes and discover that you made a careless mistake, the sample size should have been n = 500. Will your p-value increase, decrease, or stay the same? Explain.
se = sd/sqrt(n) : if sample size increases, standard error will decrease Z = (x-mean)/se : if sample size increases, Z-score will increase So, p-value will decrease