## Examples of using R to find exact P-values for t-tests: # Example 1, Section 10.8 notes: # Alternative is lower-tail; test statistic was t = -1.94, df = 11 # P-value is area to the left of -1.94 in the t(11) distribution: pt(-1.94, df=11, lower=T) # Example 2, Section 10.8 notes: # Alternative is two-tail; test statistic was t = -1.266, df = 28 # P-value is TWICE the tail area outside -1.266 in the t(28) distribution: 2 * pt(-1.266, df=28, lower=T) # This is equivalent: 2 * pt(1.266, df=28, lower=F)