卡方检验的条件.docx
- 文档编号:5866477
- 上传时间:2023-01-01
- 格式:DOCX
- 页数:33
- 大小:547.62KB
卡方检验的条件.docx
《卡方检验的条件.docx》由会员分享,可在线阅读,更多相关《卡方检验的条件.docx(33页珍藏版)》请在冰豆网上搜索。
卡方检验的条件
❖几种卡方检验的比较:
注连续性校正产检验:
仅适用于四格表资料,在n>40,所有期望频数均大于1,只有1/5单元格的期望频数大于1小于5时;
学Fisher精确概率法:
在样本含量<40或有格子的期望频数<1的列联表,应该采用该法;
O似然比5c2检验:
当n>40,最小期望频数>5时,结论与Pearson炉基本一致;
卡方检验
1.四格表的卡方检验
X2检验基本公式
v=
四格表资料x2检验专用公式
♦n240且所有T>5
[ad-bcYn
r=l
网格表资料X2检验的校正公式
♦G40也有1WTV5
、2ad-闻-g
例L某药品检验所随机抽取了574名成年人,研究某抗生素的耐药性。
其中179人未曾使用该抗生素,其耐药率为40.78%;而在395例曾用过该药的人群中,耐药率为45。
57%,结果见表1,试兑现人和上人群的耐药率是否一样?
表1某抗生素的人群耐药性情况
用药史
不敏感
敏感
合计
曾服该药
180(174o10)
215(220o90)
395
未服该药
73(78o90)
106(100.10)
179
合计
253
321
574
建立变量名:
Type
WiWh
Decimate
Label
Vai
Mi$sing
Columns
Align
gmp
Numeric
8
0
None
Nene
9
-=Right
/Scale
⑶Prr【
▼yp-q
1
Name
TypeWidth
Decinias
Label
Values
Missing
Coumns
XMig
9^p■
effect
Numeric8
Numeiic0
0
2
e,未普而药…
None
None
None
8
0
室Right
1=Right
hteme
Type
Width
Decirral:
Label
Values
Missing
Columns
Align
Measure
Plumeric
8
0
田本曾留到
None
8
Right
/Scale
effect
Numeric
8
0
口不族感]
None
8
=询M
“Scale
—
hOQ
Numeric
8
0
Nono
None
8
=Right
夕Sc#
录入数值:
lUHUritHledl[DataSet。
】
-SPSSStatiDataEditor
Qletdltyjewgla
IransformitHyzeQraphs
LSHHies
Adci-nns
y^inciow
gp
4日昌叵C—So&g?
g得盅昌范国守令、
4:
fry1215.0
grop
effect
freq
var
var
、m
var
1
0
0
73
2
0
1
106
3
1
□
1SQ
4
1
1
215|
5
6
7
8
a
加权
180
215
统计分析
StatisticsDataEditor
4ormAnalyzeGraphsUtilitiesAdd-onsWindowHelp
effet
D&scri|>tiveStatistics
Tables
RFMAnalysis
CompareMeans
GeneralLinearModel
指定横标目和纵标目
Frequencies…
Descriptives...
Explore...
Ratio...
var
注意不要选反了,选反了会有什么后果?
择分析方法:
卡方检验Chi—square
txact...
Rowta):
dgr"
IIDisplayc
Stortiotico...
Gelle...
Eottnat...
结果:
CaseProcessingSummary
Cases
Va
id
Missing
Total
N
Percent
N
Perccrt
N
Percent
grop*offoct
574
100.0%
0
.0%
574
100.0%
arop'enectcrosstabuiation
pffpet
Total
不敏感
敏感
grop丰普服药Count
73
1C6
179
ExpectedCount
78.9
1001
179.0
%withingrop
^08%
592%
1000%
%withinoffoct
28.9%
33.0%
31.2%
%ofTotal
12.7%
18.5%
31.2%
普眼约Count
180
215
395
ExpectedCount
174.1
2209
395.0
%withingrop
45.6%
54.4米
100.0%
%withineffect
711%
670%
688%
%ofTotal
31.4%
37.6%
68.8%
TotalCount
253
321
574
ErpAcredCount
2530
3210
5740
%withingrop
44.1%
65.9%
100.0%
%withineffect
100.0%
100.0%
100.0%
%orTotal
441%
559%
1000%
Chi-SquareTests
Value
df
Asymp.Sig.(2-sided)
ExactSig.(2-sided)
ExactSig(1-sided)
PearsonChi-Square
1.145a
1
.285
ContinuityCorrectionb
.959
1
.327
LikelihoodRatio
1.149
1
.284
FishersExactTest
.318
.164
Unear-by-LinearAssociation
1.143
1
.285
NofValidCases
574
a.0cells(.0%)haveexpectedcountlessthan5.Theminimumexpectedcountis78.90.
b.Computedonlyfora2x2table
表一:
总例数为574,没有数值遗漏
表二:
可观察实际频数,理论频数,各组实际频数占各行各列及总数的百分比.此例题总例数n=574240,且所有理论频数T25用基本公式或四个表专用公式计算卡方值,结果参照表三第一行。
P=0。
28520.05还不能认为两组耐药率不同。
表三:
(1)总例数n=574240,且所有理论频数T25用基本公式或四格表专用公式计算卡方值,结果参照表第一行。
(2)如果n240但有1VTV5用校正公式计算卡方值或用Fisher确切概率法直接计算概率,结果分别参照第二行和第四行。
(3)nV40或TV1时用Fisher确切概率法直接计算概率,结果参照
第四行。
2.配对四格表的卡方检验
"o"h9C来自同一个实验总体,b,(•来自不同的实验总体sa=0.05o
2
当〃+cN40H寸,/2=_£1—,丫=1
5+c
〃十cv4O时,需作旌续性校正,彳2=(步4
btc
例5,有28份咽喉涂片标本,把每份标本一分为二,分别接种在甲、乙两种白喉杆菌培养基上,观察白喉杆菌生长的情况,其结果如表5,问两种培养基的阳性检出率是否相等?
表5两种白喉杆菌培养基培养结果比较
甲培养基一
乙培养基
+——
合计
+
11
1
12
9
7
16
合计
20
8
28
建立变量名:
Nam。
Typo
Width
Decimate
VabwGMissing
Columns
"gn
a
Numeric
8
0
{0.一性)None
8
三Right
“Scale
b
Numeric
a
0
|]阴性|」…None
8
=Right
夕Scale
freq
Numeric
8
0
NoneNone
8
=Right
夕Scde
录入数值:
W
b
freq
var
1
1
11
0
1
9
1
0
1
0
0
7
统计分析:
123Frequencies...
■匕Descriptives...
《Explore...
国Crosstabs...
码Ratio...
囹P-PPlots...
囹Q-QPlots...
AnalyzeGraphsUtilitiesAdd-onsWindowHelp
Reports
DescriptiveStatistics
Tables
RFMAnalysis
CompareMeans
GeneralLinearModel
GeneralizedLinearModels
MixedModels
Correlate
Regression
结果:
Casos
Valid
Ml、rinci
To
m
Z
P•=•rcnt
M
pprctf^nt
IM
Perrm
akQ
28
100.0%
o
・0海
28
noo.u*
匚u”rit
to
Total
皿生
tfl!
*t*t
a固,性
sn't+
Total
7
1
;_;
0
11
20
,e
I228
OtiiSepj^tvf>
V^lur-
ExactSiq(2-sIcl合H)
McNem^rTest
ZofValidCases
20
.□21q
a.Binomialai^stributionused.
3.R*C表(行或列超过两个)的卡方检验
(1)多个样本率的比较
例6.某医院用三种方案治疗急性无黄疸型病毒性肝炎结果如卜.,问三种疗法的有效率是否一致?
表6三种方案治疗肝炎疗效的结果比较
组别
有效
无效
合计
有效率(%)
西药组
51
49
100
51.00
中药组
35
45
80
43。
75
中西结合
59
15
74
79o73
145
109
254
57o09
%:
兀广凯2=n3f%:
”1、兀2、113不全相等9Q二。
°5
建立变量名:
E2e
'#g?
M♦含
片正用
弋
Name
\IVidlh
|Decimals|
Label
Values
Missing
|ColumnsAlign
Measme
93
Numeric
8
0
No--
None
8=Right
,Scale
Ninw
Typo
Widlh
D“mil«|
La81Value
Missing
Columns
Align
0rop
Numeric
8
0
(1.—1・・,
None
8
=Right
eScale
elFecI
Klumenc
B
0
P.—
Nine
8
三Right
々Scale
他q
Numeric
8
0
2|None
None
8
三Right
夕Scale
录入数值:
gmp
effect
freq
1
1
51
2
1
35
3
1
59
1
0
49
2
•
0
45
I3
0
15
统计分析:
HbbbtatisTicsDatatailor
FransformAnalyzeGraphsUtilrtiesAdd-onsVMndowHelp
品通[Reports
0DescriptiveStatistics
effe
I
)■
3
I
)
.
Tables
RFMAnalysis
CornpareMeans
GeneralLinearModel
GeneralizedLinearModels
MixedModels
Correlate
格y
123Frequencies...
FQDescriptives...
&Explore...
gx]Crosstabs...
画
囹P-PRats...
图Q-QPlots...
var
结果分析:
CaseProcessin(ISummarv
Cqggs
Va
id
Missina
Tol
al
N
Percent
N
Porcont
N
Percont
grop'etrect
254
1000%
0
.0%
254.
1OO0%
grop»ottoctCrosstatoulation
❷的C1
Total
无效
有效
grop四巧汨Count
49
51
100
ExpectedCount
42.9
57.1
100.0
中药组Count
45
35
80
ExpectedCount
34.3
♦5.7
600
中西医诘台说Count
15
59
74.
ExpectedCount
31.8
42.2
74.0
To⑻Count
109
145
254.
bMpGCtGdcount
109.□
146.0
264.U
Chi-Sciuare:
Tests
Value
df
Aeymp.Giq.
<^-sided>
PearsonChi-square
22.8O8,3
2
.ooo
LikelihoodRatio
24.149
2
.000
Linear-by-Linearassocial9n
12.382
1
.000
NofValidCases
254
a.□calls(.0%)expect©cicoumlosstnan5.Tn©minimumGxpGctGdcountis31.76.
理论均数均大于5,卡方值为22。
808o自由度为2:
(行数一1)*(列数-1).P<0。
01拒绝H0接受Hl,认为三组疗效不全相等,两两比较用卡方分割:
x2分割的检验水准
比较
,k\Ik 切21(k~2)~T >1个实验组与同匚刘即组比较 ,a ex=; 2(^-1) 两两比较: w DataTransformAnelyze Graphs □tilit L fl,DefineVariableProperties...咱CopyDataProperties... 曼 ,NewCustomAttribute... 鼠DgfineDates... 用DefineMultipleResponseSets... Validation IdentityDuplicateCases... IdentilyUnusualCases... 电]SortCases... OrthogonalDesign CopyDataset 1.0 1: filter$ gr叩 effect freq filter_5 var 1 1 1 51 1 2 2 1 35 1 3 1 5g 0 4 1 0 49 1 5 2 0 46 1 3 0 16 0 7 c 过滤掉第三组,filtei为1为选中,为0为未选中 irmAnalyzeGraphsUtilitiesAdd-onsVyndowHtelp Tableseffei RFMAnalysis Regorts DescriptiveStatisiics CompareMeans fipnAr^lIinarth^ndpl ►123Frequencies... »FiJDescriptives... 4Explore... Ex]Crosstabs... R#rfin 1□ 1 10 CTCrosstabs 夕tcq CaseProcessingSummary Cases Valid Missing Toal N Percent N Percent N Percent grop*effect 160 100.0% 0 .0% 180 100.0% grop*effectCrosstabulation effect Total 尢效 有效 grop西秀且Count 49 51 10C ExpectedCount 52.2 47.8 100.0 中等且Count 45 35 80 ExpectedCount 41.8 38.2 80.0 TotalCount 94 86 18C ExpectedCount 94.0 86.0 180.0 Chi-SquareTests Value df Asymp.Sig. □-sided) ExactSig.(2-sided) ExactSig.(1-sided) PearsonChi-Square .936a 1 .333 ContinuityCcrrpctionb 1 414 LikelihoodRatio .938 1 .333 Fisher'sExactTest .369 .207 Linear-by-LinearAssociation .931 1 .335 NofValidCases 180 a.0cells(.0%)haveexpectedcountlessthan5.Theminimumexpectedcountis38.22 b.Computedonlyfcra2x2table 结果为中药组和西药组的比较,结果分析同四格表(所有理论频数>5,则看表三第一行,p=0.333).注意: P应与.,比较而非a. 同理可进行其他组的两两比较,例如进行西药组和中西医结合组的比较: 把就吆$二[中grop为2(中医组)的行设为0,其他设为1。 。 其他步骤同上: grop oifoct froq 仙or_$ 1 1 1 51 1 2 1 36 □ 3 3 1 59 1 A 1 0 49 1 2 0 45 □ G 3 0 15 1 7 (2)双向无序分类资料的关联性检验 例7.测得某地5801人的ABO血型和MN血型结果如表7-10,问两种血型系统之间是否右关联? 表7某地5801人的血型 MN血型一 MNMN A 388 410 800 1598 B 495 587 950 2032 AB 137 179 32 348 合计 1451 1666 2684 5801 双向无序,用卡方检验,计算列联系数: C=J—>0o75为高度相关,04--0.75为中度相关,小于0.4为低度相关 +尸 若问ABO型中MN型构成是否一样,为普通卡方检验。 H0: 两种血型系统之间没有关联 建立变量名: Ndme Type Width Decimals Lat^l ValuesMissing Cdamns Align Me&$ure 限 Numeric 8 0 (1.0)...Nan© 3 =Right 夕Scale MNmJ Numeric 8 0 11.M)...卜JNone 8 名Right 「Seal。 Numeric 0 0 Non«Nan。 9 至Right /Sole 录入数值: ABO MN freq var 1 1 431 2 1 388 3 1 495 4 1 137 1 7 4AF1 2 2 410 3 2 587 4 2 179 1 3 902 2 3 800 3 3 950 4 3 32 统计分析: nAnalyzeGraphsLlilities 卜EReports DescriptiveStatistics Add-onsWindowHelp >123Frequencies... MN Tables RFMAnalysis CompareMeans GeneralLinearModel GeneralizedLinearModels MixedModels Correlate 国Descriptives... &Explore... 国Crosstabs... 殛Ratio... 囹P-PPlots.. 囹Q-QPlots... V; 2 3 4 1 2 结果分析: CaseProcessingSummary Cases Valid Missing To1 al N Percent N Percent N Percent ABO*MN 5801 100.0% 0 .0% 5801 100.0% ABO'MNCrosstabulation MN M N MN Total ABO0Count ExpectedCount 431 456.0 490 523.6 902 843.5 1823 1823.0 ACount ExpectedCount 388 399.7 410 458.9
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 检验 条件
![提示](https://static.bdocx.com/images/bang_tan.gif)