March 2019
Beginner to intermediate
448 pages
13h 14m
English
In the following example, we will load performance indexes from 80 employees (before and after a new bonus scheme was announced). We want to test whether the bonus has produced an improvement in performance. In this case, the null hypothesis will be that the performance change is smaller than zero or equal to zero, versus greater than zero:
data = read.csv("./paired_scores.csv")
t.test(data$post_bonus,data$pre_bonus,conf.level = .95,alternative="greater",paired=TRUE)
The preceding code generates the following output:

Read now
Unlock full access