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.

R interface

R interface

  1. What is the point estimate for the average height of active individuals? What about the median? (See the next page for parts (b)-(e).) Answer: The average height(mean) of active individuals is 171.1. The median is 170.3

  2. What is the point estimate for the standard deviation of the heights of active individuals? What about the IQR? Answer: The standard deviation of the heights of active individuals is 9.4 The IQR is 177.8 - 163.8 = 14

  3. 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. Answer: The 180 cm falls in between Q3 and Max height. Its closer to max height. So, a person can be called a tall person. The 155 cm falls in between Q1 and Min height. Its closer to min height. So, it can be called a short person.

  4. 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. Answer: The other mean and the standard deviation of this new sample will definitely be different than the one above mentioned. It is not possible to be the same. But there is a very high chance that it will be similar. The first reason is that the above given data also ranges in between 145 to 200. And a height of random people or sample height of a population will definitely fall in between these. That’s what human heights are. If you calculate the random height of chinese people, then it will be around 5.3, if japanese people, then 5.3, if american 5.11, etc. it depends on which country you choose.

  5. 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. Answer:

sample <- 507
sd <- 9.4
se <- sd / sqrt(sample) 
round(se, digits = 2) 
## [1] 0.42

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.

knitr::include_graphics("https://raw.githubusercontent.com/maharjansudhan/DATA606/master/4.14.PNG")
library(openintro)
## Please visit openintro.org for free statistics materials
## 
## Attaching package: 'openintro'
## The following objects are masked from 'package:datasets':
## 
##     cars, trees
hist(tgSpending$spending, main = "", xlab = "Spending", ylab = "")

summary(tgSpending$spending)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   5.719  49.177  75.792  84.707 112.255 282.803
  1. We are 95% confident that the average spending of these 436 American adults is between $80.31 and $89.11. Answer: False. The average spending of the sample is exactly $84.70

  2. This confidence interval is not valid since the distribution of spending in the sample is right skewed. Answer: False. Since n = 436, and the distribution is right skewed. The CI can be looked at.

  3. 95% of random samples have a sample mean between $80.31 and $89.11. Answer: False. Since, the Confidence Interval is not about the sample mean, we cannot say that.

  4. We are 95% confident that the average spending of all American adults is between $80.31 and $89.11. Answer: True. That is the definition of the Confidence Interval.

  5. A 90% confidence interval would be narrower than the 95% confidence interval since we don’t need to be as sure about our estimate. Answer: True. We don’t need to be that much certain on this statement. The range will also be narrower.

  6. 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. Answer: False. To calculate the standard error, we divide the standard deviation by the square root of the sample size. We would need to sample 3^2 = 9 times the number of people in the initial sample.

Margin of Error = z * standard error

If the 95% confidence intervals = (89.11 - 80.31) = 8.80

Then divide (8.80)/2 = 4.40

  1. The margin of error is 4.4. Answer: True.From the above caluclation it is correct.

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.

knitr::include_graphics("https://raw.githubusercontent.com/maharjansudhan/DATA606/master/4.24.PNG")
summary(gifted)
##      score          fatheriq        motheriq         speak   
##  Min.   :150.0   Min.   :110.0   Min.   :101.0   Min.   :10  
##  1st Qu.:155.0   1st Qu.:112.0   1st Qu.:113.8   1st Qu.:17  
##  Median :159.0   Median :115.0   Median :118.0   Median :18  
##  Mean   :159.1   Mean   :114.8   Mean   :118.2   Mean   :18  
##  3rd Qu.:162.0   3rd Qu.:116.2   3rd Qu.:122.2   3rd Qu.:20  
##  Max.   :169.0   Max.   :126.0   Max.   :131.0   Max.   :23  
##      count            read           edutv          cartoons    
##  Min.   :21.00   Min.   :1.700   Min.   :0.750   Min.   :1.750  
##  1st Qu.:28.00   1st Qu.:2.000   1st Qu.:1.750   1st Qu.:2.688  
##  Median :31.00   Median :2.200   Median :2.000   Median :3.000  
##  Mean   :30.69   Mean   :2.136   Mean   :1.958   Mean   :3.062  
##  3rd Qu.:34.25   3rd Qu.:2.300   3rd Qu.:2.250   3rd Qu.:3.500  
##  Max.   :39.00   Max.   :2.500   Max.   :3.000   Max.   :4.500
  1. Are conditions for inference satisfied? Answer: Samples selected are randomly and its size is greater than 30. The sample satisfies the basic requirements.
