プロが教えるわが家の防犯対策術!

検定についての問題で解答が合わないため質問です。
検定統計量tを求める問題で写真のヒント通りに計算した結果、tは-4.06225になり、それが合っているかをRで試した結果、-4.0621と少し誤差が生じてしまいます。何処かで計算の見落としをしているのですかね?
統計に詳しい方、是非教えて下さい。

「検定についての問題で解答が合わないため質」の質問画像

A 回答 (1件)

他で回答が出ていますが、丸めの誤差かと思います。



> x <- c(0.7,-1.6,-0.2,-1.2,-0.1, 3.4, 3.7, 0.8, 0.0, 2.0)
> y <- c(1.9, 0.8, 1.1, 0.1,-0.1, 4.4, 5.5, 1.6, 4.6, 3.4)
>
> t.test(x, y, paired = TRUE)

Paired t-test

data: x and y
t = -4.0621, df = 9, p-value = 0.002833
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-2.4598858 -0.7001142
sample estimates:
mean of the differences
-1.58

>
> z <- x - y
>
> t.test(z)

One Sample t-test

data: z
t = -4.0621, df = 9, p-value = 0.002833
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
-2.4598858 -0.7001142
sample estimates:
mean of x
-1.58

>
> mean(z) / sqrt(var(z) / 10)
[1] -4.062128
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!