You are on page 1of 328

Bi ging mn hc

PHN TCH
S LIU THNG K
Ging vin: Ths. Dng Th Mai Thng
B mn: Khoa hc my tnh CNTT
Email: duongmaithuongcntt@gmail.com
Mobile: 0945373858
1

MN HC TIN
Ton cao cp
Xc sut thng k
Lp trnh cn bn

MC TIU MN HC
Cung cp kin thc c bn v phn tch thng
k d liu

c lng
Kim nh
Phn tch hi quy v tng quan
Phn tch chui thi gian

Cung cp k nng s dng phn mm SPSS

YU CU & NH GI
100% sinh vin ln lp v thc hnh
Thc hin chia nhm tho lun, lm bi tp
ln, tiu lun mn hc.
Kt thc mn sinh vin c th phn tch thng
k s liu da trn phn mm SPSS 19.
nh gi:

Chuyn cn: 10%


Gia k: 10%
Bo co bi tp ln: 20%
Thi ht hc phn: 60%
4

TI LIU THAM KHO


[1] Dang Quang A and Bui The Hong, Statistical data analysis,
www.netnam.vn/unescocourse/statistics.htm, 1999 ( Gio trnh in t
theo t hng ca UNESCO).
[2] Bi Th Hng, Gio trnh phn tch thng k d liu v SPSS for
Windows, H Ni, 1999.
[3] Trn B Nhn, inh Thi Hong, L thuyt thng k, NXB Thng k,
1998.
[4] o Hu H, Nguyn Vn Hu, Hong Hu Nh, Thng k ton hc,
NXB HQG H Ni, 2004.
[5] Nguyn Vn Liu, Nguyn nh C, Nguyn Quc Anh, SPSS - ng
dng phn tch d liu trong qun tr kinh doanh v khoa hc t nhin
x hi, NXB Giao thng vn ti, 2000.
[6] Hong Trng, Chu Nguyn Mng Ngc, Phn tch d liu nghin
cu vi SPSS, NXB Hng c, 2008.
5

Thi
gian

NI DUNG

Ni dung

Tun 1 Gii thiu mn hc, n tp cc kin thc


c bn
Chng 1. Phn loi d liu, m ha,
nhp liu v mt s x l trn bin

L thuyt

Tun Chng 2. Lm sch d liu


2,3 Chng 3. Tm tt v trnh by d liu

L thuyt
thc hnh

Tun 4 Chng 4. Kim nh mi lin h gia


hai bin nh tnh.

L thuyt
thc hnh

Tun 5 Chng 5. Phn tch lin h gia bin


nguyn nhn nh tnh v bin kt qu
nh lng:
Kim nh trung bnh qun th

L thuyt
thc hnh
6

Thi
gian

NI DUNG

Tun 6 Chng 6. Phn tch lin h gia bin


nguyn nhn nh tnh v bin kt qu
nh lng: Phn tch phng sai

Ni dung

L thuyt
thc hnh

Tun 7 Kim tra bi 1


Tun 8 Chng 7: Kim nh phi tham s
Tun 9 Chng 8. Kim nh t l
Chng 9. Tng quan v hi quy
tuyn tnh
Tun 10, Bo co bi tp ln
11, 12 Kim tra bi 2
n Tp

L thuyt
thc hnh
L thuyt
thc hnh

Bo co
7

NI DUNG MN HC (c thm)

Chng 10: Hi qui Bianry Logistic


Chng 11: nh gi tin cy ca thang o
Chng 12: Phn tch nhn t
Chng 13: Phn tch bit s
Chng 14: Phn tch cm
Chng 15: Lp bn nhn thc vi o lng a
hng v phn tch tng hp
Chng 16: Cc tin ch

GII THIU PHN TCH D LIU


Nghin cu v phn tch d liu
1. Xc nh vn cn nghin cu

2. Thu thp d liu


3. X l d liu
4. Phn tch d liu
5. Bo co kt qu

GII THIU PHN TCH D LIU


Bn cht ca phn tch d liu
Mc chnh xc ca
m hnh thng k
Hiu bit, tri thc

S kin
Thng tin

D liu

Mc ci thin
ca cc quyt nh
10

BN CHT CA PT D LIU (cont.)


D liu tr thnh thng tin khi n lin quan
n vn nhn thc, kt lun v quyt nh
ca ngi nghin cu
Thng tin tr thnh s kin khi thng tin h
tr cho vic ra quyt nh
S kin tr thnh tri thc khi n c s dng
hon tt qu trnh ra quyt nh mt cch
thnh cng.
11

THNG K V PHN TCH D LIU


Thng k: tp hp cc phng php dng
thu thp, phn tch, trnh by v din gii d
liu
Phn tch d liu: cung cp kinh nghim thc
hnh c c kt y mnh vic ng dng
t duy thng k v k thut thng k nhm
hiu r cc hin tng nghin cu, t h tr
cho vic ra quyt nh
12

Chng 1
PHN LOI D LIU, M HA
NHP LIU V MT S X L
TRN BIN

13

PHN LOI D LIU

D liu

D liu nh
tnh

Thang o
danh ngha

Thang o
th bc

D liu nh
lng

Thang o
khong cch

Thang o t
l
14

PHN LOI D LIU (cont.)


D liu nh tnh:
Phn nh tnh cht, s hn km, khng tnh c gi
tr trung bnh ca d liu dng nh tnh.
V d: Nam/ N, Gii/ Kh/ TBK/ TB/ Yu/ Km

D liu nh lng
Phn nh mc , mc hn km, tnh c tr
trung bnh.
V d: Tui, Thu nhp trong thng

15

CC LOI THANG O
Thang o danh ngha (phn loi) nominal scale
Cc con s mang ngha phn loi i tng
V d: Vui lng cho bit tnh trng hn nhn ca bn?
1

c thn

ang c gia nh

ga

Ly thn hoc ly d

Chng minh cc thang o trn l bin phn loi


Th t thang o phn loi c quan trng ko?

16

CC LOI THANG O
Thang o th bc ordinal scale
Cc con s c sp xp theo mt quy c no v
th bc hay s hn km, nhng khng bit c
khong cch gia chng?
V d: Mc hi lng ca bn v GV ging dy?

1. Rt hi lng
2. Hi lng
3. Bnh thng
4. Khng hi lng

Chng minh y l thang o th bc?


Thang o th bc c phi l thang o phn loi?
17

CC LOI THANG O
Thang o khong cch interval scale
L mt dng c bit ca thang o th bc, cho bit
khong cch gia cc th bc.
V d: Theo bn tm quan trng ca vic chm ch
i vi kt qu hc tp? (1 = khng quan trng, 10 =
rt quan trng)
Thang o khong cch khng c im 0 tuyt i.

Thang o khong cch hay th bc cho nhiu thng


tin hn?
18

CC LOI THANG O
Thang o t l - ration scale
Thang o t l = th t + khong cch + im
0 l gi tr tht
V d:
Bn ang c bao nhiu tin?
im trung bnh hc tp ca bn t bao nhiu?

19

V D THANG O
Gi tr 0 ca bin c mang ngha t nhin.
Ti ht sch tin
Lng ti ch bng sp ti
Dn s Vit Nam gp 10 ln dn s NewDilan

Gi tr 0 khng mang ngha t nhin.


