R/BSDA-package.R
Oxytocin.Rd
Data for Exercise 7.86
Oxytocin
A data frame/tibble with 11 observations on three variables
a numeric vector indicating each subject
mean arterial blood pressure of subject before receiving oxytocin
mean arterial blood pressure of subject after receiving oxytocin
Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.
diff = Oxytocin$after - Oxytocin$before
qqnorm(diff)
qqline(diff)
shapiro.test(diff)
#>
#> Shapiro-Wilk normality test
#>
#> data: diff
#> W = 0.94464, p-value = 0.5765
#>
t.test(diff)
#>
#> One Sample t-test
#>
#> data: diff
#> t = -8.506, df = 10, p-value = 6.854e-06
#> alternative hypothesis: true mean is not equal to 0
#> 95 percent confidence interval:
#> -57.01717 -33.34646
#> sample estimates:
#> mean of x
#> -45.18182
#>
rm(diff)