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? What about the median?
- Point estimate of the Parameter given would be around 171
- Looking at the graph, I would put the median around 170-171. Lets see what my super calculator R says
q1mean <- mean(bdims$hgt)
q1median <- median(bdims$hgt)
q1mean
## [1] 171.1438
q1median
## [1] 170.3
- What is the point estimate for the standard deviation of the heights of active individuals? What about the IQR?
q1sd <- sd(bdims$hgt)
q1IQR <- IQR(bdims$hgt)
q1sd
## [1] 9.407205
q1IQR
## [1] 14
- 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.
- Since the central tendency is not skewed far from one side to another, the mean and standard deviation gives us better insight into the data.
q1mean + (q1sd)
## [1] 180.551
q1mean - (q1sd)
## [1] 161.7366
- With that said, if the Mean is ~171 and the SD is ~9.4 than the range of the First deviation is 161 - 180. The taller person in this question (180cm) would not be “unusually tall” as they would fall right into the edge of the range. However, the shorter of the 2 (155), misses the 68% range by ~6cm and would be considered “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.
- Yes, I would expect the the new sample to fall very close to the mean and standard deviation of the current sample. First, the Researchers are already subsetting their data with “physically active individuals”. If they do not expand on the pool available (take it off the college campus), I don’t see the numbers moving much.
- Second (and of far less conscience to this course), with the sample portion of 507 individuals, the researchers have hit very close to the mean height of the entire US population, 173.3cm.
- 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}}\))? Compute this quantity using the data from the original sample under the condition that the data are a simple random sample.
n <- 507
q1sd/sqrt(n)
## [1] 0.4177887
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 have more than 95% confidence in the numbers as 100% of the average spending is between $80.31 and $89.11.
- This confidence interval is not valid since the distribution of spending in the sample is right skewed.
- FALSE - Other condifitons of the confidence interval has been met. The interval may still be valid with the sample is slightly skewed and still meets the central limit theorm.
- 95% of random samples have a sample mean between $80.31 and $89.11.
q2_avg <- 84.71
q2_sd <- sd(tgSpending$spending)
q2_n <- 436
q2_error <- qnorm(0.975)* q2_sd/sqrt(q2_n)
q2_lower <- q2_avg - q2_error
q2_upper <- q2_avg + q2_error
q2_lower
## [1] 80.30504
q2_upper
## [1] 89.11496
- True - see upper and lower scores
- We are 95% confident that the average spending of all American adults is between $80.31 and $89.11.
- TRUE - based on the write up above and the defination of Confidence Interval, the interval covers the parameter value.
- A 90% confidence interval would be narrower than the 95% confidence interval since we don’t need to be as sure about our estimate.
- 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 - Due to the Square Root of N, we would need the sample to be 9 times larger (3^2)
- The margin of error is 4.4.
(89.11-80.31)/2
## [1] 4.4
Gifted children, Part I. 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.

- Are conditions for inference satisfied?
- Sample was pulled randomly from population? Yes
- Sample distribution is approximately normal? Yes
- Observations are independent? Yes
- The conditions are satisfied
- 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.
SigLevel <- .10 ##significance level
x = 32
n = 36
mu = 30.69 ##mean
sd = 4.31 ##sigma
SE = sd/sqrt(n)
Z = (mu-x)/SE
- Null hypothesis (Ho): As stated in the question is \(\mu =\) 32 months
- Alternate hypothesis (H1): Is the reverse of the Null as \(\mu !=\) 32 months
p = pnorm(Z, mean = 0, sd = 1) * 2
p
## [1] 0.0682026
- Is p value equal to the significance level of 0.10? No, we can reject the Null hypothesis
- Interpret the p-value in context of the hypothesis test and the data.
- Since we have a P-value lower than the significance level, we can make a suggestion the gifted children count to 10 faster than a normal child.
- Calculate a 90% confidence interval for the average age at which gifted children first count to 10 successfully.
mu - 1.65 * SE
## [1] 29.50475
mu + 1.65 * SE
## [1] 31.87525
- Do your results from the hypothesis test and the confidence interval agree? Explain.
- Yes, both agree and we have rejected the Null hypothesis by taking \(\mu =\) 32 months
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.

