Chapter 5 Homework 5.32, 5.48

5.6

n <- 25
df <- (n-1)
ME <- ((77-65)/2)
tval <- qt(.95, df)
tval
## [1] 1.710882
sampmean <- ((77+65)/2)
sampmean
## [1] 71
sd<- (ME/tval)*5
sd
## [1] 17.53481

5.14

sd1 <- 250
ME <- 25
z <- 1.65
sampsize <- ((z*sd1)/(ME))^2
sampsize
## [1] 272.25

b.Larger! c.

z1 <- 2.58
sampsize2 <- ((z1*sd1)/ME)^2
sampsize2
## [1] 665.64

5.20

samp <- 200

a.Based on the box plot, you cannot tell that there is a clear difference between the reading and writing score b. We would assume that the scores are independant c. H0: There is no difference in the average scores in reading and writing. HA: There is a difference in average scores. d. conditions required: The observations are based on a simple, random sample. The sample size is greater than 30. We assume that 200 is less than 10% of student population. The events seem to be independant. There is no strong skew in the data. e.

dif <- -.545
df <- samp - 1
sd <- 8.887
SE <- sd/sqrt(samp)
t <- (dif-0)/SE
pval <- pt(t, df)
pval
## [1] 0.1934182
  1. Since we did not reject the null hypothesis, we may run into a type II error.
  2. We have failed to reject the null hypothesis of 0, so we would expect the interval to include 0

5.32

automean <- 16.12
autosd <- 3.58
auton <- 26
manmean <- 19.85
mansd <- 4.51
mann <- 26
df <- 26-1

H0: the mean of the automatic and the mean of manuel are not different HA: the mean of the automatic and the mean of manuel are different

meandiff <- automean - manmean
SEauto <- autosd/sqrt(auton)
SEman <- mansd/sqrt(mann)
SE <- sqrt((SEauto^2)+(SEman^2))
t <- (meandiff-0)/SE
pval <- pt(t, df)
pval <- 2*pval
pval
## [1] 0.002883615

5.48 a. H0: All hours are the same across the five groups HA: There is one value that is different across all five groups b. The survey is random. The sample size is less than 10% of the population. We assume that the events are independant across all groups. The distribution looks normal and variability appears to be about equal. c.

n <- 1172
g <- 5
meansqd <- 501.54
sumsqR <- 267382
p <- .06812

df1 <- g-1
df2 <- n-g
df3 <- df1 + df2
c(df1, df2, df3)
## [1]    4 1167 1171
sumsq1 <- df1 * meansqd
sumsq2 <- sumsqR + sumsq1
c(sumsq1, sumsq2)
## [1]   2006.16 269388.16
meanR <- sumsqR/df2
meanR
## [1] 229.1191
fval <- meansqd/meanR
fval
## [1] 2.188992