บทที่ 9

Chi square

ทดสอบความเป็นอิสระต่อกันของ Row และ Column 2x2 table (Crosstabs) ตัวแปรเป๊นตัวเลขจำนวนเต็ม ได้จากการนับ
  Disease + Disease -       
Exposure + ab R1
Exposure - c dR2
  C1 C2 n

a+b=R1
c+d=R2
a+c=C1
b+d=C2
a+b+c+d=n

  Disease + Disease -
Exposure +600 400
Exposure - 400 600

Ho : Exposure และ Disease เป็นอิสระต่อกัน
Ha : Exposure และ Disease ไม่เป็นอิสระต่อกัน

ที่ df=1 a=0.05 Chi square= 3.84
Chi square=80 มากกว่า 3.84 จึงปฏิเสธ Ho ยอมรับ Ha
(P value น้อยกว่า 0.05 จึงปฏิเสธ Ho ยอมรับ Ha)

ถ้า n< 200 ใช้ Yates’ corrected
ถ้า Cell มีค่าน้อยกว่า 5 เกิน 20% ของ Cellทั้งหมด ใช้ Fisher’s exact test