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.
knitr::include_graphics('https://raw.githubusercontent.com/henryvalentine/MSDS2019/master/Classes/DATA%20606/Home%20works/img1.png')
Answer:
Answer:
Answer:
Answer:
Answer:
\[SE_{\bar{x}} = \frac{s}{\sqrt{n}}\]
se <- (9.4/sqrt(507))
paste0('The standard error is: ', round(se, 2), sep='')
## [1] "The standard error is: 0.42"
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.
knitr::include_graphics('https://raw.githubusercontent.com/henryvalentine/MSDS2019/master/Classes/DATA%20606/Home%20works/img2.png')
Answer:
Answer:
We know that \[SE_{\bar{x}} = \frac{s}{\sqrt{n}}\]
Therefore, to reduce SE by 1/3rd => We know that \[SE_{\bar{x}} = \frac{s}{\sqrt{n}} * \frac{1}{3} = \frac{s}{3\sqrt{n}} = \frac{s}{\sqrt{3^{2}{n}}} = \frac{s}{\sqrt{9{n}}}\]
z = 1.96
n = 436
m = 84.71
#sd is not given
\[SE_{\bar{x}} = \frac{s}{\sqrt{n}}\]
upperbound <- 89.11
lowerbound <- 80.31
ME <- (upperbound - lowerbound)/2
ME
## [1] 4.4
The above statement is TRUE
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/henryvalentine/MSDS2019/master/Classes/DATA%20606/Home%20works/img3.png')
Answer:
Answer:
n = 36
x <- 32
mean = 30.69
sd = 4.31
se <- sd / sqrt(n)
z = (mean - x) / se
sigLevel <- 0.10
pnorm(z, mean = 0, sd = 1) * 2
## [1] 0.0682026
Null hypothesis (H0): The average development for a child is μ = 32 months.
Alternate hypothesis (HA): The average development for a child is μ ≠ 32 months.
Since the the p-value (0.0682026) is not equal to the significance level, we reject the Null hypothesis (H0).
lowerbound <- round(mean - 1.64 * se,2)
upperbound <- round(mean + 1.64 * se,2)
c(lowerbound,upperbound)
## [1] 29.51 31.87
Answer:
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/henryvalentine/MSDS2019/master/Classes/DATA%20606/Home%20works/img4.png')
x <- 100
n <- 36
min <- 101
sd <- 6.5
mean <- 118.2
max <- 131
Slevel <- 0.10
SE <- sd/sqrt(n)
Z <- (118.2 - x)/SE
p <- (1 - pnorm(Z, mean = 0, sd = 1)) * 2
paste0('P-Value is: ', p, sep='')
## [1] "P-Value is: 0"
paste0('Standard Error is: ', SE, sep='')
## [1] "Standard Error is: 1.08333333333333"
Null hypothesis (H0): The average IQ of the of mothers of gifted children = average IQ of the population (100)
Alternate hypothesis (HA): The average IQ of the of mothers gifted children ≠ population’s IQ average.
lower <- round(mean - (1.645 * SE),2)
upper <- round(mean + (1.645 * SE),2)
c(lower, upper)
## [1] 116.42 119.98
The results agree with each each other because these hypothesis test proves that population mean is not equal to 100 and there is a 90% chance that population mean lies within (98.21792,101.7821).
They don’t contradict each other as hypothesis test proves that population mean is not equal to 100 and it’s with 90% likelihood that population mean lies within (116.42, 119.98).
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:
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.
mn <- 9000
sd <- 1000
x <- 10500
p <- round(1 - pnorm(x, mn, sd),4)
paste0('Probability that a randomly selected bulb lasts more than 10, 500 hours is: ', p*100, '%', sep='')
## [1] "Probability that a randomly selected bulb lasts more than 10, 500 hours is: 6.68%"
n <- 15
blb <- rnorm(n = n, mean=mn, sd = sd)
mn15 <- mean(blb)
sd15 <- sd(blb)
hist(blb, probability = TRUE)
x <- 0:12000
y <- dnorm(x = x, mean = mn, sd = sd) # For the original values
y15 <- dnorm(x = x, mean = mn15, sd = sd15) # For the 15 bulbs
lines(x = x, y = y15, col = "steelblue") # For the 15 bulbs
abline(v=mn15,col="steelblue") # For the 15 bulbs
lines(x = x, y = y, col = "green") # For the original values
abline(v=mn,col="green") # For the original values
qqnorm(blb)
qqline(blb, col = 3)
n <- 15
x <- 10500
mn <- 9000
sd <- 1000
SE <- sd/sqrt(n)
p <- round((1 - pnorm(x, mean = mn, sd = SE)) * 100,4)
paste0('The probability of this happeneing is: ', p, sep='')
## [1] "The probability of this happeneing is: 0"
Let’s build the sample using upper and lower interval using 4 standard deviations
samp <- seq(9000 - (4 * 1000), 9000 + (4 * 1000), length=15)
population<- seq(9000 - (4 * SE), 9000 + (4 * se), length=15)
#normal distribution
normSamp <- dnorm(samp,9000,1000)
normPop<- dnorm(population,9000,SE)
plot(samp, normSamp, type="l",col="red",
xlab="Population and Sampling",main="Distribution of the fluorescent light bulbs", ylim=c(0,0.002))
lines(population, normPop, col="green")
Answer:
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: