Sample Mean
xbar <- ((77+65)/2)
xbar
## [1] 71
The sample mean is equal to ((x1+x2)/2) when the Confidence Interval is (x1,x2), so the sample mean is 71.
Margin of Error
ME <- ((77-65)/2)
ME
## [1] 6
The margin of error is equal to ((x2-x1)/2) when the Confidence Interval is (x1,x2) so the margin of error is 6.
Sample Standard Deviation
df <- 25 - 1
p <- 0.9
p_2tails <- p + (1 - p)/2
p_2tails
## [1] 0.95
t.value <- qt(p_2tails, df)
t.value
## [1] 1.710882
sd <- (ME/t.value)*5
sd
## [1] 17.53481
To get the standard deviation of the sample we first find the two tail probability. Then we use the qt( ) function along with the probability and degrees of freedom (24) to get our T-value. Then we can divide margin of error by that t-value * 5 to get our standard deviation of 17.53.
Ho <= 35 ug/l
Ha > 35 ug/l
Random: It does not say whether or not the officers were randomly sampled
Normal: The sample distribution appears to be normal but still need more data to find out.
Independent: Sample size seems big enough at 52
Ho <= 35 ug/l
Ha > 35 ug/l
n <- 52
x1 <- 35
x2 <- 124.32
SD2 <- 37.74
t_score <- ((x2-x1)/(37.4/sqrt(52)))
t_score
## [1] 17.22181
Here we have a very large t-score and a very small p-value. This gives us enough evidence to reject the null hypothesis that the lead concentration of the officers constantly exposed to exhaust is less than or equal to the mean in the previous sample of 35.
No. The p-value is too small still to be greater than .005. The average concentration level of 35 would still not be within the interval.
Paired
Paired
Not paired
False. You do not ALWAYS use a paired test in these situations. There must be a natural correspondence between the observations in one set to an observation in the other set, in order to use a paired test.
df <- 22
p <- 0.95
p_2tails <- p + (1 - p)/2
p_2tails
## [1] 0.975
t <- qt(p_2tails, df)
t
## [1] 2.073873
When using the qt( ) function we get a t-score of 2.07. And from Exercise 3.28 the SE = 4.3619.
Therefore the confidence interval is:
2.3 +/- 2.07 x 4.3619 = 12.3 +/- 9.03 =
(3.27, 21.33).
Ho: = 6.1
Ha <> 6.1
n <- 22
x1 <- 6.1
x2 <- 4.9
SD2 <- 1.8
t_score <- t_score <- ((x2-x1)/(1.8/sqrt(22)))
t_score
## [1] -3.126944
The t-score is just large enough >3 to reject the null hypothesis that the results of the treatment group were different than the control group.
Ho: b1=b2=b3=b4=b5
Ha: at least one variables mean is not equal
Independent: There seems to be independence across the groups
Normal: It seems like the distributions are close enough to normal
Variability: There seems to be equal variability across the groups
Dfd = 4 DfR = 1167 DfT = 1171
SumSqd = 2004.11 SumSqT = 269,387.11
MeanSqR = 229.11
F-Value = 2.19
The p-value of .0682 is larger than the critical value of .05. Therefore, we do not reject the null, i.e there is not enough evidence to say there is a significant difference between the groups.