sa_mean <- ((77+65)/2)
sa_mean
## [1] 71
moe1 <- ((77-65)/2)
moe1
## [1] 6
standard devation =17.53481
tvalue<- qt(.95,(25-1))
sd<- (moe1/tvalue)*5
sd
## [1] 17.53481
moe <- 25
sd <- 250
z <- qnorm(0.95)
n <- ((z * sd)/ moe)^2
n
## [1] 270.5543
Luke’s sample size should be larger, since it has a larger z score.
the miimum is 666.
moe = 25
sd = 250
z = 2.58
n = ((sd*z)/moe)^2
n
## [1] 665.64
No, there is no clear difference.
Yes, they are.
Ho: there are no differece between the average score in reading and writing. Ha: there are difference betwwen the average score in reading and writing.
It is independent and normal distribution, sample size is less than 10%.
since the p value is more than 0.05, we can not reject the null hypothesis.
mean_diff <- -0.545
sd <- 8.887
n <- 200
se <- sd / sqrt(n)
t <- (mean_diff - 0)/ se
p <- pt(t, n-1)
p
## [1] 0.1934182
type 2
Yes, since the HO hypothesis we fail to reject.
Ho: there is no difference between automatic and manual car Ha: there is difference between automatic and manual car
We can reject the Ho hyothesis, since the p value is less than 0.05.
n <- 26
mean_diff <- 16.12 - 19.85
se_diff <- sqrt((3.58^2/n)+(4.51^2/n))
t1 <- (mean_diff - 0)/ se_diff
P <- pt(t1, n-1)
P
## [1] 0.001441807
Ho: Average number of hours worked among all five groups are equal.
Ha: Avergae number of hours worked among all five groups are not equal.
The observations are independent and approximately normal.
| Df | Sum Sq | Mean Sq | F value | Pr (>F) | |
|---|---|---|---|---|---|
| degree | 4 | 2004.1 | 501.54 | 2.186745 | 0.0682 |
| Residuals | 1167 | 267382 | 229.12 | ||
| Total | 1171 | 269386.1 |
since the p value = 0.0682, which is greater than 0.05, w fail to reject the HO hypothesis.