childgifted.n <- 36
childgifted.min <- 21
childgifted.max <- 39
childgifted.mean <- 30.69
childgifted.sd <- 4.31


# To calculate the Standard of Error.
child.SE <- childgifted.sd/sqrt(childgifted.n)
child.Z <- (childgifted.mean - 32)/(child.SE)
p.value <- pnorm(child.Z, mean=0, sd=1)*2
p.value
## [1] 0.0682026
  1. 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.

Answer: The two-tailed T test p-value is: 0.0682026 which is < 0.10, so, we reject the null hypothesis.

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

Answer: With the p value < 0.10, that means the gifted children count to 10 on average statistically faster than the normal child.

child.lowerCI90 <- childgifted.mean - 1.29 * child.SE
child.upperCI90 <- childgifted.mean + 1.29 * child.SE
child.lowerCI90
## [1] 29.76335
  1. Calculate a 90% confidence interval for the average age at which gifted children first count to 10 successfully.

Answer: The interval range lower= 29.76335, higher= 31.61665 .

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

Answer: The results from the hypothesis test and the confidence interval agree. The upper limit in the 90% confidence intervals is 31.62 and the average child who can count to 10 was 32 months with a confidence intervals of 90%.

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.

knitr::include_graphics("https://raw.githubusercontent.com/maharjansudhan/DATA606/master/4.26.PNG")
  1. 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.

Answer: The null hypothesis: average of IQ mothers of gifted children = average IQ of the population at large. The alternate hypothesis: average of IQ mothers of gifted children != average IQ of the population at large.

n <- 36
giftedchild.min <- 101
giftedchild.max <- 131
giftedchild.mean <- 118.2
giftedchild.sd <- 6.5


giftedchild.SE <- (giftedchild.sd)/sqrt(n)
giftedchild.Z <- (giftedchild.mean - 100)/(giftedchild.SE)

giftedchild.Z
## [1] 16.8
giftedchild.twotailP <- (1 - pnorm(giftedchild.Z, mean = 0, sd = 1)) * 2
giftedchild.twotailP
## [1] 0
  1. Calculate a 90% confidence interval for the average IQ of mothers of gifted children.

Answer: To make a 90% confidence interval, Z should equal 1.29

CI.upper90 <- giftedchild.mean + 1.29 * giftedchild.SE
CI.lower90 <- giftedchild.mean - 1.29 * giftedchild.SE

paste("Lower 90% CI = ", CI.lower90)
## [1] "Lower 90% CI =  116.8025"
paste("Upper 90% CI = ", CI.upper90)
## [1] "Upper 90% CI =  119.5975"
  1. Do your results from the hypothesis test and the confidence interval agree? Explain.

Answer: According to the result, the hypothesis test and the confidence interval agrees. Mean for gifted child and motheriq is 118.2

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.

Answer: The sampling distribution of the mean is the distribution of randomly selected samples of a population. Typically, the shape is unimodal with no skew. When N of samples increases, the distribution appears more normal. The larger the N, the smaller the spread or variance.

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

Answer:

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

Answer:

fbulb.mean <- 9000
fbulb.sd <- 1000
life <- pnorm(10500, mean = fbulb.mean, sd = fbulb.sd, lower.tail = FALSE)
round(life, digit = 2) * 100
## [1] 7
  1. Describe the distribution of the mean lifespan of 15 light bulbs.

Answer:

fifteen.bulb <- rnorm(15, mean = fbulb.mean, sd = fbulb.sd)
mean(fifteen.bulb)
## [1] 8828.357
  1. What is the probability that the mean lifespan of 15 randomly chosen light bulbs is more than 10,500 hours?

Answer:

n <- 15 
pnorm(10500, fbulb.mean, fbulb.sd/sqrt(n), lower.tail = FALSE)
## [1] 3.133452e-09
  1. Sketch the two distributions (population and sampling) on the same scale. Answer:
se <- fbulb.sd/sqrt(n)
Nsample <- seq(fbulb.mean - (4 * fbulb.sd), fbulb.mean + (4 * fbulb.sd), length=15)
Rsample <- seq(fbulb.mean - (4 * se), fbulb.mean + (4 * se), length=15)
norm1 <- dnorm(Nsample,fbulb.mean,fbulb.sd)
norm2 <- dnorm(Rsample,fbulb.mean,se)

plot(Nsample, norm1, type="l",col="blue",
     main="Two distributions on same scale",
     xlab="Population vs Sample",
     ylim = c(0, 0.003)) 
     
lines(Rsample, norm2, col="green")

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

Answer: It is not possible because the sample size is very small.