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.
mean<- 0
SD <- 1
x <- seq(-4, 4, length = 1000)
y <- dnorm(x, mean, SD)
(a) What is the point estimate for the average height of active individuals? What about the median?
The point estimate of the mean is 171.1, and the median is 170.3.
(b) What is the point estimate for the standard deviation of the heights of active individuals? What about the IQR?
The point estimate of the standard deviation is 9.4, and the IQR is Q1 to Q3, or 163.8 to 177.8.
(c) Is a person who is 1m 80cm (180 cm) tall considered unusually tall? And is a person who is 1m 55cm (155cm) considered unusually short? Explain your reasoning.
mean<-171.1
sd<-9.4
tall<-180
short<-155
zTall<- (tall-mean)/sd
zShort<- (short-mean)/sd
zTall
## [1] 0.9468085
zShort
## [1] -1.712766
Assuming a normal distribution, a person with a height of 180cm places the individual within 1 SD of the mean and would not be an “unusual” height, whereas 155cm is more distant from the mean (-1.7) and therefore a much smaller proportion of people would be shorter.
(d) The researchers take another random sample of physically active individuals. Would you expect the mean and the standard deviation of this new sample to be the ones given above? Explain your reasoning.
There is a very high probability that another sample would yield different, but similar results, given a sample size of 507 persons. This is inherent to random sampling and random distributions.
(e) The sample means obtained are point estimates for the mean height of all active individuals, if the sample of individuals is equivalent to a simple random sample. What measure do we use to quantify the variability of such an estimate (Hint: recall that SDx ¯ = p !n)? Compute this quantity using the data from the original sample under the condition that the data are a simple random sample.
se<-sd/sqrt(507)
se
## [1] 0.4174687
The 2009 holiday retail season, which kicked off 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.
(a) We are 95% confident that the average spending of these 436 American adults is between $80.31 and $89.11.
True. We are 95% confident that the stated range contains the mean for the population at large and also for the sampled population.
(b) This confidence interval is not valid since the distribution of spending in the sample is right skewed.
False. The confidence interval is unaffected by this. The data is skewed beyond what appear to be within normal parameters required for our confidence interval.
(c) 95% of random samples have a sample mean between $80.31 and $89.11.
False. This is not what the confidence interval represents.
(d) We are 95% confident that the average spending of all American adults is between $80.31 and $89.11.
True.
(e) A 90% confidence interval would be narrower than the 95% confidence interval since we don’t need to be as sure about our estimate.
True. Less certainty would imply narrower bounds.
(f) In order to decrease the margin of error of a 95% confidence interval to a third of what it is now, we would need to use a sample 3 times larger.
Let us compare.
#existing values
n1<-436
moe1<- (89.11-80.31)/2
se1 <- moe1 / 1.96
sd1 <- se * sqrt(n1)
moe1
## [1] 4.4
se1
## [1] 2.244898
sd1
## [1] 8.717001
#new values
n2 <- 3*n1
se2 <- sd1 / sqrt(n2)
moe2<- se2*1.96
moe2
## [1] 0.4724103
4.4/3
## [1] 1.466667
A new sample size does not need to be 3 times greater to achieve these results.
((g) The margin of error is 4.4.
True
moe<- (89.11-80.31)/2
moe
## [1] 4.4
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 distribution of the ages (in months) at which these children first counted to 10 successfully. Also provided are some sample statistics.
(a) Are conditions for inference satisfied?
The data is not ideal, but inference should be considered.
(b) Suppose you read online that children first count to 10 successfully when they are 32 months old, on average. Perform a hypothesis test to evaluate if these data provide convincing evidence that the average age at which gifted children fist count to 10 successfully is less than the general average of 32 months. Use a significance level of 0.10.
H Null: mean=32
H Alternative: mean<32
mean<-30.69
sd<-4.31
n<-36
#calc se
se<-sd/sqrt(n)
#calc z difference
zmeandiff<-(mean-32)/se
#lower-tail hypothesis testing
pvalue <- pnorm(zmeandiff)
pvalue
## [1] 0.0341013
(c) Interpret the p-value in context of the hypothesis test and the data.
We would reject the null hypothesis. The key relationship is between the small pValue and the significance level. Given a normal distribution of sample means in combination with the p value, the probability of receiving a mean of 32 is not significant.
(d) Calculate a 90% confidence interval for the average age at which gifted children first count to 10 successfully.
#confidence interval z
z<-abs(qnorm(.1))
lower <- mean - (z * se)
upper <- mean + (z * se)
lower
## [1] 29.76942
upper
## [1] 31.61058
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.
(a) Perform a hypothesis test to evaluate if these data provide convincing evidence that the average IQ of mothers of gifted children is di???erent than the average IQ for the population at large, which is 100. Use a significance level of 0.10.
H Null: mean = 100, the mean of gifted mothers is equal to the average IQ
H Alternative: mean > 100, the mean of gifted mothers is greater than the average IQ
n<-36
meanSamp<-118.2
sd<-6.5
se<-sd/(sqrt(n))
zmeandiff<-(meanSamp-100)/se
#upper-tail hypothesis testing
pvalue <- 1-pnorm(zmeandiff)
pvalue
## [1] 0
We conclude by rejecting H0 in favor of the alternative. We see no significant overlap. A p value of 0 implies virtually no possibility (given the validity of our study). It is not likely that we would see a mean as low as our sample given the evidence.
(b) Calculate a 90% confidence interval for the average IQ of mothers of gifted children.
#confidence interval z
z<-abs(qnorm(.1))
lower <- meanSamp - (z * se)
upper <- meanSamp + (z * se)
lower
## [1] 116.8117
upper
## [1] 119.5883
(c) Do your results from the hypothesis test and the confidence interval agree? Explain.
Yes, the interval is well above the mean of H0. The analyses agree.
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.
The central limit theorem is the assumption of normality inherent within a relatively non-skewed distribution, having more than 30 independent samples. It then factors the law of large numbers, which says that as we increase samples beyond the minimum theshold, we calibrate our sample mean, sd, se closer the the real, or population equivalents. This is what the confidence interval statistically approximates. These statistical analyses are referred to as the sampling distribution of the mean.
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.
(a) What is the probability that a randomly chosen light bulb lasts more than 10,500 hours?
z10500 <- (10500 - 9000) / 1000
#upper-tail test
p <- 1 - pnorm(z10500)
p
## [1] 0.0668072
(b) Describe the distribution of the mean lifespan of 15 light bulbs.
Despite not having 30 samples, as required by the CLT, the most likely result would be a normal distribution (seen in the plot), with a mean of 9000.
sd<-1000
mean<-9000
n<-15
(c) What is the probability that the mean lifespan of 15 randomly chosen light bulbs is more than 10,500 hours?
#standard error
se <- sd / sqrt(n)
#z-score of sample
z10500B <-(10500-mean)/se
p <- pnorm(z10500B, mean, sd)
p
## [1] 1.189897e-19
A probability is 0, given the very small p value.
(d) Sketch the two distributions (population and sampling) on the same scale.
red = sampling
blue = population
normsample <- seq(mean - (4 * sd), mean + (4 * sd), length=15)
randomsample<- seq(mean - (4 * se), mean + (4 * se), length=15)
hnorm <- dnorm(normsample,mean,sd)
hrandom<- dnorm(randomsample,mean,se)
plot(normsample, hnorm, type="l",col="blue",
xlab="Lightbulb Population vs Sampling",
ylab="",main="Distribution of CFLBs", ylim=c(0,0.002))
lines(randomsample, hrandom, col="red")
(e) Could you estimate the probabilities from parts (a) and (c) if the lifespans of light bulbs had a skewed distribution?
If the skew were defined somehow, yes, but if the shape is not known, the tools required to estimate the distribution are also not known. So, the answer is no.
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.
The p value should decrease as the sample size increases. The standard error decreases, the z-score increases, and therefore the p value will decrease.