1.5 P-value

The p-value is the probability of obtaining a result at least as extreme as the observed result of a statistical hypothesis test, assuming that the null hypothesis is true. For example in the following t-test, the p-value means that only 3 out of 10,000 t-tests would provide a value of t bigger in magnitude than 4.1061 if the null hypothesis were accurate. The p-value represents all the area in the tails of the distribution, beyond the observed t-value.

t.test(mpg ~ am, data = mtcars, var.equal = TRUE)
## 
##  Two Sample t-test
## 
## data:  mpg by am
## t = -4.1061, df = 30, p-value = 0.000285
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -10.84837  -3.64151
## sample estimates:
## mean in group 0 mean in group 1 
##        17.14737        24.39231

T distribution