Inference for Numerical Data in R
Mine Cetinkaya-Rundel
Associate Professor of the Practice, Duke University
Let's revisit the High School and Beyond survey data.
Do the data provide convincing evidence of a difference between the average reading and writing scores of students? Use a 5% significance level.
$H_0: \mu_{diff} = 0$, There is no difference between the average reading and writing scores.
$H_A: \mu_{diff} \ne 0$, There is a difference between the average reading and writing scores.
t.test(hsb2$diff, null = 0, alternative = "two.sided")
t.test(hsb2$diff, null = 0, alternative = "two.sided")
One Sample t-test
data: hsb2$diff
t = -0.86731, df = 199, p-value = 0.3868
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
-1.7841424 0.6941424
sample estimates:
mean of x
-0.545
Inference for Numerical Data in R