`R/BSDA-package.R`

`Stress.Rd`

Data for Example 7.20

`Stress`

A data frame/tibble with 12 observations on two variables

- prestress
short term memory score before being exposed to a stressful situation

- poststress
short term memory score after being exposed to a stressful situation

Kitchens, L. J. (2003) *Basic Statistics and Data Analysis*.
Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

```
diff <- Stress$prestress - Stress$poststress
qqnorm(diff)
qqline(diff)
t.test(diff)
#>
#> One Sample t-test
#>
#> data: diff
#> t = 2.6018, df = 11, p-value = 0.02462
#> alternative hypothesis: true mean is not equal to 0
#> 95 percent confidence interval:
#> 0.2053928 2.4612738
#> sample estimates:
#> mean of x
#> 1.333333
#>
t.test(Stress$prestress, Stress$poststress, paired = TRUE)
#>
#> Paired t-test
#>
#> data: Stress$prestress and Stress$poststress
#> t = 2.6018, df = 11, p-value = 0.02462
#> alternative hypothesis: true difference in means is not equal to 0
#> 95 percent confidence interval:
#> 0.2053928 2.4612738
#> sample estimates:
#> mean of the differences
#> 1.333333
#>
if (FALSE) {
wilcox.test(Stress$prestress, Stress$poststress, paired = TRUE)
}
```