Heights of adults. (7.7, p. 260) 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.
What is the point estimate for the average height of active individuals? Average height is 171.1 What about the median? Median height is 170.3
What is the point estimate for the standard deviation of the heights of active individuals? std dev is 9.4 What about the IQR? =177.8 - 163.8 = 14
Is a person who is 1m 80cm (180 cm) tall considered unusually tall? No. The mean + std dev is 171.1 + 9.4 = 180.5, so 180 cm is one std deviation (about 68%) of the population. And is a person who is 1m 55cm (155cm) considered unusually short? Explain your reasoning. No. 155 cm falls within two std deviations (152.7 cm) of the mean, so while this person is shorter, he is not “unusually” short.
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. No, I would not expect the mean and the std dev to be the same as the ones given above. However, given the large sample size and normal distribution, application of the law of large numbers and central limit theorem suggests that the mean of the next sample would be close to the first mean and both means are close to the true population mean.
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 \(SD_x = \frac{\sigma}{\sqrt{n}}\))? The standard error. Compute this quantity using the data from the original sample under the condition that the data are a simple random sample.
#se <- sd/sqrt(n) where se = standard error, sd = standard deviation, and n = sample size
se <- 9.4/sqrt(507)
se
## [1] 0.4174687
Thanksgiving spending, Part I. 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.
We are 95% confident that the average spending of these 436 American adults is between $80.31 and $89.11. False. We are 95% confident that the population (all American adults) mean is within this range.
This confidence interval is not valid since the distribution of spending in the sample is right skewed. False. I agree the confidence interval is not valid, but it’s because there are extreme outliers (more than 3 std deviations from the mean. Just being right skewed is not enough by itself to rule out being able to assume a normal distribution.
95% of random samples have a sample mean between $80.31 and $89.11. False. 95% represents a confidence interval which by definition is “we’re 95% confident that the population mean is among the sample means”.
We are 95% confident that the average spending of all American adults is between $80.31 and $89.11. True. See my comments in (a) above.
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. By definition the confidence percent is positively correlated to the range. If I decide to be less confident, then I don’t need as wide of a range.
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. False, because we use the square root of the sample size, N, not the sample size.
The margin of error is 4.4. True. By definition the margin of error is half the width of the standard deviation.
Gifted children, Part I. Researchers investigating characteristics of gifted children col- lected 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.
Are conditions for inference satisfied? Yes. N > 30 and there are no extreme outliers. All the data is within 3 standard deviations of the mean.
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.
#H0: count_to_10 = 32 months
#H1: count_to_10 < 32 months
N = 36
ci = 0.9
sd = 4.31
online_mean = 32
study_mean = 30.69
z_score = (study_mean - online_mean)/(sd/sqrt(N))
study_pnorm = round(pnorm(z_score),2)
cat('The pnorm of', study_pnorm, 'is less than the significance level of', 1-ci, 'so reject H0 and conclude that it appears that gifted children count to 10 faster than the average.')
## The pnorm of 0.03 is less than the significance level of 0.1 so reject H0 and conclude that it appears that gifted children count to 10 faster than the average.
Interpret the p-value in context of the hypothesis test and the data. See my comments in (b)
Calculate a 90% confidence interval for the average age at which gifted children first count to 10 successfully.
N = 36
ci = 0.90
study_mean = 30.69
sd = 4.31
#study_mean +/- (ci * SE)
study_qnorm <- round(qnorm(ci) * (sd/sqrt(N)),2)
cat('90% confidence interval:', study_mean - study_qnorm, '<', study_mean, '<', study_mean + study_qnorm)
## 90% confidence interval: 29.77 < 30.69 < 31.61
Gifted children, Part II. Exercise above 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.
#H0: avg IQ of gift Moms = avg iq of pop Moms
#H1: avg IQ of gift Moms != avg iq of pop Moms
N = 36
gift_mean = 118.2
pop_mean = 100
sd = 6.5
ci = 0.9
moms_z_score = (gift_mean - pop_mean)/(sd/sqrt(N))
moms_pnorm <- round(pnorm(moms_z_score, lower.tail = FALSE),2)
cat('The pnorm for gifted moms is', moms_pnorm,'which is less than the significance level of', 1-ci, ',so the null hypothesis can be rejected.')
## The pnorm for gifted moms is 0 which is less than the significance level of 0.1 ,so the null hypothesis can be rejected.
N = 36
gift_mean = 118.2
pop_mean = 100
sd = 6.5
ci = 0.90
moms_qnorm <- qnorm(ci) * (6.5/sqrt(N))
cat('90% confidence interval:', gift_mean - moms_qnorm, '<', gift_mean, '<', gift_mean + moms_qnorm)
## 90% confidence interval: 116.8117 < 118.2 < 119.5883
CLT. 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 all the means of all the samples that were run. As the sample size increases the shape, center, and spread of the sampling distribution gets smaller.
CFLBs. 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.
mean = 9000
sd = 1000
x = 10500
one_bulb_zscore = (x - mean)/sd
round(pnorm(one_bulb_zscore),2)
## [1] 0.93
Describe the distribution of the mean lifespan of 15 light bulbs. N(mean = 9,000, SE = 1000/3.87 = 258)
What is the probability that the mean lifespan of 15 randomly chosen light bulbs is more than 10,500 hours?
N = 15
bulbs_zscore = (x - mean)/(sd/sqrt(N))
bulbs_pnorm <- pnorm(bulbs_zscore)
round(1 - bulbs_pnorm, 2) #subtract from because looking for greater than, not less than
## [1] 0
#Plot the one bulb z_score
DATA606::normalPlot(mean = 0, sd = 1, bounds = c(one_bulb_zscore,4), tails = TRUE)
#Plot the fifteen bulbs z_score
DATA606::normalPlot(mean = 0, sd = 1, bounds = c(bulbs_zscore,4), tails = FALSE)
Same observation, different sample size. 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 will decrease because N is in the denominator of the Z_score calculation, and dividing by a larger denominator results in a smaller z_score. This is illustrated in the hypothetical example below…
#Suppose the following...
N1 = 50
mean = 600
x = 200
sd = 2000
small_sample_zscore = (x - mean)/(sd/sqrt(N1))
cat('Small sample:', pnorm(small_sample_zscore))
## Small sample: 0.0786496
N2 = 500
large_sample_zscore = (x - mean)/(sd/sqrt(N2))
round(pnorm(large_sample_zscore))
## [1] 0
cat('Large sample:', round(pnorm(large_sample_zscore)))
## Large sample: 0