YouTip LogoYouTip

R Func T Test

# Perform t-test result <- t.test(method_a, method_b) print(result)

Executing the above code outputs the following result:

Welch Two Sample t-test

data:  method_a and method_b
t = 4.4029, df = 17.764, p-value = 0.0003513
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
  4.640839 13.159161
sample estimates:
mean of x mean of y 
     84.0      75.1

From the results, we can see that the p-value is far less than 0.05, indicating that there is a significant difference in the scores between the two teaching methods.

Image 4: R Language Examples R Language Examples

← R Func TapplyR Func Sum β†’