- Perform a hypothesis test to evaluate if these data provide convincing evidence that the average IQ of mothers of gifted children is different than the average IQ for the population at large, which is 100. Use a significance level of 0.10.
SigLevel <- .10 ##significance level
x <- 32
n <- 36
mu <- 118.2 ##mean
sd <- 6.5 ##sigma
min <- 101
max <- 131
SE <- sd/sqrt(n)
Z <- (mu-x)/SE
- Null hypothesis (Ho): Average Mother’s IQ of gifted children is equal to the populations average IQ
- Alternate hypothesis (H1): Is the reverse of the Null: Mother’s average IQ is NOT equal to the populations average IQ
p <- (1-pnorm(Z, mean = 0, sd = 1)) * 2
p
## [1] 0
- Is p value equal to the significance level of 0.10? No, we can reject the Null hypothesis
- Calculate a 90% confidence interval for the average IQ of mothers of gifted children.
mu - 1.65 * SE
## [1] 116.4125
mu + 1.65 * SE
## [1] 119.9875
- Do your results from the hypothesis test and the confidence interval agree? Explain.
- Yes, both the hypothesis test (previously rejected) and the confidence interval agree (Population Average = 100 vs Gifted confidence level of 116 to 120) the Alternate hypothesis is correct.
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.
The “sampling distribution” of the mean defines the mean distribution of the population from which the sample is pulled.
When sample size increases the normal approximation becomes better defined; the spread of the “sampling distribution” of the mean becomes narrower.
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.
- What is the probability that a randomly chosen light bulb lasts more than 10,500 hours?
1-pnorm(10500, mean = 9000, sd = 1000)
## [1] 0.0668072
- Describe the distribution of the mean lifespan of 15 light bulbs.
- In the graph below, Green is the lifespan of 15 bulbs and Blue is the lifespan of the first population (9000)
n <- 15
mu<- 9000
sd<- 1000
b15 <- rnorm(n, mean = mu, sd = sd)
mu15 <- mean(b15)
sd15 <- sd(b15)
hist(b15, probability = TRUE, xlab = "Lifespan per hour")
x <- 0:11000
y15 <- dnorm(x = x, mean = mu15, sd = sd15)
y <- dnorm(x = x, mean = mu, sd = sd)
lines(x = x, y = y, col = "green")
abline(v=mu,col="green")
lines(x = x, y = y15, col = "blue")
abline(v=mu15,col="blue")

- 15 is considered too small to hit normal distribution as per the central limit theorm. (I just wanted to play with a graph I was shown how to do)
- What is the probability that the mean lifespan of 15 randomly chosen light bulbs is more than 10,500 hours?
n <- 15
x<- 10500
mu<- 9000
sd <- 1000
se <- sd/sqrt (n)
bulbs15 <- rnorm(n, mean = mu, sd = sd)
mu15 <- mean(bulbs15)
sd15 <- sd(bulbs15)
SE15 <- sd15/sqrt(n)
p15 <- 1 - pnorm(x, mean = mu, sd = SE15)
p15
## [1] 2.774714e-11
- The probability the mean lifespan of 15 bulbs will exceed 10,500 hours is so small it equals 0%
- Sketch the two distributions (population and sampling) on the same scale.
pop_sample_x <- 4000:14000
pop_sample_y <- dnorm(pop_sample_x, mean = mu, sd = sd)
sample15x <- 4000:14000
sample15y <- dnorm(sample15x, mean = mu, sd = SE15)
plot(pop_sample_x, pop_sample_y)

plot(sample15x, sample15y)
(e) Could you estimate the probabilities from parts (a) and (c) if the lifespans of light bulbs had a skewed distribution?
- No, the distribution has to be close to normal. One of the calculations requires the normal distribution.
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 always change with the change of the sample size. In this case the the p-value will decrease while the sample size increases.