SIGN TEST SLIDE.ppt

3,567 views 26 slides Feb 28, 2023
Slide 1
Slide 1 of 26
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26

About This Presentation

Masters in biostatics coarse


Slide Content

Statistical Methods for Non parametric
Continuous Variables
Yilma ch, ass.t prof bio HI
2/28/2023 1

Objective
At the end of the presentation you will able to:
list non parametric statistical tests
describe sign test
test hypothess using sign test
2/28/2023 2

•Wilcoxon Sign test
2/28/2023 3

Introduction
•Whenyourdatadonotsatisfythedistributional
assumptionsrequiredbyparametricprocedures,
otherstatisticalmethodsareneededthatisNon
parametricstatistics.
2/28/2023 4

•Thedistributionalassumptionsrequiredfornon-parametric
proceduresareusuallylessspecificthanthoserequiredfor
parametricprocedures.
•Manynon-parametrictestshavelesspowerthanthe
correspondingparametrictests.
•Becausepowershouldneverbegivenupunlessabsolutely
necessary,non-parametricmethodsshouldnotbeusedwhen
parametricmethodsareappropriate.
2/28/2023 5

Cont...
•Thesigntestisanexampleofoneofthesenonparametric
tests.
•DonotrushtousetheNPT
•Ifyouroutcomevariableisnotnormal,trytonormalizeusing
logorln.
•Ifitisstillnotnormalized,gotononparametrictests
2/28/2023 6

What is the Sign Test?
Thesigntestcomparesthesizesoftwogroups.
Itisanon-parametricor“distribution-free”test,whichmeans
thetestdoesn’tassumethedatacomesfromaparticular
distribution,likethenormaldistribution.
Thesigntestisanalternativetoaone-samplet-test.
Itcanalsobeusedforordered(ranked)categoricaldata.
2/28/2023 7

Cont...
Thesigntestisusedtotestthenullhypothesisthatthemedian
ofadistributionisequaltosomehypothetical(standard)value.
Itcanbeused;
inplaceofaone-samplet-test
inplaceofapairedt-testor
fororderedcategoricaldatawhereanumericalscaleis
inappropriatebutwhereitispossibletoranktheobservations.
2/28/2023 8

Assumptions of sign test
1.dataisnonnormallydistributed
2.arandomsampleofindependentmeasurementfora
populationwithunknownmedian
3.thevariableofinterestiscontinuousorranked
ordinalscaleofmeasurement
4.theonesampletesthandlenonsymmetricdataset
(skewedeithertorightorleft)
2/28/2023 9

procedure
•LetAandBrepresenttwomaterialsortreatmentstobe
compared.
•LetxandyrepresentmeasurementsmadeonAandB.
•Letthenumberofpairsofobservationsben.
•Thenpairsofobservationsandtheirdifferencesmaybe
denotedby:
(X
1,Y
1),(X
2,y
2),.....,(X
n,Y
n)and
X
1-Y
1,X
2-Y
2..............X
n-Y
n.
2/28/2023 10

Cont...
2/28/2023 11

Cont...
•Thesigntestisbasedonthesignsofthesedifferences.
•TheletterBswillbeusedtodenotethenumberoftimesthe
maximumsignhasoccurred.
•Ifsomeofthedifferencesarezero,wecancancelthe
observation.
•BS=Max{N
+,N
-}
2/28/2023 12

•Asanexampleofthetypeofdataforwhichthesigntestis
appropriate,wemayconsiderthefollowingyieldsoftwo
hybridlinesofcornobtainedfromseveraldifferent
experiments.
•InthisexampleN=28
N
+=7
N
-=21
BS=Max{N
+,N
-}
BS=21
2/28/2023 13

•wecanfindthecriticalvaluesandp-valuesofBsfromthesign
testtable.
•ifthep-valueislessthansignificanceleveloralphavalue,
rejectthenullhypothesis
P<α→rejectthenullhypothesiswhichstatesnomedian
difference.
2/28/2023 14

2/28/2023 15

Example Hypothesis testing using sign test
N
o
Driver
injury(x)
passenger
injury(y)
sign(+,-)
(x-y)
Driver
injury(x)
passenger
injury(y)
sign(+,-)
(x-y)
1.42 35 + 36 37 -
2.42 35 + 36 37 -
3.34 45 - 43 58 -
434 45 - 40 42 -
5.45 45 0 43 58 -
6.40 42 - 37 41 -
7.42 46 - 37 41 -
8.43 58 - 44 57 -
9.45 43 + 42 42 0
Test at 95% confidence interval that the driver injury is equal to
passengers injury.
2/28/2023 16

Step 1. Ho : driver injury = passenger injury
HA : driver injury ≠ passenger injury
Step2.N=18-2=16(twoobservationscanceled)
N
+=3
N
-=13
BS=Max{N
+,N
-}
BS=13
Step3.appropriatetestissigntestα=5%
step 4. find p value from the table
2/28/2023 17

p-value = 0.021
2/28/2023 18

Step5.Interpretation
0.021<0.05(0.021isobtainedfromsigntesttableatn=16,BS
13andalpha0.05,whichis0.021
P<α→rejectthenullhypothesis
Thereforthedriversinjuryisnotequaltothepassengersinjury.
2/28/2023 19

Exercise
Thetablebelowshowsthehoursofreliefprovidedbytwo
analgesicdrugsin12patientssufferingfromarthritis.Isthere
anyevidencethatonedrugprovideslongerreliefthantheother?
Test at 95% confidence interval.
2/28/2023 20

Solution
Inthiscaseournullhypothesisisthatthemediandifferenceis
zero.
Ouractualdifferences(DrugB-DrugA)are:+1.5,+2.1,
+0.3,−0.2,+2.6,−0.1,+1.8,−0.6,+1.5,+2.0,+2.3,+12.4
Ouractualmediandifferenceis1.65hours.
N+=9,N−=3,n=12,
Bs=max(N−,N+)=9
Ourp-valueatn=12,Bs=9andalpha=0.05
(fromtables)isp=0.146
Wewouldconcludethatthereisnoevidenceforadifference
betweenthetwotreatmentsonreliefofpain.
2/28/2023 21

Sign test with large sample size
largesamplesize=N>30weuseZtest.
Z=(X±0.5)-N/2
0.5*√N
where:X=nooffewersign
N=totalpairofsample
wecanuseZ=(X+0.5)-N/2ifN/2>X
0.5*√N
2/28/2023 22

find the p value of Z from the table then:
P <α → reject the null hypothesis
2/28/2023 23

Example
Aresearcherhastaken50pairofstudentsforthestudyand
obtainedthedata.
canyouconcludefromthedatabyusingsigntestthatthe
trainingofthetwogroupsdiffersignificantly?
Givennoof
+vesign=37
 -vesign=12
 of0=1
solution
HO=thetrainingofonegroup=trainingoftheother.
N=37+12=49
N/2=49/2=24.5
2/28/2023 24

x= 12
As 24.5 > 12 we use the formula
Z=(X+0.5)-N/2
1/2√N
= (12 +0.5)-24.5
1/2 √49 Z= -3.43
3.43 > 1.96 or -3.43 < -1.96
•p-value of Z= -3.43 = 0.0003.
•Since the hypothesis is two sided, multiply 0.0003*2= 0.0006
0.0006 < 0.05 and 0.01
so, reject the null hypothesis at 5% as well as at 1%.
•Hence, training of two groups differ significantly.
2/28/2023 25

2/28/2023 26