การอนุมานสำหรับข้อมูลเชิงตัวเลขใน 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$ มีความแตกต่างระหว่างคะแนนการอ่านและการเขียนโดยเฉลี่ย
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
การอนุมานสำหรับข้อมูลเชิงตัวเลขใน R