ahl— title: “STAT 516 hw 1” author: “David Burgess” format: pdf # format: html —
# Ch 4 Ex 8
t.test(Blood_Pressure, mu=129, alternative = "greater")
Since p=.1708 which is greater than 0.01,
we fail to reject the null hypothesis. We don't have enough evidence to say the blood pressure of a normal male exceeds 129.
# Ch 4 Ex 19
ahl<-c(2.50, 2.20, 1.60, 1.30, 1.20, 1.60, 2.20, 2.20, 2.60, 1.00, 1.50, 3.15, 1.44, 1.26, 1.98, 1.98, 1.87, 2.31, 1.40, 2.48, 2.80, 0.69)
alpha<-0.05
n<-length(ahl)
lo<-mean(Ahl)-qt(1-alpha/2,n-1)*sd(Ahl)/sqrt(n)
up<-mean(ahl)+qt(1-alpha/2,n-1)*sd(ahl)/sqrt(n)
95% CI: (1.596, 2.154)
We are 95% confident that the true mean half-life of Amikacin is inbetween 1.596 and 2.154
# Ch 4 Ex 20
ahl<-c(2.50, 2.20, 1.60, 1.30, 1.20, 1.60, 2.20, 2.20, 2.60, 1.00, 1.50, 3.15, 1.44, 1.26, 1.98, 1.98, 1.87, 2.31, 1.40, 2.48, 2.80, 0.69)
alpha1<-.10
n<-length(ahl)
chiup<- (n-1)*var(ahl)/qchisq(1-alpha1/2, n-1)
chiup1<-(n-1)*var(ahl)/qchisq(alpha1/2, n-1)
90% CI: (.255, .719)
We are 90% confidence that the true variance of the half life of Amikacin is inbetween .255 and .719).
Kwh= 2.0010*(Tavg)-97.9239
beta_0= -97.9239
beta_1= 2.0010
With the p value being close to 0 and less than 0.05, we can reject the null hypothesis (Beta_1=0). We can conclude that there is evidence of a linear relationship between Kwh and Tavg. ```
::: {.cell}
```{.r .cell-code}
plot(lm1, which=1)
:::
No clear pattern made in residuals v. Fitted plot.