4.4) Heights of adults.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.

n 507 Min 147.2 Q1 163.8 Median 170.3 Mean 171.1 SD 9.4 Q3 177.8 Max 198.1

a) What is the point estimate for the average height of active individuals? What about the median?

The average height of active individuals is 171.1. 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 for standard deviation is 9.4. The point estimate for the IQR is 14 (Q3 - Q1).

print (paste0('Q3-Q1: ', 177.8 - 163.8 ))
## [1] "Q3-Q1: 14"

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.

x1 <- 180
x2 <- 155
sd =9.4
mn <- 171.2

x1_sd_range <- abs(x1-mn)/sd
print (paste0("X1_Range:" , x1_sd_range))
## [1] "X1_Range:0.936170212765959"
x2_sd_range <- abs(x2-mn)/sd
print (paste0("X2_Range:" , x2_sd_range))
## [1] "X2_Range:1.72340425531915"

Both values of the height are falling into 1-2 SD of the mean , they should consider to be normal.

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.

No. Each sample is composed of randomly selected observations from the population. So the observations in each different sample would vary.

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 SD¯x = ! pn )? Compute this quantity using the data from the original sample under the condition that the data are a simple random sample.

We use the standard error to quantify the variability. A sample mean deviates from the actual mean of a population; this deviation is the standard error. We can calculate this by:

The standard error from the original sample is 0.4174687.

sd <- 9.4
n <- sqrt (507)
sd/n
## [1] 0.4174687

4.14) Thanksgiving spending, Part I.

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.

a) We are 95% confident that the average spending of these 436 American adults is between $80.31 and $89.11.

FALSE. The sample size is larger than 30. There is a slight skew to the right but the spread does not look abnormal.

b) This confidence interval is not valid since the distribution of spending in the sample is right skewed.

FALSE. Confidence interval for the mean of a sample is not about other sample means.

c) 95% of random samples have a sample mean between $80.31 and $89.11.

FALSE. The average spending of all American adultsis being estimated by the point estimate and the confidence interval.

d) We are 95% confident that the average spending of all American adults is between $80.31 and $89.11.

TRUE. With a 90% confidence interval we do not need such a wide interval to catch the values, so the interval would be narrower.

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. A 90% CI would be narrower because we do not have to capture a wider range of values. We would only be 90% confident that our point estimate range includes the true population value.

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.

FALSE. In order to decrease the margin of error by 3, we need to increase the sample by 32=9

g) The margin of error is 4.4

4.24) 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.

n 36 min 21 mean 30.69 sd 4.31 max 39

a. Are conditions for inference satisfied?

True, this is the confidence intraval constructed with the given information

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 first count to 10 successfully is less than the general average of 32 months. Use a significance level of 0.10.

False. Base on the p-value , we can reject the hypothesis average age at which gifted kids first count to 10 is same as general population

n <- 36
sd <- 4.31
se <- sd/sqrt(n)
mean <- 32

z_score = (30.69 - mean)/se
z_score #-1.823666
## [1] -1.823666
print ( paste0('P_value: ' , round(pnorm(q = 30.69, mean = 32, sd = se),2)))
## [1] "P_value: 0.03"

Interpret the p-value in context of the hypothesis test and the data.

False. If the null hypothesis is true, then the probability of observing a sample mean lower than 30.69 for a sample of 36 children is only 0.0344 (p-value).

(d) Calculate a 90% confidence interval for the average age at which gifted children first count to 10 successfully

critical value for 90% CI: 1.64. The 90% confidence interval is (29.51 31.87)

n <- 36
sd <- 4.31
se <- sd/sqrt(n) #0.7183333
mean <- 30.69

lower <- mean - 1.64 * se
upper <- mean + 1.64 * se

c(lower, upper)
## [1] 29.51193 31.86807

e) Do your results from the hypothesis test and the confidence interval agree? Explain

Results from the hypothesis test and the confidence interval seem to agree. We are 90% confident that the average age at which gifted children first count to 10 is between 29.5 and 31.9 months. This is lower than the average age for all children at 32 months.

4.26) Gifted children, Part II.

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.

Mother’s IQ:

n 36 min 101 mean 118.2 sd 6.5 max 131 ## a) 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.

x <- 100
n <- 36
avg <- 118.2
sd <- 6.5
SE <- sd/sqrt(n)
z = (avg - x)/SE
z
## [1] 16.8

Calculate a 90% confidence interval for the average IQ of mothers of gifted children.

b) The 90% confidence interval is (116.41,119.99)

.

x1 <- avg - 1.65 * SE
x2 <- avg + 1.65 * SE
round(x1,2)
## [1] 116.41
round(x2,2)
## [1] 119.99

c) Do your results from the hypothesis test and the confidence interval agree? Explain.

Yes. We rejected the null hypothesis and the value 100 is not in the 90% CI interval.

Problem 4.34 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.

A sampling distribution is a probability distribution of a statistic obtained through a large number of samples drawn from a specific population. The sampling distribution of the mean takes the mean of each sample. As the sample size gets larger, the shape becomes in a normal distrubition shape and has a smaller spread.

Problem 4.40

a. What is the probability that a randomly chosen light bulb lasts more than 10,500 hours?

First, we will need to figure out the z-score for this randomly chosen sample. z = (x - mu) / sd Once that is calculated, you need to subtract 1 from the pnorm because we are looking for the probability of 10,500 or more.

x <- 10500
mu <- 9000
sd <- 1000
p <- 1 - pnorm(x, mu, sd)
prob <- round(p,4)
prob
## [1] 0.0668
normalPlot(mean = 0, sd = 1, bounds=c(1.5,4), tails = FALSE)

### Answer: The probability that the randomly chosen light bulb lasts more than 10,500 hours is 6.668%

b) Describe the distribution of the mean lifespan of 15 lightbulbs.

### mean: 9000 sd: 258.20

sd <- 1000
mean <- 9000

sample_sd <- sd/sqrt(15)
round(sample_sd, 2)
## [1] 258.2

c) What is the probability that the mean lifespan of 15 randomly chosen light bulbs is more than 10,500 hours.

This probability (see below) is very small and practically zero.

x <- 10500
mu <- 9000
sd <- 1000
n <- 15
smp15 <- sd/sqrt(n)
prob15 <- 1-pnorm(x, mu, smp15)
ans <- round(prob15, 4)
ans
## [1] 0

d) Sketch the two distributions (population and sampling) on the same scale

Blcak : Population distribution ; red: sampling distribution

s <- seq(5000,13000,0.01)
plot(s, dnorm(s,9000, 1000), type="l", ylim = c(0,0.002), ylab = "", xlab = "Lifespan (hours)")
lines(s, dnorm(s,9000, 258.1989), col="red")

e) We could not estimate part a without a nearly normal distribution.

Problem 4.48 The P value will decrease as the sample size gets larger.