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.

  1. What is the point estimate for the average height of active individuals? What about the median?

Answer :

The point estimate is 171.143787
The mean is the point estimate of the average height of active individuals.
The median is 170.3
  1. What is the point estimate for the standard deviation of the heights of active individuals? What about the IQR?

Answer :

        The sd(bdims$hgt) is = 9.4072052 will be the point of estimate for standard deviation, the IQR is calculated by looking at Q3-Q1 we will use the summary function below and get those values
        
summary(bdims$hgt)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   147.2   163.8   170.3   171.1   177.8   198.1
Q3<- 177.8
Q1<- 163.8

IQR<-Q3-Q1
IQR
## [1] 14
  1. 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

 I don't believe the person who is 180 cm is unusually tall as he is within 1 standard deviation from mean. However , the person who is 155 cm is unusually small as he is more than 1.5  standard deviation from the mean
  1. 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 :

It might be slightly different but I will not expect it to be too off.
  1. 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.

Answer :

std_error<- sd(bdims$hgt)/sqrt(507)

std_error
## [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.

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

Answer :

True see below the mean 
sample_mean<-mean(tgSpending$spending)
sample_mean
## [1] 84.70677
  1. This confidence interval is not valid since the distribution of spending in the sample is right skewed.

Answer :

False because this is just one sample if we did many samples and looked at the sample distribution of those samples we will get a normal distrubution and secondly the confidence interval uses the rule of n*p>10 and n*(1-p)>10 and that the observations must be independant and both of these conditions are satisfied.
  1. 95% of random samples have a sample mean between $80.31 and $89.11.

Answer :

 TRUE that is the 95% Confidence Interval and it means that most of the random samples will have a sample mean between 80.31 and 89.11
  1. We are 95% confident that the average spending of all American adults is between $80.31 and $89.11.

Answer :

True that is the 95% Confidence Iterval so we are 95% confident that the average is in between that interval. We will calculate below to verify
se <- sd(tgSpending$spending) / sqrt(436)
lower <- sample_mean - 1.96 * se
upper <- sample_mean + 1.96 * se
c(lower, upper)
## [1] 80.30173 89.11180
  1. 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 but we should be able to verify that by taking the 90% interval using the critical value of 90%
    se <- sd(tgSpending$spending) / sqrt(436)
lower <- sample_mean - 1.645 * se
upper <- sample_mean + 1.645 * se
c(lower, upper)
## [1] 81.00968 88.40385
  1. 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 it will cut it by half.
  1. The margin of error is 4.4.

Answer :

True see below
1.96*se
## [1] 4.405038

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.

  1. Are conditions for inference satisfied?

Answer :

Yes they are satisfied because the sample is a random sample. Also the sample size is greater than 30 and the observations are indepnedant.
sample_mean<-mean(gifted$count)

N_P=nrow(gifted)*sample_mean
N_P
## [1] 1105
nrow(gifted)
## [1] 36
  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 :

sample_mean
## [1] 30.69444
sample_sd<-sd(gifted$count)

standard_error<-sample_sd/sqrt(nrow(gifted))

standard_error
## [1] 0.7191479
 mu<-32
 
 zscore<-(mu-sample_mean)/standard_error
 
 zscore
## [1] 1.81542
 p <- 1-pnorm(32,mean = sample_mean, sd=standard_error)
p
## [1] 0.03472969
p*nrow(gifted)
## [1] 1.250269

Answer :

No since the p value is below .10
  1. Interpret the p-value in context of the hypothesis test and the data.

Answer :

The p value in this context is the probability that the gifted students will learn to count by the age of 32 months which is 3.472969 %
  1. Calculate a 90% confidence interval for the average age at which gifted children first count to 10 successfully.

Answer :

See the calculation for the 95% Confidence Interval below.
se <- sample_sd / nrow(gifted)
lower <- sample_mean - 1.96 * se
upper <- sample_mean + 1.96 * se
c(lower, upper)
## [1] 30.45952 30.92937
  1. Do your results from the hypothesis test and the confidence interval agree? Explain.

Answer :

 Yes the results from the hypothesis and the Confidence Interval do agree as there is 3.48 % chance of gifted children being able to count by 32 months and the sample mean we calculated lies between the 95% confidence interval.

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.

  1. Performahypothesistesttoevaluateifthesedataprovideconvincingevidencethattheaverage 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.

Answer :

mean_mothers_IQ<-mean(gifted$motheriq)

sd_mothers_IQ<- sd(gifted$motheriq)

standard_error_mothersIQ<-sd_mothers_IQ/sqrt(nrow(gifted))

mean_mothers_IQ
## [1] 118.1667
sd_mothers_IQ
## [1] 6.504943
standard_error_mothersIQ
## [1] 1.084157
 p <- 1-pnorm(nrow(gifted),mean = mean_mothers_IQ, sd=standard_error_mothersIQ)
p
## [1] 1
We can see from the calculation above that the average Mother's IQ is different than the rest of the population because it is > 100 and it is = 118.1666667
  1. Calculate a 90% confidence interval for the average IQ of mothers of gifted children.

Answer :

See Calculation below
lower <- mean_mothers_IQ - 1.96 * standard_error_mothersIQ
upper <- mean_mothers_IQ + 1.96 * standard_error_mothersIQ
c(lower, upper)
## [1] 116.0417 120.2916
  1. Do your results from the hypothesis test and the confidence interval agree? Explain.

Answer :

Yes P value is 1 which means it is greater than .1 so our hypothesis holds true and also the mean of the Mother's IQ does fall within the 95% confidence interval calculated above.

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 all the samples taken of the population with the n number of samples . The distribution is normal with the mean same as the mean of the population mean . Also the as the sample size increases the distribution becomes more closer to the normal distribution the mean remains the same and the spread 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.

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

Answer :

TotalHoursLast<-10500
Mean<-9000
Standard_Deviation<-1000
probability =1-pnorm(TotalHoursLast,Mean,Standard_Deviation)

probability
## [1] 0.0668072
  1. Describe the distribution of the mean lifespan of 15 light bulbs.

Answer :

standard_error<- Standard_Deviation/sqrt(15)

lower <- Mean - 1.96 * standard_error
upper <- Mean + 1.96 * standard_error
c(lower, upper)
## [1] 8493.93 9506.07
  1. What is the probability that the mean lifespan of 15 randomly chosen light bulbs is more than 10,500 hours?

Answer :

ZValue=10500−9000258.1989

probability<-1-pnorm(5.81) 

probability
## [1] 3.123642e-09

The Probability Seems to be 0

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

Answer :

population_mean=9000; population_sd=1000

Population_X <- seq(-4,4,length=100)*population_sd + population_mean
Population_H <- dnorm(Population_X,population_mean,population_sd)

sample_mean=9000; sample_sd=258
Sample_X <- seq(-4,4,length=100)*sample_sd + sample_mean
Sample_H <- dnorm(Sample_X,sample_mean,sample_sd)


PlotData = as.data.table(cbind(Population_X,Population_H,Sample_X,Sample_H))


ggplot(data=PlotData, aes(Population_X,Population_H)) + geom_line() +
geom_line(data=PlotData, aes(Sample_X,Sample_H)) 

  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 easy to estimate the porobabilities in skewed 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.

Answer :

It will decrease as the because the sample size got smaller which will make the SE size smaller and give less value to the P Value.