# 4.4 Heights of adults

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

Mean height is 171.1 and Median height is 170.3.

(b) What is the point estimate for the standard deviation of the heights of active individuals?What about the IQR?

Standard deviation is 9.4 and IQR (Q3-Q4)is 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.

180cm is closer to the Mean than the Max so I would not consider this unusually tall. A person who is 155cm is close to the Min so I would consider this unusually short.

(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.

I would expect the mean and standard deviaton to vary if another random sample was taken as their would be variation from the sample.

(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. Compute this quantity using the data from the original sample under the condition that the data are a

simple random sample. We use standard error (SD/sqrt(sample total)oto quantify the variability.

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

# 4.14 Thanksgiving spending, Part I.

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

False, confidence intervals refer to the population mean and not all 436 american adults.

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

False, the confidence interval can be valid when the distribution is skewed.

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

False, confidence intervals refer to the population mean and not all 436 american adults.

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

True, confidence interval referes to the population.

(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% confidence interval would be narrower than the 95% confidence interval.

(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, a sample size of 9 times bigger would be needed.

(g) The margin of error is 4.4.

True,(89.11-80.31)/2=4.4.

# 4.24 Gifted children, Part I.

(a)Are conditions for inference satisfied?

Yes,the sample size is above the minimum of 30 which would mean distribution is normal.

(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.
z <- (30.69-32)/(4.31/6)
p <- 2*pnorm(z)
p
## [1] 0.0682026
(c) Interpret the p-value in context of the hypothesis test and the data.

The null hypothesis can be rejected since p is less than .10.

(d) Calculate a 90% confidence interval for the average age at which gifted children first count to 10 successfully.
lv<- 30.69 - 1.645*(4.31/6)
uv<- 30.69 + 1.645*(4.31/6)
c(lv, uv)
## [1] 29.50834 31.87166
(e) Do your results from the hypothesis test and the confidence interval agree? Explain.

yes, both agree. They both support evidence that that gift children can count to 10 between 29.5 and 31.9 months.

# 4.26 Gifted children, Part II.

(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.

z <- (118.2-100)/(6.5/6)
p <- 2*pnorm(-abs(z))
p
## [1] 2.44044e-63
(b) Calculate a 90% confidence interval for the average IQ of mothers of gifted children.
lv <- 118.2 - 1.645*(6.5/6)
uv <- 118.2 + 1.645*(6.5/6)
c(lv, uv)
## [1] 116.4179 119.9821
(c) Do your results from the hypothesis test and the confidence interval agree? Explain.

Yes,90% certain the average IQ of mothers of gifted children is between 116.4125 and 119.9875

# 4.34 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” is the distribution of sample means, which resembles the normal distribution. As the sample increases, the center moves closer to the population mean, and the spread becomes narrower.

# 4.40 CFLBs.

(a) What is the probability that a randomly chosen light bulb lasts more than 10,500 hours?
p <- (1 - pnorm(10500, mean = 9000, sd = 1000))
p
## [1] 0.0668072
(b) Describe the distribution of the mean lifespan of 15 light bulbs.

The distribution is not normal since a sample siz of 15 is a small.

lb <- rnorm(15 ,mean = 9000, sd = 1000)
hist(lb)

(c) What is the probability that the mean lifespan of 15 randomly chosen light bulbs is more than 10,500 hours?
Z <- (10500-9000)/(1000/15^0.5)
1 - pnorm(Z)
## [1] 3.133452e-09
(d) Sketch the two distributions (population and sampling) on the same scale.
pop <- rnorm(1000, 9000, 1000)
hist(pop)
hist(lb,  col="blue", add=T)
box()

(e) Could you estimate the probabilities from parts (a) and (c) if the lifespans of light bulbs had a skewed distribution?

No, it would not be likely to get an estimate of the distribution. In order to make an inference the sample should be larger.

# 4.48 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 is derived from the Z-score using Standard Eror instead of Standard Deviation. If everything remains constant with the exception of sample size increasing the Standard Error decreases and the Z-score increases. The p-value would decrease if the Z-score increases.