00 F l mt im 0 nhn to.
320 F = 00 C
Nu ni 320 F nng gp i 160 F th ko c ngha v
chng u ng bng.
So snh hai vt 500 C ( (0+100)/2 v
1220 F ((32+212)/2) u im gia nhit si v ng
bng.
20

NGUYN TC M HA
& NHP LIU
Xt 2 v d
Nhng ngi tr li cu hi

Cc bin
H tn
1
2
3

Vn An

Gii
tnh
Nam

L Thu Hoa N
o Th L Na N

Ng H Nam

Nam

Tui

Ngh nghip

21

Sinh vin

34
56

Gio vin
Ngh hu

17

Hc sinh
21

NGUYN TC M HA &
NHP LIU
Sau khi m ha
Cc bin
H tn
1

Vn An

Gii
tnh
1

Tui

Ngh nghip

21

2
3

L Thu H
o Th L Na

0
0

34
56

2
3

Ng H Nam

17

19
22

NGUYN TC M HA & NHP


LIU
Ch :

Ch m ha c thang o nh tnh
Mi ct l mt bin cn kho st
Mi hng l thng tin ca mt i tng cn thu thp
Cu hi c nhiu kh nng tr li?

V d: Trong vng 5 nm va qua, bn i


nhng a danh no?
Thi Nguyn, H Ni, Hu, Nng, Si Gn, Khc.
Biu din d liu trn?
23

QUN TH V MU
Qun th: Tp hp cc c th hoc cc i
tng m ngi nghin cu cn quan tm.
Qun th loi ngi
Qun th sinh vin
Qun th khch sn 3 sao

Mu: Tp hp cc c th m tp ny c th coi
l i din ca qun th c quan st

QUN TH HU HN
Qun th hu hn: L qun th m c th c
th lit k c
Sinh vin lp KHMT: Qun th hu hn
DS sinh vin lp KHMT: DS lit k
Dn s Vit Nam ?

QUN TH GI NH
V d: T l 1000 bng n do 1 nh my sn
xut, tin hnh th 1 s bng v ghi li tui
th.
1000 bng l qun th hu hn
Bng n mang th l mu
Kt qu thu c l tui th ca mu c th

QUN TH GI NH
Vi cng cng ngh nh vy tip tc sn xut bng
n, cc bng n s c sn xut to thnh qun

th gi nh (cha sn xut)
Tui th ca cc bng trong qun th gi nh ng

vai tr quan trng v c d on trc thng qua


kt qu th nghim c.

T CHC CC D LIU PHN LOI


S ln xut hin
D liu chia thnh 2 ct, 1 ct nh dang ca c th

c quan st, 1 ct ghi d liu quan st c.


Cch lm ny gi l tnh s ln xut hin hay tn
xut

S LN XUT HIN (Tn xut)


Tn xut i vi mt lp no ca mt bin l s
cc quan st ri vo lp ny
Bng phn b tn xut

TN XUT (cont.)
Cc phn b tn xut:
Ch ra cc c th phn b nh th no theo cc
nhm, dng khi nhn mnh n bin ang c
quan st

Cc phn trm:
Tn xut tng i ca bin hay t l ca bin trn
tng s cc quan st.

TN XUT (cont.)
Tn xut tng i i vi mt lp no
ca mt bin bng tn xut ca lp ny chia
cho tng quan st

CC DNG TH TN XUT
th dng thanh

CC DNG TH TN XUT
(cont.)
th dng ct chng nhau

CC DNG TH TN XUT
(cont.)
th ng ng

D LIU RI RC
Tn xut tch ly mt gi tr cho bng
tng tn xut ca tt cc gi tr nh hn v
bng gi tr ny.
Cc tn xut trong bng 2.7 c th biu din
trn th

TNG HP D LIU

TH DNG CT

Tin Ui Tn xut

Tn xut
tng i

Tn xut
tch ly

Tn sut tng
i tch ly

U1

0,13

0,13

U2

0,29

10

0,42

U3

0,38

19

0,80

U4

0,20

24

1,00

Tin Ui

U1

U2

U3

U4

U5

U6

U7

U8

U9

Tn xut

40

TH DNG IM

D LIU LIN TC
chnh xc: Trn l thuyt chnh xc l
ty , thc t li ph thuc v dng c o.
Lm trn: Lm gim chnh xc.

PHN B TN XUT CA DL LIN TC


D liu s lin tc c lit k trong bng 2
ct nh d liu ri rc.
Nhn xt
Min = 41, max = 64
Min gi tr bin cn nng 64-41=23
Ta chia min gi tr thnh 5 khong nh (43, 48,
53, 58, 63) tng ng vi cc lp: 40.5-45.5, 45.550.5, 50.5-60.5, 60.5-65.5

Nu bng cn th ly nhm trn

LC CN NNG DNG
CT

DNG CHM

DNG NG

CC S O V TR
Mode : gi tr xut hin nhiu nht trong tp d
liu
Median: im gia ca d liu.
Mean: gi tr trung bnh
Sum: tng s
Min gi tr
Mean Deviation: lch trung bnh
lch chun
population variance: phng sai ca qun th

MODE CA D LIU PHN NHM


Mode ca cc d liu nh lng ri rc
Mode ca mt tp d liu l gi tr xut hin nhiu
ln nht trong tp d liu
V d: bng 2.6
Mode ca bin s con l 2 (chim 35%)

D liu l bin lin tc, cc gi tr c th hon


ton khc nhau th c tn ti Mode ko?
Bin lin tc th xc sut xut hin ca d liu l bao
nhiu?

Nu d liu c phn nhm c th tnh c


Mode ca nhm ko?

51

MEDIAN CA DL LIN TC
Median l gi tr chia tp hp thnh 2 na sao
cho cc quan st ca na ny nh hn bng gi
tr gia, quan st na kia ln hn bng gi tr
gia.
tm gi tr gia nn sp xp d liu.
Mt tp quan st c sp th t gi l mu c
sp th t.

MEDIAN
Nu s mu l l th Median chnh gia

Nu s mu l chn th nn ly gi tr trung bnh


ca 2 mu trung tm.

MEAN
Mean: l gi tr trung bnh s hc ca mt
bin, c tnh bng tng cc gi tr quan st
chia cho s quan st.
y l dng cng c thng c dng cho dng
o khong cch v t l.
Gi tr trung bnh c c im l chu s tc ng
ca cc gi tr mi quan st.
Cng thc:
n

x
i 1

MEAN (cont.)
V d
Tnh cn nng trung bnh ca 5 ngi c s cn
(56, 39, 70, 101, 45)
(56, 39, 70, 101, 45)/5 = 62.2 kg

Thay i n v
Nu tt c cc tp quan st c cng (tr) vi 1
s dng th bng Mean cng (tr) s .
(59, 42, 73, 104, 48)/5 = 63.2 kg

TRUNG BNH V TNG S


V d: Gi s s con ca 10
gia nh c nh s 1 10
S con trung bnh: 3.5
S con ko th l nhng gi
tr trung bnh c ngha.
Gi tr trung bnh ca gii
tnh c ngha ko?

CC S O V S BIN THIN
V d
5 ngi bn ABCDE ln lt c s tin l: 20, 35,
40, 37, 30 $
MeanABCDE = 24.4
5 ngi EFGHI ln lt c s tin l: 10, 45, 17,
70, 20 $
MeanEFGHI = 24.4

Nhn xt: Nu 2 tp quan st c cng gi tr


trung bnh th tp no c bin thin nh
hn s chnh xc hn

MIN GI TR
nh ngha:
Hiu s gia quan st ln nht v nh nht ca tp
d liu c gi l min gi tr ca tp ny.

NH GI MIN GI TR
Tn

S tin

2000

100

170

220

250

190

16

200

150

Min gi tr ln nhng
khng phn nh ng
bn cht ca d liu
Min gi tr tng khi c
ca tp quan st tng
ch ko bao gi gim (
dn tri ca s liu)

MEAN DEVIATION

lch trung bnh l s o v s bin

MEAN DEVIATION
Gi tr tuyt i ca lch l khong chnh
lch gia gi tr quan st v gi tr trung bnh
mu.
lch tuyt i trung bnh ( lch trung
bnh)

TR TRUNG BNH CA QUN TH


nh ngha:
Gi tr trung bnh ca qun th l

Cc lch l yi (i=1,2,..)
lch tuyt i l |yi | (i=1,2,..)
lch trung bnh ca qun th (tuyt i) l khong
cch trung bnh t cc im y1 y2 , yn n gi tr
trung bnh ca chng

LCH TRUNG BNH MU


nh ngha
lch trung bnh ca mu l tng ca cc lch
tuyt i chia cho c ca mu tr i mt.

Trong x1 ,x2 , xn l n quan st v


l trung bnh mu

V D
Tr chi tung ng xu: Mt cu b vch mt
ng nm ngang sau li li 2m v tung ng
xu ba ln sao cho chng ri cng gn ng nm
ngang cng tt. Gi s ng xu ri xung cch
cu b khong x1 x2 x3

V D (cont.)
Tng khong cch ca ng xu so vi ng
nm ngang (ng ny coi l trung bnh ca
mt tng th v hn ln tung ng xu)

Khong cch trung bnh (chia 3) l s o s


phn tn cc ln tung ng xu xung quanh
ch.

V D (cont.)
Tuy nhin tng khong cch ca cc ng xu so vi
ng vch ngang (biu din ):

Thng nh hn tng th nht v l tm ca mu x1 x2


x3 , 2m c th ko phi l tm ca mu.
iu chnh li cho nh i ta chia cho 2.

LCH CHUN
nh ngha
lch chun ca mt qun th cc quan st y1 y2
, yn c k hiu l v tnh theo cng thc

V D
lch chun ca v d bng 4.1

PHNG SAI QUN TH


nh ngha
Phng sai ca mt qun th cc quan st y1 y2 ,
yn l bnh phng ca lch chun ca qun th
v k hiu l 2

LCH CHUN CA MU
nh ngha 7
lch chun ca mu gm n quan st x1 ,x2 ,
xn c k hiu l s v c tnh theo cng thc

LCH CHUN CA MU
(cont.)
nh ngha 8
Phng sai ca mt mu gm n quan st x1 ,x2 ,
xn l bnh phng ca lch chun ca mt mu,
k hiu l s2 v c tnh theo cng thc

NG NGHA CA PHNG SAI


Khong cch tng cp: Phng sai c ng
ngha t nhin v khong cch tng cp im.

NG NGHA CA PHNG SAI


(cont.)
Nhn xt
Khong cch gia cc cp cng ln th s bin
thin cng ln.
lch trung bnh ca khong cch l: 20/10=2
lch trung bnh tuyt i v lch trung bnh
khong cch ko c mi lin h

Trung bnh khong cch cc cp bnh phng


(xi xj )2 v trung bnh cc lch chun mu
bnh phng (xi - )2 c mi lin h trc tip.

(tip)
Trung bnh khong cch ca tng cp bnh phng:
50/10 = 5
Phng sai mt mu gm n quan st: 2.5 (mt na
trung bnh ca cc khong cch bnh phng)

(tip)
nh ngha
Phng sai ca mt mu gm n quan st x1 ,x2 ,
xn bng mt na gi tr trung bnh khong cch ca
cc cp bnh phng

l s cc cp trong n quan st

S DNG CC O BIN
THIN
nh gi thc cht ca thng tin c cha
trong mt o v tr.
Mt o v s bin i thng c s dng
cng vi mt o v v tr to ra mt ch bo
v c im ca qun th.

CC O BIN THIN
V d:

Hai mu c gi tr trung bnh l: 4


lch trung bnh l; 6/4=1.5

CC O BIN THIN (tip)


lch chun ca mu 1:
lch chun ca mu 2:
Gii thch:
lch chun l cc bnh phng ca cc lch xung
quanh gi tr trung bnh, trong mu 2 cc cc tr xa gi tr
trung bnh, mu 1 th gn hn. Do vy, trong mt s trng
hp nn s dng o khc (min gi tr ca cc gc phn
t m t s bin thin).

SO SNH CC PHN B
Khi so snh cc phn b tp trung vo v tr v
s bin thin.
V d 1:
Hai quc gia c cng thu nhp bnh qun u ngi
nhng khc nhau v lch chun.
Hai hng lp A,B c gi bn lp nh nhau. C 2 hng
u c khuyn mi mua 5 lp gim 20% gi. Tui th
ca lp B c lch chun l 1000km, lp A l 5000km.

Ngi mua hng nn mua lp ca hng no?


Tng s tin c th t hn nu mua lp hng B, cho
d tui th trung bnh c th ngn hn v chng mn
nh nhau hoc gn nh nhau.

V d 2: Nhu u t nng nghip s u t vo


vng t A hay B nu lng ma ca chng
tng ng nh sau:
A: 40, 36, 25, 60, 54 ( sA = 14,7)
B: 38, 40, 35, 50, 52 ( sB = 7,55)

u t vo vng t B s c li hn!

Kt lun
Mt s o v tr s m t mt tp cc quan st
chnh xc nu bin thin ca tp ny nh v
ngc li.
lch trung bnh v lch chun l khong
cch trung bnh so vi gi tr trung bnh.
lch trung bnh l s hc ca cc lch tuyt
i.
lch chun l cn bc hai ca trung bnh ca
bnh phng cc lch.

Kt lun
i vi c qun th, trung bnh c chia cho c
ca qun th
i vi mu trung bnh c chia cho c ca mu
tr 1
Phng sai mu bng trung bnh bnh phng
khong cch cc cp quan st.
Cc s o v tr u c th tnh c bng SPSS

PHN MM PHN TCH V X


L D LIU
Cc phn mm phc v phn tch v x l d
liu hin nay: SAS, SPSS v STATA
SAS: ln nht, y nht v t nht => t c
s dng ti VN
STATA c phm vi ng dng hp hn thng
c s dng ch yu trong ngnh Y t
SPSS c nhiu chc nng v linh hot hn c s
dng rng ri trong nhiu ngnh khoa hc khc
nhau nh: X hi hc, Y hc, Nhn hc, Tm l
hc, Kinh t hc, Marketing.... c phin bn cho
cc h iu hnh Microsoft Windows, Mac, v 83
Linux/ UNIX.

CCH S DNG SPSS


SPSS l phn mm chuyn dng x l thng
tin s cp.
SPSS l mt b chng trnh rt d s dng
nn thu ht c nhiu ngi s dng.
SPSS cung cp mt giao din gia ngi v
my cho php s dng cc Menu th xung
chn cc lnh thc hin.

84

QUN L D LIU
SPSS c mt b son tho d liu tng t
nh Excel, b son tho cho php vo cc d
liu v m t cc thuc tnh ca chng.
SPSS khng c nhng cng c qun l d liu tht
mnh, ch c cc lnh chuyn cu trc d liu theo
chiu ngang thnh cu trc d liu theo chiu dc
v ngc li.
SPSS ch x l mi file d liu mt thi im v
kh c th phi thc hin cc nhim v phn tch
vi nhiu file d liu cng mt lc. Cc file d liu
c th c ti 4096 bin v s lng bn ghi ch b
gii hn trong dung lng ca a cng.
85

NG DNG TRONG PHN TCH


THNG K
SPSS thc hin nhng thng k m t v phn
tch thng k chung nht nh:

Hi quy, hi quy Logistic


Kim nh
Phn tch tn ti, phn tch phng sai
Phn tch nhn t v phn tch nhiu chiu.

86

NG DNG TRONG PHN TCH


THNG K (tip)
Sc mnh ln nht ca SPSS l lnh vc:
Phn tch phng sai
Kh nng lp cc biu bng s liu tng hp: a
dng v linh hot, cc bng biu,bo co c
trnh by p, c th hiu chnh, in ra hoc convert

Yu im ca SPSS
Kh nng x l i vi nhng vn c lng
phc tp v do kh a ra c cc c lng
sai s i vi cc c lng ny.
SPSS cng khng h tr cc cng c phn tch d
87
liu theo lc mu.

V TH
Thao tc n gin
th cht lng cao, v c th ct/dn vo
cc ti liu khc nh vo Word hoc
Powerpoint.
SPSS c ngn ng c php to ra cc th,
nhng ngun ng c php tng i phc tp
v nhiu im trong giao din to th li khng
sn sng trong ngn ng c php v th nn t c
s dng ti.
88

Mn hnh qun l d liu


(data view)
Ct (Column): i din cho
bin quan st.

L ni lu tr
d liu nghin
cu vi mt cu
trc c s d
liu bao gm
ct, hng v cc
giao nhau
gia ct v
hng

Mn hnh qun l d liu


(data view)

Hng (Row): i din cho mt


trng hp quan st (ngi tr
li),

L ni lu tr
d liu nghin
cu vi mt cu
trc c s d
liu bao gm
ct, hng v cc
giao nhau
gia ct v
hng

Mn hnh qun l d liu


(data view)
L ni lu tr
d liu nghin
cu vi mt cu
trc c s d
liu bao gm
giao nhau gia ct v hng (cell): Cha
ct,
hng
v cu
cchi
ng mt kt qu tr li
tng
ng vi
cn kho st (bin) v mt i
tng nhau
tr li c
giao
th (trng hp quan st). l s kt hp ca
gia ct v
i tng v bin. Cc ch cha cc tr s
hng
bin.

Mn hnh qun l d liu


(data view)

File d liu c hnh ch nht. Hai hng ca file d liu


c xc nh bi s lng cc i tng v s lng cc
bin. Khng c cc trng rng trong cc ng bin
ca file d liu. i vi cc bin dng s, cc rng c
chuyn thnh tr s khuyt thiu h thng. i vi cc
bin dng chui, mt du cch vn c coi l mt tr s.

L ni lu tr
d liu nghin
cu vi mt cu
trc c s d
liu bao gm
ct, hng v cc
giao nhau
gia ct v hng

Mn hnh qun l bin


(variables view)

Tn bin (name): L tn i din cho


bin, tn bin ny s c hin th trn
u mi ct trong mn hnh d liu

L ni qun l cc
bin cng vi cc
thng s lin quan
n bin. Trong
mn hnh ny mi
hng trn mn
hnh qun l mt
bin, v mi ct
th hin cc thng
s lin quan n
bin

Mn hnh qun l bin (variables view)


Cc qui tc c p dng cho tn bin:
Tn phi bt u bng mt ch. Cc k t cn li c th l bt
k ch no, bt k s no, hoc cc biu tng nh @, #, _,
hoc $.
Tn bin khng c kt thc bng mt du chm.
Trnh dng cc tn bin m kt thc vi mt du gch di cn
( trnh xung t vi cc bin c t ng lp bi mt vi
th tc)
di ca tn bin khng vt qu 8 k t.
Du cch v cc k t c bit (v d nh !, ?, , v *) khng
c s dng
Tng tn bin phi n chic/duy nht; khng c php trng
lp. Khng c dng ch hoa t tn bin. Cc tn
NEWVAR, NewVar, v newvar c xem l ging nhau.

Mn hnh qun l bin


(variables view)

L ni qun l cc
bin cng vi cc
thng s lin quan
Loi bin (type): Th hin dng d liu n bin. Trong mn
th hin trong bin. Dng s, v dng hnh ny mi hng
trn mn hnh qun
chui
l mt bin, v mi
ct th hin cc
thng s lin quan
n bin

Mn hnh qun l bin


(variables view)
L ni qun l cc
bin cng vi cc
thng s lin quan
S lng con s hin th cho gi tr n bin. Trong mn
(Width): Gi tr dng s c php hnh ny mi hng
hin th bao nhiu con s
trn mn hnh qun
l mt bin, v mi
ct th hin cc
thng s lin quan
n bin

Mn hnh qun l bin


(variables view)
L ni qun l cc
bin cng vi cc
thng s lin quan
n bin. Trong mn
hnh ny mi hng
trn mn hnh qun l
mt bin, v mi ct
S lng con s sau du phy c th hin cc thng s
hin th (Decimals
lin quan n bin

Mn hnh qun l bin


(variables view)
L ni qun l cc
bin cng vi cc
thng s lin quan
n bin. Trong mn
hnh ny mi hng
trn mn hnh qun l
mt bin, v mi ct
th hin cc thng s
lin quan n bin
Nhn ca bin (label): Tn bin ch
c th hin tm tc bng k hiu,
nhn ca bin cho php nu r hn v
ngha ca bin

Mn hnh qun l bin


(variables view)

Gi tr trong bin (Values): Cho


php khai bo cc gi tr trong bin
vi ngha c th (nhn gi tr)

L ni qun l cc bin cng vi cc thng s lin quan n bin. Trong


mn hnh ny mi hng trn mn hnh qun l mt bin, v mi ct
th hin cc thng s lin quan n bin

Mn hnh qun l bin


(variables view)

L ni qun l cc
bin cng vi cc
thng s lin quan
n bin. Trong mn
hnh ny mi hng
trn mn hnh qun l
mt bin, v mi ct
th hin cc thng s
lin quan
Gi tr khuyt (Missing):
Do n
thitbin
k
bng
cu hi c mt s gi tr ch mang tnh cht
qun l, khng c ngha phn tch, loi
b cc bin ny ta cn khai bo n nh l gi
tr khuyt (user missing). SPSS mc nh gi
tr khuyt (system missing) l mt du chm
v t ng loi b cc gi tr ny ra khi cc
phn tch thng k.

Mn hnh qun l bin


(variables view)

Kch
tht
ct
(columns): Cho php
khai bo rng ca
ct

L ni qun l cc
bin cng vi cc
thng s lin quan
n bin. Trong mn
hnh ny mi hng
trn mn hnh qun l
mt bin, v mi ct
th hin cc thng s
lin quan n bin

Mn hnh qun l bin


(variables view)

V tr (align): V tr
hin th cc gi tr
trong ct (phi, tri,
gia)

L ni qun l cc
bin cng vi cc
thng s lin quan
n bin. Trong mn
hnh ny mi hng
trn mn hnh qun l
mt bin, v mi ct
th hin cc thng s
lin quan n bin

Mn hnh qun l bin


(variables view)

Dng thang o (measures):


Hin th dng thang o ca
gi tr trong bin

L ni qun l cc bin
cng vi cc thng s
lin quan n bin.
Trong mn hnh ny mi
hng trn mn hnh
qun l mt bin, v
mi ct th hin cc
thng s lin quan n
bin

Ordinary: th bc
Norminal: danh ngha
Scale = Interval + ration
(khong cch + t l)

Mn hnh hin th kt qu
(output)
Nhp p mt
biu tng
kiu sch
hin hoc lm
n mt chi tit

Cc php phn tch


thng k s cho ra cc
kt qu nh bng
biu, th v cc kt
qu kim nh., cc
kt qu ny s c
truy xut ra mt mn
hnh, v c lu gi
di mt tp tin khc
(c ui l .SPO). Mn
hnh ny cho php ta
xem v lu gi cc kt
qu phn tch

Nhp m
rng hoc thu
hp cc cp
xem

Nhp mt chi tit


chn v i
thng n n

Pan phn cp
xem

Pan ni dung

Nhp p mt bng xoay hoc


hiu nh n

MT S X L TRN BIN
M ha li bin:
Mc ch lm gim biu hin ca bin nh tnh
Chuyn bin nh lng thnh nh tnh
V d: (D liu Data thuc hanh)
M ha li bin thu nhp (tngd) 4 khong: (0-5, 6-10,
11-15, >16t)
M ha li bin tui: (0-18, 19-25, 26-35, 36-45, 46-60,
>61t)
(Transform/recode/)

105

MT S X L TRN BIN
Chuyn bin dng Category thnh dng
Dichotomy
Category: bin phn loi c nhiu gi tr m ha (
v d nh o : Pht, Thin cha gio, Tin lnh,
Cao i)
Dichotomy: bin phn loi ch c 2 gi tr c hoc
khng (c o hoc khng c o)
(Transform/count)

106

Chng 2
LM SCH D LIU
107

S CN THIT
Xt v d

108

CC PHNG PHP LM SCH


D LIU

Dng bng tn s (Edit/Find)


u im: d thc hin
Nhc im: th cng, ch ph hp vi bng cu hi
ngn.

Dng bng phi hp 2 hoc 3 bin (Data/ Select


Cases)
u: pht hin c nhiu li, ph hp vi bng di
Nhc im: phc tp cn c kin thc v kinh
nghim.

Dng lnh Sort Case

109

Chng 3
TM TT V TRNH BY
D LIU
110

PHNG PHP V CNG C

Bng tn s
Cc i lng thng k m t, biu tn s
Bng kt hp nhiu bin
th

111

BNG TN S N GIN
Tp d liu datathuchanh.sav
V d lp bng tn s ca bin gtinh (1-nam, 2-n),
kt qu thu c bng 3.1 v 3.2
Analyze/Descriptive statistics/Frequencies
Bng 3.1

Valid: S quan st hp l (s ngi c tr li)


Missing: S quan st khng hp l (Ko tr li)
112

Bng tn s (tip)
Bng 3.2

113

Bng tn s (tip)
Gii thch
Ct 1: biu hin ca cc gi tr nhp vo (1-Nam,
2-N, 11, 22.)
Frequencies: tn s ca tng biu hin
Percent: tnh tn sut theo t l phn trm
Valid percent: phn trm hp l, tnh trn s quan
st c thng tin tr li
Cumulative percent: Phn trm tch ly

114

???
Bng tn s c th thc hin c vi bin
nh lng c ko?
Nu bin nh lng lin tc th c vn g
xy ra?
Test th vi bin tuoi.

115

CC I LNG THNG K M T
Cc i lng thng k m t ch p dng
vi bin nh lng
Analyze/Descriptive statistics/ Descriptives
Cc i lng thng dng:

Mean: trung bnh cng


Sum: tng cng
Std.Deviation: lch chun
Minimum/ Maximum: gi tr nh/ ln nht
SE mean: sai s chun khi c lng tr trung bnh
116

Ghi ch
Distribution: Cho bit phn phi ang xt c gn
vi phn phi chun khng?
Kurtosis: thc o rng hnh chp ca mt phn
phi (phn phi chun c Kurtosis = 3)
Skewness: thc o mc khng i xng ca mt
phn phi (phn phi chun c Skewness = 0)

Display Order: Cc sp xp th t kt qu
Variable list: theo th t cc bin
Alphabetic: theo bng ch ci
Ascending/ descending means: tng/ gim dn
117

V d
Test th vi bin tuoi, thanhpho v tncn (thu
nhp c / thng) , file Data thuc hanh.sav
Gii thch ngha kt qu nhn c

118

LP BNG TN S NG THI
TNH CC I LNG THNG
K M T

Analyze/Descriptive statistics/Frequencies

119

THNG K M T VI TH
TC EXPLORE
Nhn xt:
Th tc thng k m t trn ch hu dng vi bin
nh lng n.
Mun thng k m t gia cc bin dng Explore
Explore tnh cc i lng thng k m t cho tt
c cc trng hp trong d liu hoc nhm con ca
d liu
Nhn din cc gi tr khc bit
Tnh cc gi tr thp phn v ca phn phi bin
To biu .
120

V d
Analyze/Descriptive statistics/Explore
So snh cc i lng thng k m t ca bin
tuoi vi gtinh, tp

121

Ch
Trong hp thoi Statistics
Descriptive: Mc nh chn sn ca SPSS (cc i
lng thng k m t)
M estimators: Cc s thng k tng ng vi s
trung bnh nhng to ra cc trng s cn bng
nhng quan st ph thuc vo khong cch t chng
ti trung tm (khi s liu c im cc tr hoc phn
tn th M estimators cho c lng tt hn trung
bnh v trung v )
Outliers: th hin 5 gi tr min, max c a vo
khung Dependent List
Percentile: Th hin cc thp phn v th 5,10, 25,
50, 75, 90, 95.
122

Ch
Trong hp thoi Plots
Boxplots: Sp xp li li cch th hin cc biu
trong hp Boxplots
Descriptive: Biu thn l hoc dng histogram
Normality plots with tests: V biu xc xut
chun Q Q gip kim tra phn phi chun
khng?

123

Ch
Gii thch biu thn l:
Trong biu thn l, rng ca thn l 10
Cc con s thn biu din hng chc v l biu
din hng n v
Mi l i din cho mt trng hp

124

LP BNG TNG HP NHIU


BIN
Bng kt hp cc bin nh tnh
Bng kt hp 2 bin nh tnh
Bng kt hp 3 bin nh tnh

Bng kt hp bin nh tnh v nh lng


Bng kt hp 1bin nh tnh v 1 bin nh lng
Bng kt hp 2 bin nh tnh v 1 bin nh lng
(Analyze / Tables / Custom Tables)

125

TRNH BY KT QU BNG
TH
Cc loi biu

126

Chng 4:
KIM NH MI LIN H GIA HAI
BIN NH TNH
127

GII THIU C BN V L
THUYT KIM NH
Kim nh gi thuyt
L mt phng php suy lun
a ra kt lun t gi tr ca mt tham s

V d
Kim tra xem bn trung bnh ca sn phm ca
cty A c ln hn bn trung bnh ca sn phm
cng loi do cty B sn xut hay ko?
128

HNH THNH CC GI THUYT


Khi mun a ra php th cho mt l thuyt mi
cn phi hnh thnh mt gi thit
Gi s s tin ca ngi thnh th s nhiu hn ngi
sng nng thn.

nh ngha 9.1
Mt gi thuyt thng k l mt kt lun v gi tr ca
mt tham s qun th

nh ngha 9.2
Gi thuyt i lp vi gi thuyt chng ta hi vng c
th ng gi l gi thuyt gc hay gi thuyt khng
khng c s khc nhau gia cc trung bnh qun th129
(H0)

HNH THNH CC GI THUYT (Cont.)


nh ngha 9.3
Gi thuyt m chng ta hi vng c th chng minh
c l ng c gi l gi thuyt thay th (Ha)

Ch
Gi thuyt khng thng c cc nh nghin cu a
ra vi hi vng c th loi b c n.
V d: Ngi A thit k mt phng php ging dy
mi v mun th xem phng php ny c ci tin
hn so vi cc phng php c ko?
Ngi A tin hnh th nghim so snh.
130
Gi thuyt khng l ko c s khc bit

V d 1
Hy thit lp cc gi thuyt khng v gii
thuyt thay th kim nh kt lun ca
cc nh nhn khu hc cho rng s con
tng sinh ca ph n thnh th t hn nng
thn.
Nhn xt:
Cc gi thuyt ny phi c hnh thnh di
dng mt hay mt s cc tham s ca qun th
131

V d 1 (cont.)
Li gii
1 : S con tng sinh TB ca ph n thnh
th
2 : S con tng sinh TB ca ph n nng
thn
Nh nhn khu hc cho rng 1 < 2 vy:
H0 (1 2 = 0): Ko c s khc nhau gia s
con c sinh ra thnh th v nng thn
Ha (1 2 < 0): S con c sinh ra thnh
th t hn s con c sinh ra nng thn
132

V d 2
Trn cc bao thuc l thng ghi dng ch
HT THUC L C HI CHO SC
KHE nhng thng bo ny c ghi cnh
bao v kh nh. V vy mt nh nghin cu cho
rng c trn 80% ngi ht thuc ko c c
dng ch ny. Hnh thnh gi thuyt khng v
gi thuyt thay th im kim tra li kt lun
ny.
133

(tip vd2)
Li gii:
Nh nghin cu mun c kt lun p v s
ngi khng c c dng cnh bo. Tc l
ngi ny mun thu thp chng c kt lun
p > 0.8
H0 : p = 0.8
Ha : p > 0.8

134

V d 3
Mt my tin c dng tin cc vng
bi c ng knh 10cm. Ngi ta kim tra
nh k ng knh cc vng bi c sn
xut ra. Nu ng knh trung bnh ca cc
vng bi ln hay nh hn 10cm th coi nh
my b li cn sa cha. Hy hnh thnh
cc gi thuyt khng v gi thuyt thay th
kim tra xem qui trnh sn xut c b li
hay ko?

135

V d 3 (Cont.)
Li gii:
: ng knh trung bnh ng ca tt c cc
vng bi do my tin sn xut ra.
Nu < 10 hoc > 10 th my b li.
H0 : = 10 (qui trnh sn sut ko b li)
H1 : 10 ( qui trnh sn sut b li)

136

HNH THNH CC GI THUYT (Cont.)


nh ngha 9.4
Mt kim nh gi thuyt mt pha l mt kim nh
trong gi thuyt thay th l c hng v c xc
nh bng mt bt ng thc vi du< hoc >

nh ngha 9.5
Mt kim nh gi thuyt hai pha l mt kim nh
trong gi thuyt thay th khng c xc nh i
theo hng no tnh t H0 v c th hin bng mt
mnh vi du
137

V d 4
T l mc bnh lao trong cc c dn TP l ko
ln 0.0002. Sau khi khm sc khe cho nhng
ngi ngoi tnh mi nhp c vo TP ngi ta
thy rng nhng ngi ny c t l mc lao cao
hn. kim nh kt lun ny ngi ta th vi
gi thuyt l:
H0 : p = 0.0002 , trong p l t l ng ca nhng
ngi ngoi tnh mi nhp c mc bnh lao. Hy lp
ra gi thuyt thay th thch hp cho nghin cu ny.
138

V d 4 (Cont.)
Li gii
Cn kim nh xem nhng ngi mi nhp c
mc bnh lao c ln hn 0.0002 hay khng.
Ha : p > 0.0002

Ch :
y l php kim nh mt chiu hay hai
chiu?
Nu t Ha : p 0.0002 c c khng?
Nu t H0 : p < 0.0002 c c khng?
139

CC KT LUN V KT QU

Mc ch ca kim nh gi thuyt l a ra
mt quyt nh liu c th loi c gi thuyt
khng H0 v nghing v gi thuyt thay th Ha
c hay khng?
Mc d lun mong c th a ra c kt lun
ng tuy nhin kt lun ny cn da trn thng
tin mu v vy d mc phi mt s sai lm.
140

CC LOI SAI LM
nh ngha 9.6
Mt sai lm loi I xy ra nu chng ta loi b mt
gi thuyt khng khi n ng. Xc sut mc sai
lm loi mt k hiu l .

nh ngha 9.7
Mt sai lm loi II xy ra nu chng ta khng loi
b mt gi thuyt khng khi n sai. Xc sut mc
sai lm loi mt k hiu l .
141

CC LOI SAI LM (Cont.)


Nhn xt
Gi thuyt khng c th ng hoc sai v vy ta
cn a ra quyt nh chp nhn hay bc b
n. C 4 tnh hung xy ra.

Khng xy ra trng hp mc c 2 loi sai lm


v c quan h t l nghch.
lm cho , cng gim th cn tng lng
thng tin c ca mu

142

V d 5
Xt tip v d 3, xc nh sai lm loi I, II c
th xy ra vi bi ton.
Li gii
Sai lm loi I l bc b ko ng gi thuyt khng.
Kt lun ng knh khc 10cm trong khi thc t
ng knh ng l 10cm.
Sai lm loi II l khng bc b gi thuyt khng.
Kt lun ng knh khng thay i (ng bng
10cm) trong khi thc t ng knh khc 10cm.
143

CC LOI SAI LM (Cont.)


nh ngha 9.8
Xc sut ca vic mc mt sai lm loi I
c gi l mc ngha ca vic kim nh gi
thuyt
Sai lm loi I c th kim sot c nn c
ly lm v mc tin cy ca kim nh

144

Qui trnh xc nh gi thuyt v


hnh thnh cc kt lun
1. Xc nh gi thuyt m ta mun chng minh l
gi thuyt thay th Ha
2. Gi thuyt H0 l i thuyt ca Ha v cha du
=.
3. Nu thng tin mu nghing v Ha th b H0 ,xc
sut mc sai lm loi I l v ta c th cho nh
ty .
4. Nu mu khng cn c chp nhn Ha th
kt lun H0 ko b bc b da trn mu ang xt.
145
Cn thu thp thm thng tin v mu.

V d 6
Hy xt xem mt b co c phm ti no hay
ko?
A. Hnh thnh gi thuyt khng v gi thuyt thay
th khi phn x mt b co c ti hoc ko c ti.
B. Gi thch ngha ca sai lm loi I v II trong
trng hp ny.
C. Nu bn l b co, bn mun ln hay nh? Gii
thch ti sao?
D. Sai lm loi I hay II nghim trng hn?
146

(tip vd6)
Li gii
Theo lut b co l v ti cho n khi ta n chng
minh c b co l c ti, vy b co ko buc phi
chng minh c mnh v ti m ta n phi thu
thp chng c kt lun b co c ti hay ko?
A. H0 b co v ti

Ha b co c ti

147

(tip vd6)
B. Bn kt qu c th c l:

C. Sai lm loi I l rt nghim trng. cng


nh cng tt.
D. Sai lm loi I nghim trng hn loi II.
148

9.4

cc thng k kim nh v cc
min bc b
M t cch thc i n kt lun trong mt
tnh hung kim nh gi thuyt.
Gi thuyt rng qui trnh ly mu thch hp
v c thc hin
V d 7

Gi s cn kim nh gi thuyt:
H0 : = 72
Ha : > 72
Hy nu r cch thc chung tin hnh kim
nh mt gi thuyt thng k.

149

(tip v d 7)
Li gii
Bc 1: Thu c mu m bo tnh ngu
nhin t qun th m ta quan tm. Thng k
thu c (thng k kim nh) s gip ta a ra
quyt nh bc b hay chp nhn.
Bc 2: Xc nh xem thng k kim nh thu
c c ph hp vi php kim nh gi thuyt
cho hay ko?
Bc 3: Ch ra c min cc gi tr c th
tnh c ca thng k kim nh m i vi
cc gii tr ny, gi thuyt khng s b bc b.

150

(tip 9.4)
nh ngha 9.9
Thng k kim nh l mt thng k mu c
tnh t cc thng tin rt ra t mt mu, m mu
ny l c s tin hnh kt lun lin quan ti
gi thuyt khng v gi thuyt thay th.

nh ngha 9.10
Min bc b l tp hp cc gi tr c th c ca
thng k kim nh, m i vi cc gi tr ny
gi thuyt khng s b bc b.
151

Qui trnh tin hnh kim nh mt


gi thuyt
1. Thu nhn mt mu ngu nhin t qun th
cn nghin cu vi gii thuyt mu ny c
rt ra t mt qui trnh thch hp.
2. Xc nh mt thng k kim nh ph hp
vi php kim nh gi thuyt cho.
3. Xc nh min bc b
4. S dng d liu mu tnh gi tr thng k
kim nh.
5. T gi tr thng k kim nh va tnh c
quyt nh bc b hay chp nhn gi thuyt
ko.

152

V d 8
Tip v d 2. Nh nghin cu mun khng
inh rng: H0 : p = 0.80 v Ha : p > 0.80
Hy a ra mt thng k kim nh gip
quyt nh c nn loi b H0 hay ko?
Li gii:
V tham s ch l mt t l qun th p nn ta
dng t l mu
(c lng im ca p c
s dng trong th tc c lng khong)nh
mt cng c trong qui trnh ra quyt nh.
(Kim nh gi thuyt v tr trung bnh ca
qun th)

153

V d 9
Xt tip v d 1, trong ta kim nh:
H0 (1 2 = 0)
Ha (1 2 < 0)

Hy xut mt thng k kim nh thch hp


cho bi ton ny.
Li gii:
Tham s cn quan tm l s khc nhau gia hai trung
bnh ca qun th 1 2 .
Kim nh gi thuyt v s bng nhau gia hai trung
bnh tng th
154

Ch
Khi kim nh gi thuyt lin quan ti mt
tham s qun th nht nh th thng k
kim nh chnh l c lng im tng
ng ca tham s ny.
Chia tt c cc gi tr c th c thnh hai tp:
min bc b v phn b ca min.
Nu gi tr tnh c ri vo min bc b th
loi b gi thuyt khng.
Ngc li khng loi gi thuyt khng.
155

V d 10
Xt v d 7. Php kim nh gi thuyt:
H0 : = 72
Ha : > 72
Hy ch ra quyt nh ng nu thng k kim
nh c gi tr sau y:

Li gii:
a, bc b H0
b, khng bc b H0 nghing v Ha
c, kt lun ko chc chn, cn thm gi thuyt.

156

V d 11
Xt tip v d 10, hy xc nh min bc
b cho kim nh vi mc ngha = 0.5
Li gii:
Trong v d 10, trng hp c ko cn c
kt lun vy gi tr bng bao nhiu kt
lun (73 ln hn 72 loi b H0 cha?)
S dng tiu chun z-(z-score) o khong
cch gia 72 v , s o ny chun ha gi tr
ca thng k kim nh
157

(tip vd11)
Thu c gi tr z-score, gi tr ny l hp l nu gi
thuyt khng l ng. Z-score cho ta s o v khong
cch t ti gi tr trung bnh ca qun th gp bao
nhiu ln nu lch chun nu H0 l ng.

158

(tip vd11)
Xt hnh 9.1a, nu =72 th c hi nhn c
mt gi tr vt qu 72 mt khong l 1.645
ln lch chun ch l 0.5
Xt hnh 9.1b th min bc b z > 1.645

159

Tip 9.4
nh ngha 9.11
Gi tr bin ca mt min bc b i vi mt kim
nh gi thuyt c gi l gi tr ti hn.

V d 13:Xc nh min bc b cho php kim


nh gi thuyt sau:
H0 : = 72
Ha : < 72
Vi mc ngha =0.01
160

(tip vd 13)
Li gii:
VD ny tm nhng gi tr nh bc b H0
Chun ha gi tr thng k kim nh v z-score

Gi s n>130 ( phn b ly mu xp x dng


chun)

161

(tip)
Nu thc t =72 th c hi ly c mt gi tr
vt qu 72 bng 2.33 ln lch chun ch l
0.01.

162

(tip)
Ti mc ngha (xc sut sai lm loi I) bng
0.01 ta s bc b H0 i vi z < 2.33

163

V d 14
Xc

nh min bc b cho php kim nh gi thuyt


sau. Vi mc ngha =0.05
H0 : = 72
Ha : 72

164

V d 15
Xt tip VD 12. Gi s thng k sau c
tnh t mt mu ngu nhin gm n=30,
Hy thc hin php kim nh cho
H0 : = 72
Ha : > 72
Vi mc ngha = 0.05

Li gii:
Trong v d 12 ta tnh c min bc b
z>1.645

165

(tip vd 15)
Z-score c tnh nh sau:

Gi tr z ko nm trong
min bc b nn ta ko
bc b H0ko c s
ng h cho Ha
166

V d 16
Tip VD 3, gi s ly mt mu ngu nhin
c n=50, = 9.68, s= 0.6, hy thc hin
kim nh mc ngha 0.05 vi gi
thuyt H0: = 10cm v Ha: 10cm
Li gii

167

(tip vd 16)
Nhn xt gi tr tnh c nm trong min
bc b, kt lun bc b H0.

168

Bi tp
1. Mt bc s mun nghin cu xc
nh xem liu t l nhng ngi n ng
phi vo vin v bnh tim c khc vi t
l tng ng ca ph n hay ko? Hy
hnh thnh gi thuyt khng va gi thuyt
thay th v xc nh xem y l kim nh
mt hay hai chiu?
2. Ti sao chng ta nn trnh vic a ra
mt kt lun c dng chp nhn gi
thuyt H0 ?

169

Bi tp
3. Gi s chng ta mun kim nh gi
thuyt H0 : = 65 v Ha : 65 vi mc
ngha = 0.5. Hy xc nh min bc b.
4. i vi mi min bc b sau y, hy
xc nh gi tr ca (xc sut sai lm loi
I)

a. z < -1,96
b. z > 1.645
c. z < -2,58
c. z > -2,58

170

T VN
C phi trnh hc vn c tc ng ti cch
c bo? Hay c mi lin h gia trnh hc
vn v cch c bo?

171

NHN XT
Trong cc php kim nh th kim nh v
mi lin h gia cc bin l kim nh tnh c
lp.
Kim nh:
Bin nh danh nh danh
Bin nh danh th bc
Bin th bc th bc

172

KIM NH MI LIN H GA
HAI BIN NH DANH NH
DANH (TH BC)
S dng kim nh Chi bnh phng (X2 )
Cho bit c tn ti mi lin h gia hai bin tng
th hay ko?
Nhng khng cho bit mnh yu ca mi lin
h.

L thuyt c bn v kim nh gi thuyt


Sinh vin c trong ti liu km theo (chng
9,10)

173

TM TT L THUYT KIM
NH CHI BNH PHNG (X2)
1. t gi thuyt thng k
Gi thuyt khng H0 : Hai bin c lp nhau
Gi thuyt i H1 : hai bin c mi lin h vi
nhau
c

X
2

2. Tnh

(Oij Eij )
Eij

j 1

Eij

Ri C j
n
174

(tip)
X2 : i lng chi bnh phng dng kim nh
Oij : i din cho s trng hp c quan st
trong mt c th ca bng cho (tn s quan st)
Eij: i din cho s trng hp m bn mong i
gp trong nhng ca bng cho nu khng c
mi lin h gia 2 bin trong bng (tn s mong
i)
C: s ct ca bng
R: s hng ca bng
Ri : tng s quan st ca hng th i
175
Cj : tng s quan st ca ct th j

Nhn xt
X2 = 0 khi tt cc quan st bng tn s mong i
(khng c mi lin h gia cc bin)
X2 >= 0, O khc bit E cng ln th X2 cng ln
2
X
3. Tnh gi tr gii hn ( r 1)( c1),a

i lng kim nh ny c phn phi chi bnh


phng nn phi tra bng phn phi X2 tm gi
tr gii hn vi mc ngha a, s bc t do:
df = (r-1)(c-1)
Mc ngha a l kh nng ti a cho php mc sai
lm loi I.
176

(tip)
4. Tiu chun quyt nh l so snh gi tr gii
hn v i lng X2
Bc b gi thuyt H0 nu: X 2 X 2
( r 1)( c1),a

Chp nhn gi thuyt H0 nu:X X


2

2
( r 1)( c1),a

(Bng phn phi X2 c cho ti ph lc T246


Phn tch thng k s liu Bi Th Hng)
177

S DNG SPSS KIM NH X2


Analyze/Descriptive Statistics/Crosstabs/

Tra bng X2 tm gi tr gii hn vi bc t do l 15


v mc ngha 0.05 v so snh vi X2 tnh ton.
2

=24.995 < X2 = 29.884


( r 1)( c1),a
178
Vy bc b gi thuyt H0 (c nh hng)

Ch
C mt nguyn tc khc s dng trong kim nh
gi thuyt l dng P value
P value l xc sut s mc phi sai lm loi I
(xc sut loi b H0 vi nhng thng tin tnh ton
c, vy P value c cng ngha vi mc
ngha a)
Xc sut p value cng cao th cho thy hu qu ca
mc sai lm loi I cng ln.
Vy quy tc chung l khng bc b H0 nu p value
qu ln.

179

(tip)
Vi nguyn tc ny c th xem xt p value
ra quyt nh.
Nu p value < 0.1 th kim nh c ngha vi
tin cy 90% (Khi nim c ngha c hiu
l gi thuyt H0 c th b bc b vi tin cy
90%)
Nu p value < 0.05 th kim nh c ngha vi
tin cy 95%
Nu p value < 0.01 th kim nh c ngha vi
tin cy 99%
180

P-value vi SPSS
SPSS gi p value l Sig. mc ngha quan
st.
V d: X2 = 29.884 c Sig. = 0.012 (1.2%)

Quyt nh theo nguyn tc:


Chp nhn H0 nu sig. > a, v nu bc b H0 th
kh nng mc sai lm s ln hn mc ngha cho
php.
Bc b H0 nu sig. < a, v lc ny xc sut phm
sai lm nu bc b H0 nh hn mc cho php, c
th an ton khi bc b.
181
V d: p-value = 0.012 < a 0.05, bc b H0

Ch
Kim nh X2 ch c ngha khi s quan st ln .
Nu c qu 20% s trong bng cho c tn s l thuyt
nh hn 5 th X2 khng ng tin. Cn gom cc bin li
tng s quan st (dng recode).
Continuity Correction: dng bin th ca X2 , s dng
cho nhng bng dng 2x2 (bng kt hp 2 bin, mi bin
c 2 biu hin)
Likelihood ratio: l mt s thng k tng t X2 vi
nhng c mu ln kt qu ca 2 thng k ny rt gn
nhau.
Linear by Linear Association: o lng mi lin h
tuyt tnh gia 2 bin. S thng k ny ch hu dng khi
bin hng, ct c sp th t t nh ti ln
182

MT S I LNG THNG K
KHC V MI LIN H GIA 2
BIN NH DANH
Kim nh X2 khng cho bit mnh ca mi
lin h, khc phc ta c th dng:
Lambda
Cramer V
H s lin hp (coefficient of contigency)

183

Cramer V
Cramer V c tnh da trn X2 v l mt kim
nh trc tip mi lin h gia 2 bin.
Cramer V cho bit mnh ca mi lin h gia
cc bin nh danh.

X
N (k 1)

k, s hng hoc s ct trong bng, chn k no nh


hn.
N: s quan st trong mu.

184

H s lin hp (Coeficient of
contigency)
L mt ch s nh gi mc tng quan
gia 2 bin.

X
(0

1)
2
X N

N: qui m mu
C=0 khi gia hai bin khng c lin quan g

185

Lambda (L/)
Php o lng lin h ca cc bin nh danh
cung cp cho ngi tin hnh nhng cm nhn
d dng v kh nng gii thch trc tip.
Lambda cho bit liu cc tr s ca mt bin c xu
hng tp trung quanh mt s tr s no ca
bin kia hay ko?
Nu c th khi bit c tr s ca bin c lp ta
c th d on c tr s ca bin ph thuc.

186

V d
Nu bit trc c i tng c hc vn cp 3 th c th
d on c cch thc c bo ca i tng tt
hn d on m khng bit hc vn.
Nu =0.33 cho thy rng nu bn bit gi tr ca
bin ph thuc tt hn 33% so vi khng bit g v
bin ph thuc.

187

KIM NH MI LIN H GIA 2


BIN TH BC
V d:
Nghin cu mi lin h gia tui tc v mc
quan tm i vi ch gia nh trn bo SGTT?

Nhn xt v 2 bin trn


t gi thuyt khng v gi thuyt thay th
188

KIM NH MI LIN H GIA 2


BIN TH BC
Nhn xt
C hai yu t ny u l d liu th bc v n c
phn hng.
Gi thit H0: tui tc khng c mi lin h vi mc
quan tm n ch gia nh trn bo SGTT.
Gi thuyt Ha?
Gii php gip pht hin mi lin h tt hn chi
bnh phng
Tau-b ca Kendall
d ca Somer
189
Gamma ca Goodman v Kruskal.

Gamma ca Goodman v Kruskal


Gamma l mt thc o ph bin v d cm
nhn, v tr s ca n nm trong khong t -1
ti +1, gi tr 0 i din cho s c lp hon
ton.
Gi thuyt H0 (gamma): tng th chung = 0
(khng c mi lin h gia cc bin th bc)
Nu kt qu kim nh cho php bc b H0 th kt
lun 2 bin th bc c mi lin h v gi tr
gamma ca mu tnh c xp x gi tr gamma
ca tng th chung.
190

Gamma ca Goodman v Kruskal


V d: kim nh mi lin h gia tui tc v mc
quan tm ti ch gia nh trn bo SGTT

191

Tab-b ca Kendall
Gamma v n c xu hng thi phng mi lin
h gia cc bin bi nhng d liu n b khng
xt n trong qu trnh tnh ton (do quy tc tnh
ca gamma)
Tau-b s dng hu ht d liu nn s gn nh
lun lun nh hn ca gamma v vy n ng tin
cu hn khi o lng mi lin h.
Tuy nhin rt kh kim tra mc ngha ca tau-b
trong lnh vc nghin cu, cng thc tnh n li
kh v khng sn bng tra cu.
192

Tab-b ca Kendall
V d: kim nh mi lin h gia tui tc v mc
quan tm ti ch gia nh trn bo SGTT
vi gi thuyt H0 l: tng th chung = 0

193

BI TP THC HNH
Xem xt tt c cc vn cn kim nh sau,
cho bit s dng k thut no kim nh?
Gii thch ti sao v tin hnh kim nh, a
ra kt lun cho php kim nh:
1. C kin cho rng c mi lin h thu nhp bnh
qun thng v gii tnh hay thnh ph sinh sng,
hy kim nh kin trn.
2. C hay khng mi lin h gia trnh hc vn
v cch c bo?
194

Chng 5
PHN TCH LIN H GIA BIN
NGUYN NHN NH TNH V BIN
KT QU NH LNG
(KIM NH TRUNG BNH TNG TH)

195

KIM NH GI THUYT V TR TRUNG


BNH CA MT TNG TH
V d: C ngi cho rng tui trung bnh ca
c gi bo SGTT l 30 tui, vi d liu c
c bn lm th no kim nh c
kin trn?
Thc hin:
Lc ra cc i tng c gi bo SGTT
t gi thuyt khng
Kim nh theo yu cu

196

KIM NH GI THUYT V TR TRUNG


BNH CA MT TNG TH
1. t gi thuyt H0: Tui trung bnh ca c gi bo SGTT=30
2. Dng lnh Count chuyn cc bin Category t cu c2a.1
ti c2a.9 thnh bin Dichotomy vi bin hin 1 l ngi c
c bo SGTT v 0 l ngi khng c bo SGTT.
3. Dng lnh Select case lc ra cc trng hp c bo SGTT
(ch thc hin kim nh trn cc trng hp ny).
4. Thc hin kim nh: Analyze/ Compare Means/ One
Sample T-Test
5. a bin tui vo khung Test Varialbe, khai bo Test Value =
30.
6. Chn mc tin cy ca php kim nh
7. c kt qu .
197

KT QU KIM NH

Nhn xt kt qu?

198

KT QU KIM NH
Gii thch ngha cc gi tr:

Mean: gi tr trung bnh


Std.Deviaton - SD: lch chun
Std.Error Mean - SE: sai s chun (SD/sqrtN)
t: gi tr ti hn gi tr kim nh t (t hai ui)
df : s bc t do (l i lng hiu chnh chch
cho phng)
Mean differrent: sai bit gia TB mu v gi tr l
thuyt (m-)
95% Confident interval of the difference: Khong
c lng mu vi tin cy 95% (upper lower:
199
gii hn trn di)

KT QU KIM NH
Sig = 0.001 < = 0.05: s khc bit c
ngha thng k -> chp nhn Ha

200

KIM NH GI THUYT V TR TRUNG


BNH CA HAI TNG TH (MU C LP)
V d: So snh gia 2 thnh ph H Ni v TP
HCM v s nhn khu trung bnh ca cc h
gia nh.
Nhn xt hai bin kim inh?
Nhn xt v yu cu kim nh trn?
Phng n thc hin?

201

KIM NH GI THUYT V TR TRUNG


BNH CA HAI TNG TH (MU C LP)
Nhn xt
Bin nh lng s nhn khu, nh tnh l thnh
ph
Cn so snh tr trung bnh v mt ch tiu nghin
cu (s nhn khu) gia hai i tng (TP H Ni
v HCM)
S dng php kim nh tr trung bnh 2 mu c
lp (Independent samples T-Test)

202

KIM NH GI THUYT V TR TRUNG


BNH CA HAI TNG TH (MU C LP)
Ch :
i vi php kim nh tr trung bnh ca 2 mu
c lp th s khc bit t chnh ni ti ca mu
ch khng phi do cc nguyn nhn khc
Khi c nhiu yu t gy ra s khc bit gia 2 tr
trung bnh th chn 2 nhm mu kim nh nh th
no cho c s tng ng hon ton trong
tng cp quan st v cc yu t c kh nng tc
ng n vn ta mun kim tra c s khc bit
hay khng (Paired samples design).
203

CH (Cont.)
Tt c cc quan st xem nh l c chn ngu nhin
c lp t 2 tng th cho phn phi chun v phng
sai bng nhau (Independent samples design).
Nu kim nh gi thuyt v tr trung bnh ca 2 mu
c lp vi phm gi thuyt l 2 mu ngu nhin t 2
tng th c phn phi chun th chng ta s dng kim
nh Mann Whitney.
Trc khi thc hin kim nh Independent
samples T-Test, thc hin php kim nh Levene test
kim nh s bng nhau v phng sai.
Gi thuyt H0 rng phng sai ca 2 tng th bng nhau, nu
kt qu kim nh cho bn mc ngha quan st nh nhn
204
0,05 bn c th bc b gi thuyt H0.

THC HIN KIM NH


(Independent samples design)
1. Chn Analyze/Compare Means/ Independent
samples T-Test.
2. a cc bin nh lng mun kim nh tr
trung bnh vo Test Variable, bin nh tnh
vo Grouping Variable.
3. Sau khi chn bin phn nhm, chn Define
Groups ch nh 2 nhm cn so snh.
4. c kt qu
205

THC HIN KIM NH


(Independent samples design) Cont.
c kt qu
Nu sig. trong kim nh Levene < 0.05 th phng sai
gia 2 nhm khc nhau, s dng kt qu kim nh t
phn Equal variances not asumed.
Ngc li, c kt qu phn Equal variances assumed.

S dng kt qu phn Equal variances not


assumed cho kim nh t.
Nu Sig. trong kim nh t< 0.05 th kt lun c s khc
bit c ngha v trung bnh gia 2 thnh ph.
Ngc li cha c s khc bit c ngha v tr trung
bnh gia 2 thnh ph.
206

KT QU KIM NH

207

KT QU KIM NH
Sig. ca kim nh Levene = 0.01 < 0.05
--> s dng kt qu kim nh t phn Equal
variances not asumed.
Sig. ti Equal variances not asumed = 0.00
Bc b gi thuyt H0 v kt lun s nhn khu
trung bnh trong h gia nh TP HCM khc
(ln hn) mt cch c ngha thng k so vi
H Ni.
208

KIM NH TR TRUNG BNH CA HAI


MU PH THUC (Paired-samples T-test)
y l loi kim nh dng cho 2 nhm tng th c
lin h vi nhau.
D liu ca mu thu thp dng thang o nh
lng khong cch hoc t l.
Qu trnh kim nh s bt u vi vic tnh ton
chnh lch gi tr trn tng cp quan st bng php
tr, sau kim nghim xem chnh lch trung bnh
ca tng th c khc 0 khng, nu khc 0 tc l
khng c khc bit.
209

KIM NH TR TRUNG BNH CA HAI


MU PH THUC (Paired-samples T-test)
Li th ca php kim nh mu phi hp tng
cp l n loi tr c nhng yu t tc ng bn
ngoi vo nhm th.
Phng php kim nh ny rt thch hp vi
dng th nghim trc v sau.
V d: Kim nh s khc bit v 2 loi u
phng ch bin trc v sau khi tin hnh ci tin.
Tin hnh nh gi trn cng mt nhm ngi th.
So snh gia 2 nhm ngi khc nhau th s nh
gi b nh hng bi khu v, nhn thc, kinh
210
nghim

CH
iu kin p dng Paired-samples T-test l
kch c 2 mu so snh phi bng nhau, chnh lch
gia cc gi tr ca 2 mu phi c phn phi
chun hoc c mu ln xem nh xp x
phn phi chun.
Nu iu kin v phn phi chun khng c
tha mn hay c mu khng ln th s dng
kim nh phi tham s.
Gi thuyt H0: khng c s khc nhau v 2 tr
trung bnh ca tng th.
211

THC HIN KIM NH


S dng b d liu Dauphong.sav
1. Vo Analyze/Compare Means/ Paired-samples Ttest
2. Chn 2 bin cha cc gi tr ca 2 mu cn quan st
a vo Paired Variables so snh.
3. Chn tin cy ti hp thoi Confidence Interval.
4. c kt qu

212

KT QU KIM NH

213

KT QU KIM NH
Sig. = 0,036 < 0,05, bc b H0 (c s chnh
lch c ngha thng k v s nh gi ca
ngi tiu dng trc v sau khi ci tin sn
phm u phng)

214

TNG KT
So snh tr trung bnh ca mt tng th vi mt
gi tr c th no ta s thc hin php kim
nh gi thuyt v trung bnh tng th. (OneSample T-Test )
So snh hai tr trung bnh ca hai nhm tng th
ring bit ta thc hin php kim nh gi thuyt
v s bng nhau ca 2 trung bnh tng th da
trn hai mu c lp rt ra t hai tng th ny.
(Independent-Sample T-Test)
215

TNG KT
So snh hai tr trung bnh ca hai nhm tng th
ring bit c c im l mi phn t quan st
trong tng th ny c s tng ng theo cp vi
mt phn t tng th bn kia ta s dng kim
nh gi thuyt v s bng nhau ca hai trung
bnh tng th da trn d liu mu rt t hai tng
th theo cch phi hp tng cp (Paired-Sample
T-Test)

216

BI TP THC HNH

Xem xt tt c cc vn cn kim nh sau, cho


bit s dng k thut no kim nh? Gii
thch ti sao v tin hnh kim nh, a ra kt
lun cho php kim nh:
1. C ngi cho rng mi gia nh c trung bnh 3
ngi c bo SGTT v 2 ngi xem trang qung
co. Hy kim nh kin trn
2. Kim nh mi lin h gia s lng ngi c bo
v thu nhp bnh qun thng ca h gia nh

217

Chng 6
PHN TCH MI LIN H GIA BIN
NGUYN NHN NH TNH V BIN
KT QU NH LNG
(PHN TCH PHNG SAI)

218

PHN TCH PHNG SAI MT YU T


(ANOVA)
V d: So snh c s khc bit hay khng v yu
t c t do c nhn i vi cuc sng ca nhng
6 nhm hc vn khc nhau

219

V D (tip)
Nhn xt:
Bin trnh hc vn: bin nh tnh
Bin c t do c nhn: bin nh lng
C 6 nhm phn loi khc nhau

Phng php gii quyt


S dng kim nh tr trung bnh ca cc tng th chia
thnh 13 nhm khc nhau -> khng hiu qu, sai s
ln.
S dng phn tch phng sai (ANOVA), tin hnh
kim nh tt c cc nhm cng 1 lc vi sai s chung
l 5%.
220

PHN TCH PHNG SAI MT YU T


(ANOVA)
Phn tch phng sai l s m rng ca kim
nh t, phng php ny gip ta so snh tr trung
bnh ca 3 nhm tr ln.
K thut phn tch phng sai c dng
kim nh gi thuyt cc tng th nhm c tr
trung bnh bng nhau.
SPSS c 2 th tc phn tch phng sai:
ANOVA mt yu t (s dng mt yu t phn loi
v cc quan st thnh cc nhm khc nhau.
ANOVA nhiu yu t ( khi c t 2 yu t phn loi221
tr ln)

L THUYT PHN TCH PHNG SAI


MT YU T (One Way ANOVA)
Mt s gi nh i vi One Way ANOVA:
Cc nhm so snh phi c lp v c chn mt
cch ngu nhin
Cc nhm so snh phi c phn phi chun hoc c
mu phi ln c xem nh l tim cn phn
phi chun
Phng sai ca cc nhm so snh phi ng nht
Nu gi nh tng th c phn phi chun vi phng
sai bng nhau khng p ng c th s dng kim
nh phi tham s Kruskal Wallis thay th.
222

L THUYT PHN TCH PHNG SAI


MT YU T (One Way ANOVA)
Gi thuyt H0 cn kim nh l trung bnh tng
th ca k nhm l bng nhau:
H0: 1 = 2 = 3 = = k (khng c s khc bit gia
cc trung bnh nhm c phn loi theo bin nh
tnh)

223

L THUYT PHN TCH PHNG SAI


MT YU T (One Way ANOVA)
Trnh t tnh ton:
1. Tng cc chnh lch bnh phng trong ni b
nhm: phn nh bin thin ngu nhin do nh
hng ca cc yu t khc khng xem xt y.
2. Tng cc chnh lch bnh phng gia cc nhm:
phn nh bin thin ca bin nh lng ang
nghin cu do tc ng ca bin phn loi xem xt
ti.
3. Tng cc chnh lch bnh phng ton b: phn nh
ton b bin thin ca bin nh lng ang nghin
cu.
224

THC HIN PHN TCH ONE-WAY


ANOVA
1. Chn Analyze/Compare mean/One way
ANOVA
2. a bin nh lng vo khung Dependent List
v bin phn loi v khung Factor
3. Chn thc hin thng k cc i lng thng k
m t Descriptive v kim nh s bng nhau
gia cc phng sai nhm Homogeneity of
variance.
225

THC HIN PHN TCH ONE-WAY


ANOVA
Nhn xt:
Nu H0 c chp nhn th cng vic xong.
Nu H0 b bc b th cn thc hin tip th tc kim
nh nhm xc nh c th trung bnh nhm no khc
nhm no, tc l tm xem s khc bit gia cc nhm
xy ra u.

226

C KT QU PHN TCH ONE-WAY


ANOVA

T bng kt qu kim nh
phng sai: =.226 < 0,05 Vy
phng sai cho bit khng
khc nhau mt cch c ngha
gia cc nhm hc vn khc
nhau => Kt qu phn tch
227
ANOVA c th s dng c.

C KT QU PHN TCH ONE-WAY


ANOVA

228

C KT QU PHN TCH ONE-WAY


ANOVA
Vi mc ngha quan st = .137 > 0.05
Vy khng c s khc bit c ngha thng k v
s nh gi tm quan trng ca yu t c t do c
nhn gia cc nhm ngi c trnh hc vn
khc nhau.

Nu chp nhn tin cy l 85% th sao???

229

XC NH CH KHC BIT
Phn tch ANOVA chuyn su
C 2 phng php xc nh s khc bit trong cc
tr trung bnh nhm xy ra u, l kim nh
trc v kim nh sau.
Kim nh trc c th nh ngha nh l kim nh
cc gi thuyt v s khc nhau ca cc trung bnh
nhm trc khi thc hin phn tch ANOVA.
Thc hin vic xc nh nhng chnh lch c th gia
cc trung bnh nhm theo phn on ch nh ca
ngi kim nh.
Kiu kim nh ny c thc hin trong hp thoi
Contrasts vi tn gi l kierm nh Priori Contrasts 230

XC NH CH KHC BIT
Kim nh sau
L kim nh cc gi nh v s khc nhau ca
cc trung bnh nhm sau khi thc nhin phn
tch ANOVA.
Trong phm vi gio trnh ny ta chn phng php
kim nh sau tip cn.
Kiu kim nh ny c thc hin trong hp thoi
Post Hoc.
Kim nh trong hp thoi Post Hoc c cc phng
php kim nh thng k sau so snh cac tr trung
bnh ca cc nhm.
231

XC NH CH KHC BIT
Kim nh sau (tip)
Kim nh trong hp thoi Post Hoc c cc
phng php kim nh thng k sau so snh
cac tr trung bnh ca cc nhm.
LSD. Php kim nh ny chnh l vic dng kim
nh t ln lt cho tng cp trung bnh nhm. Nhc
im l tin cy khng cao.
Bonferroni. Tin hnh ging quy tc ca LSD nhng
iu chnh c mc ngha khi so snh bi da trn
s ln tin hnh so snh. y l th thc n gin hay
c s dng.
232

XC NH CH KHC BIT
Kim nh sau (tip)
Tukey: S dng kh ph bin cho vic tm kim cc
trung bnh nhm khc bit. N s dng bng phn phi
Studentize range distribution. Tukey hiu qu hn
Bonferroni khi s lng cc cp trung bnh cn so snh
l ln.
Scheffe: Phng php ny km nhu hn trong vic so
snh c tr trung bnh ca cc cp, n i hi phi c s
khc bit ln gia cc tr trung bnh so vi cc th thc
so snh bi khc m bo rng c s khc bit tht
s, nhng v th n a ra kt qu kim nh thn trng
hn.
233

XC NH CH KHC BIT
Kim nh sau (tip)
R-E-G-W: Thc hin 2 bc kim nh, u tin n
tin hnh kim nh li ton b cc tr trung bnh nhm
xem c bng nhau khng, nu khng bng th bc k
tip n s kim nh tm cc nhm no khc bit tht
s vi nhau v tr trung bnh. Nhng kim nh ny
khng ph hp vi kch c cc mu khng bng nhau.
Dunnett: Th tc cho php chn so snh cc tr trung
bnh ca cc nhm mu cn li vi tr trung bnh ca
mt nhm mu c th no c chn ra so snh
(SPSS mc nh l nhm cui).
Trong trng hp phng sai gia cc i tng cn so
snh khc nhau, ngi ta hay chn Tamhanes T2. 234

V D
Chn kim nh Dunnett, la chn mc nh
nhm cui cng.
Kt qu ???

235

PHN TCH ANOVA HAI YU T


V d: Kim nh s
nh hng ca mc
yu thch ngnh hc v
thi gian t hc ti kt
qu hc tp ca sinh
vin.

236

PHN TCH ANOVA HAI YU T


Gi thuyt cho kim nh ANOVA hai yu t nh
sau:
Tng th c phn phi chun: tng th m t mu
nghin cu phi c phn phi chun
Phng sai ng u: Phng sai nhm nghin cu
phi u nhau

237

PHN TCH ANOVA HAI YU T


t gi thuyt H0 nh sau:
im trung bnh hc tp (TB) ca sinh vin c thi
gian t hc khc nhau u bng nhau
TB ca sinh vin c mc yu thch ngnh hc
khc nhau u bng nhau
Khng c nh hng tng tc gia thi gian t hc
v mc yu thch ngnh hc ca sinh vin.

238

PHN TCH ANOVA HAI YU T


Cch thc tin hnh lnh:
1. Chn Analyze/General Liner Model/ Univariate
2. a bin TB vo khung Depentdent variable v 2
bin cn li vo khung Fixed Factor.
3. Xc nh cc cp trung bnh tng th khc nhau theo
yu t nghin cu th nht l thi giant t hc
4. Xc nh cc cp trung bnh tng th khc nhau theo
yu t th hai l mc yu thch ngnh hc.

239

C KT QU PHN TCH

Kt qu kim nh Levenes =.389>.05


gi nh v s bng nhau v phng sai ko b vi
phm.
240

C KT QU PHN TCH

Mc ngha = .000 < 0.005 => bc b gi


thuyt H0 => Phn tch ANOVA chuyn su (kim
nh Tukey)
241

C KT QU PHN TCH TUKEY


Xc nh cc cp trung bnh tng th khc nhau theo
yu t Thi gian t hc

Tt c cc gi tr sig < 0.05 =>bc b gi thuyt H0 (SV


c thi gian t hc khc nhau c TB khc nhau) 242

C KT QU PHN TCH TUKEY


Xc nh cc cp trung bnh tng th khc nhau
theo yu t Yu thch ngnh hc

Sig=.815 > .05 =>Sv c mc yu thch ngnh hc


thch hoc ko thch lm ko c s khc bit v TB.
243

C KT QU PHN TCH TUKEY


Biu

244

Chng 7
KIM NH PHI THAM S

245

NHN XT
Hu ht cc kim nh thng k hc u i
hi nhng gi nh cht ch v phn phi chun
ca tng th m t mu c chn ra.
Tuy nhin trong phn tch s liu thng k, khng
phi lc no cng gp c cc tnh hung tha
mn hon ton cc gi nh cn thit ny, c bit
khi b mu c s lng nh. Khi phi s dng
cc th tc kim nh t nghim ngt hn v phn
phi d liu th tc kim nh phi tham s.
246

NHN XT (Tip)
Nhc im ca kim nh phi tham s l: kh
nng tm ra c nhng khc bit tht s ca
chng km hn kim nh tham s.
Kim nh phi tham s ch hu dng cho nhng trng
hp khng th s dng kim nh tham s thng
thng hoc mu c nhng gi tr quan st bt
thng.
Kim nh phi tham s cng ph hp trong cc trng
hp d liu th bc, hoc khong cch khng c phn
phi chun r rng.
247

Cc kim nh phi tham s thay th cho kim


nh tham s

248

V D
V d: Xem xt li minh ha v ci tin ca sn
phm u phng trc v sau khi ci tin v chng
ta c th nghi ng rng mu khng tha mn gi
nh v phn phi chun ca tng th cc chnh
lch, do kt qu kim nh ca chng ta phn
Paired samples t-test cha chnh xc.
Gi thuyt H0: khng c khuynh hng thch sn
phm loi ny hn so vi sn phm loi kia trong ton
b ngi tiu dng.

249

KIM NH DU (SIGN TEST)


Kim nh du l mt th tc phi tham s n
gin nht c s dng cho hai mu lin h trong
tnh hung so snh s khc nhau ca tr trung bnh
ca 2 tng th m khng cn gi thuyt no v
hnh dng ca hai phn phi ny.

250

TRNH T KIM NH DU
So snh tng cp im nh gi ca tng ngi
i vi 2 tnh hung c th, ly im ngi
nh gi sn phm sau tr i im nh gi cho
sn phm trc.
Ghi du + nu sn phm sau ci tin hn sn phm
trc v ngc li cho du - nu khng ci tin,
trong trng hp gi tr = 0 th khng xt ti.
Nu i theo gi thuyt H0 ca bi ton rng trong tng
th ngi tiu dng khng c khuynh hng thch sn
phm loi ny hn so vi loi kia th xt v du kh
nng gp 1 du + hay mt du - l nh nhau
(50%).
251

TRNH T KIM NH DU
Gi thuyt H0 ca bi ton chuyn thnh:
H0: Xc sut mt ngi tiu dng no nh gi
sn phm sau ci tin hn sn phm trc (hoc
ngc li) l 0,5.

Gi tr kim nh T bng s lng cc du +


m c so vi cc gi tr ti hn tnh ra t phn
phi nh thc.

252

BNH MU

253

NHN XT

C: 12 du + v 4 du => T = 12 (n = 16)
H0 : p = 0,5
H1 : p 0,5
Gi tr kim nh T =12 (tng s du cng)
Gi tr gii hn u tin C1 c tnh ra t bng
phn phi nh thc (vi n l s n v chnh lch
khc 0 v p=0,5) sao cho gn nht vi mc
ngha /2. Gi tr gii hn C2 = n C1

254

NHN XT (Tip)

Nu C1 T C2 : chp nhn gi thuyt H0 ,


ngc li bc b gi thuyt H0
V d trn vi n = 16, p = 0,5 v /2 = 0,025 ta
thy trong bng ch c 0,0278 l gn vi 0,025
nht, tng ng vi gi tr gii hn C1 = 4 (tht ra
nu gn bng ng vi 0,025 th C1 3,9). V th
C2 = 16 3,9 = 12,1.
Ta c : 4 T=12 12,1 => chp nhn gi thuyt
H0 nu chn mc ngha 0,05
255

NHN XT (Tip)
Cch tnh P-value : (a>b, n=16, p=0,5)
a l s du cng v b l s du tr

/2 = P(a 12) = P(b 4) =


0,0278+0,0085+0,0018+0,0002 = 0,0383
= 2 x 0,0383 = 0,0766 0,077

256

THC HIN KIM NH DU BNG SPSS


1. Analyze/ Nonparametric Test/ 2 Related Sample
2. Chn bin a vo khung Test Pair
Wilcoxon: Kim nh du v hng Wilcoxon
Sign: Kim nh du
McMemar: Kim nh McMemar l dng kim nh
du p dng cho bin Dichotomous.

3. Ty chn cc tnh ton v c kt qu.

257

C KT QU KIM NH

258

C KT QU KIM NH

Mc ngha sig = .077 > .025 => ngi tiu dng


thch cc sp trc v sau ci tin l khc nhau.
Nhng cha chp nhn nh gi sp trc tt
hn sp sau (Pari T Test kt lun chnh xc hn).
259

V D 2
Cho bng mu

260

NHN XT

C 2 du + v 5 du => T = 2 (n = 7)
H0 : p = 0,5
H1 : p 0,5
=>Gi tr kim nh T = 2
Gi tr gii hn C1 c tnh ra t bng phn phi nh
thc (vi n=7 v p=0,5) sao cho gn nht vi mc
ngha /2. Gi tr gii hn C2 = n C1
Nu C1 T C2 : chp nhn gi thuyt H0 , ngc
li bc b gi thuyt H0
261

NHN XT (Tip)
V d trn vi n = 7, p = 0,5 v /2 = 0,025 ta thy
trong bng ch c 0,0547 l gn vi 0,025 nht,
tng ng vi gi tr gii hn C1 = 1 (tht ra nu
gn bng ng vi 0,025 th C1 0,5). V th C2 =
71=6
Ta c :1 T=2 6 => chp nhn gi thuyt H0 nu
chn mc ngha 0,05

Cch tnh P-value : (a<b, n=7, p=0,5)


a l s du cng v b l s du tr, /2 = P(a 2) =
P(b 5) = 0,1641+0,0547+0,0078 = 0,2266
= 2 x 0,2266 = 0,4532
262

KIM NH DU V HNG WILCOXON


Kim nh du ch xt chiu hng nn n gin
nhng khng mnh
Kim nh du v hng Wilcoxon khc phc c
nhc im ny:
S dng lun c thng tin v ln ca chnh lch
Gi thuyt rng phn phi ca 2 tng th l ging
nhau.

Gi thuyt H0: hai tr trung bnh ca 2 tng th l


nh nhau
263

KIM NH DU V HNG WILCOXON


Kim nh du v hng Wilcoxon:
Cc chnh lch c xp hng theo ln khng tnh
n du ca chng. im cn bng th hng ca chng
c tnh bnh qun.
Sau tnh tng cc hng i vi cc chnh lch
dng v i vi cc chnh lch m. Gi tr tng hng
no nh nht s l gi tr T ca kim nh ny.
Qui tc quyt nh l mc ngha a, bc b gi
thuyt H0 nu T<Ta vi T a l gi tr tra bng phn
phi ca kim nh Wilcoxon (trong trng hp mu
ln c th dng bng phn phi chun thay cho phn
phi ca kim nh Wilcoxon).
264

BNG MU
QS

Trc

Sau

Du

Hng

Hng

(+)

(-)

(7)

(8)

(9)

Th hng

(1)

(2)

(3)

(4)

(5)

(6)

15

19

20

+1

5,5

+1

5,5

-1

+1

5,5

+1

5,5

+1

5,5

-1

13

+1

5,5

14

10

+1

5,5

17

-1

10

+2

11

13,5

10

+2

12

13,5

11

+2

13

13,5

12

-2

14

16

+2

15

13,5

18

+2

16

13,5

5,5

5,5

5,5

13,5

Tng hng

106

265
30

Hng trung bnh

8,83

7,50

NHN XT
Th t quan st ca b mu?
Gii thch cc ngha v cch tnh ca cc ct?

266

NHN XT
Gi thuyt H0 : phn phi ca hai tng th ging nhau (
hay Ho: = )
Gi tr kim nh T l gi tr tng hng no nh nht
(T = 30)
Tra bng phn phi Wilcoxon vi n=16 (khng xt 4
cp c chnh lch = 0) vi mc ngha chn
(T0,025 = 30)
Nu T T/2 : bc b gi thuyt H0 , ngc li chp
nhn gi thuyt H0

V d trn vi T = T/2 = 30 => bc b gi thuyt


H0 vi mc ngha = 0,05
267

THC HIN KIM NH TRN SPSS


1. Analyze/ Nonparametric Test/ 2 Related Sample
2. Chn bin a vo khung Test Pair
Wilcoxon: Kim nh du v hng Wilcoxon
Sign: Kim nh du
McMemar: Kim nh McMemar l dng kim nh
du p dng cho bin Dichotomous.

3. Ty chn cc tnh ton v c kt qu.

268

C KT QU KIM NH

Hng trung bnh chnh lch m l


7.5 , dng l 8.83.
C 4 quan st c gi tr bng nhau
Sig = 0.042 > 0.025 => bc b H0
269

KIM NH MANN - WHITNEY2 MU


C LP
L php kim nh ph bin nht kim nh gi
thuyt v s bng nhau ca hai trung bnh mu
c lp khi cc gi nh khng tha mn.
Gi thuyt H0: 2 trung bnh ca 2 nhm tng th
bng nhau.
Kim nh khng quan tm ti hnh dng ca phn
phi 2 nhm nhng chng phi c cng hnh dng vi
nhau.
Kim nh c th s dng vi bin th bc.

270

V D
Kho st tui th ca cc bng n trn hiu A v
B. C 7 bng hiu A v 5 bng hiu B c kho
st v ghi nhn tui th.
Quan st

Hiu A

Hng

Quan st

Hiu B

Hng

2400

3,5

3800

11

3900

12

2300

3200

2600

10

2900

2400

3,5

11

3400

10

2800

12

2700

2100

Tng hng

33

Hng TB

4,71

45
9 271

NHN XT
Gi thuyt H0 : phn phi ca hai tng th ging
nhau ( hay Ho : = )
thc hin kim nh th cc quan st ca 2 mu
c kt hp v xp hng t gi tr min max.
Cch tnh hng?

272

TRNH T KIM NH
1. Analyze / Nonparametric Test/ 2 Independent
Sample
2. a bin vo khung Test Variable List v
Grouping Variables.
3. Chn kim nh Mann Whitney v c kt qu.

273

C KT QU

Exact Sig. :Nu ton b c


mu < 30
Asymp. Sig. : mc ngha
quan st
=> v c mu = 12 nn mc
ngha quan st sig. = 0.048 >
0.025 => bc b H0
274

KIM NH KRUSKAL - WALLIS


Kim nh Kruskal Wallis l phng php kim
nh gi thuyt tr trung bnh ca nhiu nhm tng
th bng nhau hay chnh l phng php phn tch
phng sai mt yu t m khng i hi bt k
gi nh no v phn phi chun ca tng th.
Khi ch c 2 nhm tng th mun so snh tr trung
bnh, kim nh KrusKal Wallis tng t kim nh
Mann Whitney.

275

TH TC KIM NH KRUSKAL WALLIS


Tt c cc quan st ca ba nhm c gp li vi
nhau xp hng.
Sau hng ca cc quan st trong tng nhm
c cng li v i lng thng k KrusKal
Wallis H c tnh t cc tng hng ny.
i lng H ny xp x mt phn phi Chi bnh
phng vi gi thuyt H0 l c ba nhm ny c
phn phi ging nhau.

276

V D
Xem xt phn phi ca tui th bng n ca 3
nhn hiu A, B, C c ging nhau hay khng.
Gi thuyt H0 l khng c s khc bit v tui th
trung bnh ca 3 loi bng n.
Quan

Hiu

st

2400

Quan

Hiu

Quan

Hiu

st

st

6,5

3900

17

13

3000

13

3800

16

3200

14

14

2100

2,5

2300

10

2900

12

15

1800

2600

8,5

11

3400

15

16

2200

2400

6,5

12

2700

10

17

2600

8,5

2800

11

2100

2,5

TC

Hng

56

Hng

68

Hng

277

29

THC HIN KIM NH


1. Analyze/ Nonparametric Test/ K Independent
Sample
2. a bin vo khung Test Variable List v
Grouping Variables.
3. Chn khong nhm cn so snh.
4. Xc nh cc gi tr ca bin nhm, chn kim
nh Kruskal Wallis H v c kt qu.

278

C KT QU

Mc ngha quan st sig = 0.04 > 0.025


=> bc b gi thuyt H0
=> cn xc nh cc cp trung bnh
no khc nhau. Phng php xc nh
tng t nh phng php Tukey
trong phn tch ANOVA chuyn su
279

CH
So snh kt qu kim nh Kruskal Wallis v
One way ANOVA vi v d trn.
Kt lun???
Nu c 2 phng php cho cng kt qu -> ok
Nu 2 phng php cho kt qu khc nhau th cn tm
hiu ti sao v kim tra li s liu hoc s dng
phng php kim nh khc mnh hn.

280

KIM NH CHI - BNH PHNG MT


MU
Kim nh Chi bnh phng thng c s
dng kim nh mi lin h gia 2 bin nh
tnh.
Ngoi ra cn xem xt ph hp ca d liu vi
gi thuyt v phn phi ca tng th

281

V D
Mt cng ty mun nghin cu cc v tai nn lao
ng c xy ra nh nhau vo cc ngy lm vic
trong tun hay l c xu hng tng vo cc ngy
th Hai v cc ngy cui tun?

Tn s thc t

Tn sut thc t

Tn s k vng

Tn sut k vng

(Oi)

(%)

(Ei=n.pi)

(pi)

Th hai

21,0

5,3

1/6

Th ba

9,4

5,3

1/6

Th t

9,4

5,3

1/6

Th nm

6,3

5,3

1/6

Th su

15,6

5,3

1/6

Th by

12

37,5

5,3

1/6

n=32

100,0

Total

282

NHN XT
Ta lp lun rng nu gi thuyt cho rng cc v tai
nn xy ra vi xc sut nhu nhau trong 6 ngy lm
vic ca tun l ng th xc sut xy ra tai nn ca
mi ngy phi l nh nhau tc l bng 1/6.
Vi tng s 32 v tai nn lao ng cng ty thu thp
c trong vng 5 nm qua t nh my, s lng cc
v tai nn trong tng ngy phi bng nhau tc l 32/6
= 5.3 v

Gi thuyt H0: kh nng xy ra cc v tai nn lao


ng vo cc ngy lm vic trong tun l nh
nhau, ta s dng kim nh Chi bnh phng mt
mu.
283

NHN XT (tip)
H0: tng th c phn phi xc sut bng nhau l
1/6
Ei c tnh trn c s gi thuyt H0
2
(O

E
)
2
i
i

Gi tr kim nh :

Ei
i 1
k

Gi tr gii hn
tra bng phn phi Chisquare vi bc t do k-1 v mc ngha chn.
2
k 1,a

Bc b gi thuyt H0 nu :
2

2
k 1,a
284

THC HIN KIM NH


1. Analyze/ Nonparametric Test/ Chi square
2. a bin vo khung Test Variable List.
3. Xc nh cc la chn hoc s dng mc nh
ca SPSS v c kt qu

285

C KT QU KIM NH
Sig = 0,023 < 0,025 vy c
th chp nhn gi thuyt
Ha, tc l cc v tai nn c
xu hng tng cao vo
ngy cui tun v th 2.

286

V D
Kim nh li kt qu c phi kh nng xy ra tai
nn ngy th 2 nhiu hn ngy th 3,4,5 khng?

287

KIM NH KOLMOGOROV SMIRNOV


MT MU
Kolmogorov smirnov test c s dng kim
nh gi thuyt phn phi ca d liu c ph hp
vi phn phi l thuyt.
N tin hnh xt cc sai lch tuyt i ln nht gia 2
ng phn phi tch ly thc nghim v l thuyt, sai
lch tuyt i cng ln, gi thuyt H0 cng d b bc
b.
Mt s phng php thng c s dng kho st
tng th c phn phi chun hay khng nh dng
th Q-Q plot, hay tin hnh kim nh Jaccque-Berra

288

V D

Trong phn kim nh du, chng ta c t mt


cu hi: C tht l gi nh v phn phi chun
ca tng th cc chnh lch th nghim v u
phng ci tin c tha mn hay khng? Ta s
dng kim nh Kolmogorov smirnov tr li
cu hi.
Tin hnh kim nh gi thuyt v phn phi chun
ca tng th chnh l , n l i din cho s chnh
lch.

Gi thuyt H0: tng th ca bin Delta c phn


phi chun

289

CCH TNH

S dng file dauphong.sav


1. Transform/Compute nhp tn bin mi (Delta)
2. Chn spthu a vo khung Numeric Expression
Chn nt - khung ton hc
Chn spban a vo khung Numeric Expression
3. t li nhn c bin
4. Nhn OK v c kt qu

290

TRNH T KIM NH
1. Analyze/ Nonparametric Test/ 1-Sample K - S
2. a bin cn kim nh (Delta) vo khung Test
Variable List.
3. Cn tn phn phi m gi thuyt mun kim nh
(Normal) trong khung Test Distribution.
4. Ty chn cc la chn tnh ton khc v c kt
qu.

291

C KT QU KIM NH

Sig = 0.232 > 0.1


do chp nhn
gi thuyt H0
Kt lun chnh
lch tng th c
phn phi chun
=> p dng kim
nh Paired T test
l ph hp.

292

CHNG 8
KIM NH T L

293

KIM NH T L
Th tc kim nh t l tng th l mt th tc n
gin tuy nhin vic tin hnh kim nh ny trn
SPSS cn ch :
Bin a vo kim nh cn phi l mt bin nh phn,
nu l bin trn 2 la chn th cn khai bo im ct
i vi bin chia d liu thnh hai nhm.
Kim nh ny khng i hi gi nh v dng phn
phi ca bin ang xt xong s liu phi m bo tnh
ngu nhin.
294

V D
Nghin cu gi tr cm nhn v dch v o to
ca sinh vin Khoa Kinh t - H TN .

Dng lnh Seclect Case vi la chn Random Sample


of case chn mt mu (xem l ngu nhin) 100 sinh
vin t tng th ny thnh file Kiemdinhmoi.

Gi thuyt: H0: T l sinh vin nam trong tng th


>= 40%
295

THC HIN KIM NH T L


1. Analyze/ Noparametric Test/ Binomial
2. a bin gioitinh sang khung Test Variable List
3. Gi tr v t l tng th mun kim nh trong
khung Test Proportion thnh 0,4.
4. Nu bin ca chng ta l nh phn th mc nh
la chn Get from Data vi gii tnh nam
c chn l nhm 1 d liu ny.

296

C KT QU KIM NH

Gi tr sig. = 0.462 > 0.05(mc ngha mc nh) =>


khng bc b c gi thuyt H0

Thc hin li kim nh trn vi vic ly ngu


nhin 20% mu t tng th quan st ?
297

V D (Tip)
Gi s ta mun kim nh vi gi thuyt
H0: T l sinh vin hc ngnh KTTS trong tng th <=
27% (15%)
H1: T l sinh vin hc ngnh KTTS trong tng th
>27% (15%)

Kt qu ?

298

CHNG 9
TNG QUAN V HI QUI
TUYN TNH

299

V D
Mt cng ty c 24 khu vc bn hng trong ton
quc, cng ty m chin dch cho hng cho sn
phm mi. Hy cho bit mi lin h gia doanh s
bn hng v chi ph cho hng?

300

NHN XT
Bin doanh thu v chi ph cho hng l bin nh
lng.
Xt mi lin h gia hai bin nh lng:
S dng th phn tn nhn nh mi lin h

301

MT S DNG LIN H THNG GP


GIA HAI BIN NH LNG
Khng c mi lin h

302

Lin h tuyn tnh thun

303

Lin h tuyn tnh nghch

304

Lin h phi tuyn

305

S DNG TH PHN TN
Thc hin lnh: Graphs/Scatter/Simple/Define
Dng th Scatter biu din mi ln h gia
doanh s bn hng v chi ph cho hng.

306

NHN XT
Mi lin h gia 2 bin?
mnh/ yu ca mi lin h ?
Mc cht chex ca lin h?

307

H S TNG QUAN N r

S dng h s tng quan n r lng ha


mc cht ch ca mi lin h tuyn tnh gia 2
bin nh lng
n
Cng thc:
r

X Y n(X)(Y)
i 1

(n 1)S xS y

Trong : -1 r +1
r = 0 : khng c mi quan h gia 2 bin
r 0 : tng quan nghch
r 0 : tng quan thun
r = 1 : ???

308

C IM H S r

Gi tr r =0 cha hn c ngha l 2 bin khng c


mi lin h (c th l lin h phi tuyn). V th r
ch dng o cht ch ca mi lin h tng
quan tuyn tnh.
Nn kt hp vi th a ra kt lun chnh
xc
Khng phi lc no c mi lin h tng quan
tuyn tnh th l mi quan h nhn qu.
VD: Doanh s bn hng tng cao c th do chi ph
cho hng tng nhng hon ton c th do ngu nhin
(do thi tit, s kin ln ang din ra, ma v) 309

C IM H S r (tip)

C th xy trng hp tng quan tuyn tnh gi


(gi tr r rt cao nhng li khng ph hp v mt
tng th)
VD: tng quan gia s lng sinh vin v s lng
qun bia trong thnh ph. C th s lng qun bia
tng cao do dn s tng, ma h nng nng, th hiu
tiu dng ca a phng

H s tng quan r c tnh cht i xng, khng


c n v o, khng b nh hng bi php bin
i tuyn tinh.
Thc nghim vi SPSS
310

KIM NH GI THUYT V H S
TNG QUAN TUYN TNH r
H s r phn nh mt hip bin thin tht s trong
tng th hay ch do tnh c.
Gi thuyt H0 : = 0 (khng c lin h tng quan)
Gi nh cc mu ngu nhin c lp ly ra t mt
tng th no v tha mn phn phi chun
r
n2
Gi tr kim nh : t
r
1 r
n2

1 r2

Gi tr gii hn : -tn-2,/2 v +tn-2,/2


Bc b nu t tn-2,a/2
y l php kim nh 1 hay 2 pha? Khi no thc
311
hin kim nh 1 pha? 2 pha?

THC HIN KIM NH TRN SPSS


1. Analyze / Correlate / Bivariate
2. Chn bin yu cu phn tch a vo Variables
Nu tt c cc trng hp quan st u c gi tr b
thiu i vi 1 hoc 2 bin c chn, hoc tt c cc
trng hp cng c 1 gi tr th khng tnh c h s
r (.)

3. La chn h s tng quan cn tnh ton trong


phn Correlation Coefficients.
Pearson (mc nh): h s tng quan
Kendalls tau-b: h s tng quan hng
Spearman: h s tng quan hng trong trng hp
312
khng tun theo phn phi chun

THC HIN KIM NH TRN SPSS


4. Chn loi kim nh:
Two tail ( mc nh): Khi khng xc nh c chiu
hng kim nh
One tail: Khi xc nh c chiu hng ca php
kim nh

5. La chn cc ty chn
Statistics: cc thng s thng k
Means and standard: trung bnh v lch chun
Cross-product deviations and covariances: tng tch cc
modem cho v hip phng sai.

313

THC HIN KIM NH TRN SPSS


Missing value: cc s liu b thiu, st
Exclude cases pairwise: Cc trng hp quan st b thiu
mt hay hai bin s b loi khi qu trnh phn tch
Exclude cases listwise: Gi tr quan st b thiu s b loi
khi phn tch

6. Continue v c kt qu kim nh

314

C KT QU KIM NH

H s tng quan gia doanh s bn hng v chnh n


l: 1, vi chi ph bn hng l 0,905
Gi tr sig. = 0.000 vy bc b gi thuyt H0

Kim nh trn s dng mc ngha ?

315

H S TNG QUAN HNG

H s tng quan n r ch ph hp vi d liu


nh lng v tha mn phn phi chun
D liu khng tha mn iu kin phn phi
chun s dng h s tng quan hng: Spearman
H s tng quan hng tnh da vo hng ca d liu
ch khng dng gi tr thc ca quan st
Gi tr tng quan hng: - 1 n +1

316

H S TNG QUAN HNG (Tip)

Xi v Yi c xp hng theo th t tng dn,


trng hp gi tr bng nhau th c xp ng
hng v hng s l hng trung bnh.
rs tnh cng cng thc vi r nhng tnh theo tr s
xp hng ca Xi v Yi
Phng php kim nh :
H0 : s = 0 (khng c lin h tng quan)
Gi tr kim nh rs tnh nh gi tr kim nh t
Gi tr gii hn tra bng phn phi Spearman ng vi
n v mc ngha /2 (2 bn)
317
Bc b nu rs rn ,a/2 (2 bn)

C KT QU KIM NH

318

HI QUI TUYN TNH

Gi s xc nh c 2 bin c mi lin h
tuyn tnh, xc nh ng hng ca mi quan h
nhn qu l c tht => M hnh ha mi quan h
bng m hnh hi qui tuyn tnh
M hnh gm 1 bin ph thuc (bin c gii thch Y) v bin c lp ( bin gii thch - X).
M hnh s m t hnh thc ca mi lin h v qua
gip d on c mc ca bin ph thuc khi bit
trc gi tr ca bin c lp.
Phn tch hi qui cc bin khng c tnh cht i xng,
phn bit bin nguyn nhn v kt qu
319

HI QUI N TUYN TNH


Xy dng phng trnh ca m hnh hi qui n
tuyn tnh t d liu mu.
M hnh lin h tuyn tnh gia mt bin ph thuc v
mt bin c lp: Y i b0 b1 .Xi
Xi l tr quan st th i ca bin c lp
Y i l gi tr d on th i ca bin ph thuc, du m i
din cho gi tr d on
b0 va b1 l h s hi qui uc xc nh bng phng php
bnh phng nh nht thng thng (cc tiu ho tng cc
lch bnh phng gia tung ca cc im d liu quan
st v ng thng hi qui)

320

V D

Xy dng m hnh hi qui tuyn tnh n bin m


t mi quan h gia doanh s bn hng v chi ph
cho hng.
Doanh s d on = b0 + b1*Chi ph cho hng
B1 l lng tng gim (triu ng) ca doanh s iu
chnh (doanh s d on) do lng tng gim ca chi
ph cho hng.
B0 l gi tr doanh s l thuyt khi chi ph cho hng
bng 0.

321

CCH THC XY DNG M


HNH BNG SPSS
1. Analyze / Regression / Linear
a bin ph thuc (doanhso) vo khung Dependent
a bin c lp (chaohang) vo Independent
Ok v la chn

322

C KT QU

T kt qu, ta c phng trnh hi qui tuyn tnh


Doanh s d on = 651.523 + 6,261*Chi ph cho hng
H s hi qui chun ha (beta) l dc ca ng
thng ta xc nh.

323

CC GI NH I VI PHN
TCH HI QUI TUYN TNH
Phn tch hi qui nhm mc ch suy rng kt
lun cho mi lin h gia cc bin trong tng th.
Trong v d c 12 khu vc bn hng? Vy 24 khu vc
kt qu ntn?
c th suy lun c th cn tha mn cc gi nh
v cn xc nh mc v phm cc gi nh .

V d: xc nh chnh xc ca kt lun rt ra t
hm hi qui l: Khi chi ph cho hng tng ln 1
n v th doanh s tng ln 6,261 n v tin
324

CC GI NH I VI PHN TCH
HI QUI TUYN TNH
Phn phi chun v phng sai bng nhau
Cc mu m bo tnh ngu nhin v c lp
Tuyn tnh
Khi ch c mt bin c lp th m hnh hi qui
tuyn tnh tng th c dng: Yi= 1 + 0* X + ei

325

D ON BNG M HNH HI QUI


ng dng c th ca m hnh hi qui tuyn tnh l:
D bo gi tr trung bnh Y trong trng hp bit c
gi tr c th X (X0)
Tin on gi tr ca Y trong mt trng hp c th ti
gi tr X0

V d: c th tin on doanh s trung bnh ca tt


c cc khu vc c chi ph cho hng l 120 triu
ng, hay tin on doanh s ca mt khu vc c
th c chi ph cho hng l 120 triu (sai s khc
nhau)
Doanh so ban = 651,523+(6,261x120)=1,402,9 triu
326

D ON GI TR RING L
D on gi tr ring l gp 2 ngun sai s:
Gi tr d on ring l ny c th khc vi gi tr
trung bnh ca Y ti X0
c lng trung bnh tng th ti X0 c th khc vi
trung bnh thc s ca tng th ti X0.

327

BI TP
D on cn nng ca tr vi file CanNang.sav

V biu Scatter
Xc nh mi lin gia hai bin nh lng
Vit phng trnh hi qui tuyn tnh
Theo kt qu nghin cu trn th tr khi 7t, 8t nng bao
nhiu kg?
Can nang = 7.840 + 1.932*tuoi

328