用 t 检验检验均值

R 中的数值数据推断

Mine Cetinkaya-Rundel

Associate Professor of the Practice, Duke University

假设

回顾 High School and Beyond 调查数据。

数据是否能有力证明学生阅读与写作平均分存在差异?使用 5% 显著性水平。

$H_0: \mu_{diff} = 0$,阅读与写作平均分无差异。

$H_A: \mu_{diff} \ne 0$,阅读与写作平均分有差异。

R 中的数值数据推断

用 t 检验检验均值

t.test(hsb2$diff, null = 0, alternative = "two.sided")
R 中的数值数据推断

用 t 检验检验均值

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 
R 中的数值数据推断

让我们练习吧!

R 中的数值数据推断

Preparing Video For Download...