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.
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
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
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
Answer :
It might be slightly different but I will not expect it to be too off.
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.
Answer :
True see below the mean
sample_mean<-mean(tgSpending$spending)
sample_mean
## [1] 84.70677
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.
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
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
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
Answer :
False it will cut it by half.
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.
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
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
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 %
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
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.
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
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
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.
Answer :
TotalHoursLast<-10500
Mean<-9000
Standard_Deviation<-1000
probability =1-pnorm(TotalHoursLast,Mean,Standard_Deviation)
probability
## [1] 0.0668072
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
Answer :
ZValue=10500−9000258.1989
probability<-1-pnorm(5.81)
probability
## [1] 3.123642e-09
The Probability Seems to be 0
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))
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.