Q:5.6, 5.14, 5.20, 5.32, 5.48

Q5.6

#population distribution is approximately normal and unknown sd and n<30 -> t test
n<-25
df <- n-1
p<-0.05 # two-tails of 90% ci
t<-1.71

# u -/+ t*s/sqrt(n)=[65,77]
u<-(65+77)/2
u
## [1] 71
s<- 0.5*(77-65)*sqrt(n)/t
s
## [1] 17.54386
ME <-t*s/sqrt(n)
ME
## [1] 6

Q5.14 a.

#population distribution is approximately normal and unknown sd and n<30 -> t test
sd<-250
ME <-25
t<-1.71
n <- ((t*sd)/ME)*((t*sd)/ME)
n
## [1] 292.41
  1. Answer: The sample size will be larger for 99% ci since the t value incresed.

#population distribution is approximately normal and unknown sd and n<30 -> t test
sd<-250
ME <-25
t<-2.59
n <- ((t*sd)/ME)*((t*sd)/ME)
n
## [1] 670.81

Q5.20 a. Answer: Yes. b. Answer: Yes. c. Yes, use t test for approsimate nomal distribution with unknow sd. h0: diff=0, Ha: dff !=0. d. To find result, 95% ci for t value, mean difference of two scores, sd and n. e. t=+/-1.97 for 95% ci with df 199. t value in the test is -0.867274 which in the ci and fail to reject H0.

t= (-0.545)/(8.887/sqrt(200))
df<-200-1
t
## [1] -0.867274
  1. Type II error: fail to reject not true.
  2. Yes, since we failed to reject H).

Q.5.32

Answer: p-value is close to 0, reject H0, which there is differece gas usage between automatic and manual.

#H0: diff=0 , H1: diff !=0
t= (16.12-19.85)/ sqrt(3.58*3.58/26 +4.51*4.51/26)
df<-200-1
t
## [1] -3.30302

Q5.48 a. Answer:H0: diff=0, H1 !=0

  1. Answer: 1. indepent of data, 2.Approximate normal with sample size greater than 30, 3.constant variance (13.5,18.5).

c.Answer: degree dfg SSG 501.54 MSG/MSE 0.0682 Residuals dfe 267382 MSE Total 1171 269388.16

dfg = k-1 = 5-1 =4 dfe = n-k= 1172-5=1167 SSG = MSG * dfg = 501.54 * 4 = 2006.16 MSE = SSE/dfe = 267382/1167 = 229.1191 F = MSG/MSE = 2.189

  1. Answer: Since p-value is 0.0682 which greater than 0.05, we failed to reject H0. then averge of working hours are same.