Top Banner

of 62

2014 Nonparametic Test

Jul 07, 2018

Download

Documents

promises
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/18/2019 2014 Nonparametic Test

    1/62

    NONPARAMETRIC TEST

  • 8/18/2019 2014 Nonparametic Test

    2/62

    I. Introduction

    II. Two related-samples rank sum test

    III. Two independent-samples rank sum test

    IV. independent-samples rank sum test

  • 8/18/2019 2014 Nonparametic Test

    3/62

    Part one

    Introduction

  • 8/18/2019 2014 Nonparametic Test

    4/62

    1. One sample t test

    Model assumptions

    When σ is unknown andn

  • 8/18/2019 2014 Nonparametic Test

    5/62

    2 two independent-samples t test

    Model assumptions

    1. The data from two

    samples must follow theassumption of normal

    distribution.

    2. Two population variancesare e ual.

    Test statistics

    22

    21 σ σ =

    )11

    (21

    2

    21

    nnS

    X X t

    c +

    −=

    2

    11

    21

    2

    2

    21

    2

    12

    −+

    −+−=

    nn

    nS nS S c

    !e"ree of freedom

  • 8/18/2019 2014 Nonparametic Test

    6/62

    3 Paired-samples t test

    Model assumptions

    The differences amon"

    each paired#samples

    must come from normal

    distribution population.

    Test statistics

    1,/

    0 −=−

    = nn s

    d t

    d

    υ

    $umbers of pairs

  • 8/18/2019 2014 Nonparametic Test

    7/62

    %. &ne wa' ($&)(Model assumptions

    1 The k samples are independent

    2 *ach of the populations isnormall' distributed.

    + *ach of the populations has thesame variances.

    Test statistics

    W

    A

    W

    A

    MS

    MS

    SS

    SS F ==

    W

    A

    W

    A

    MS

    MS

    SS

    SS F ==

  • 8/18/2019 2014 Nonparametic Test

    8/62

    The methods of inferential statisticspresented in previous chapters are called

    parametric methods because the' are based

    on samplin" from a population with specificparameters, such as the mean , standard

    deviation σ, or proportion p.

  • 8/18/2019 2014 Nonparametic Test

    9/62

    Those parametric methods usuall' mustconform to some fairl' strict conditions,

    such as a re uirement that the sampledata come from a normall' distributionpopulation and the population variance

    amon" "roups are e ual.

  • 8/18/2019 2014 Nonparametic Test

    10/62

    -n this chapter, we would introducenonparametric methods, which do not have suchstrict re uirements.

    arametric tests have re uirements about thenature or shape of the populations involved.

    $onparametric tests do not re uire thatsamples come from populations with normaldistributions or have an' other particulardistributions. /onse uentl', nonparametric testsare called distribution#free tests.

  • 8/18/2019 2014 Nonparametic Test

    11/62

    (dvanta"es of $onparametric ethods/an be applied to a wide variet' of situationsbecause the' do not have the more ri"idre uirements of the correspondin" parametric

    methods. nlike parametric methods, nonparametricmethods can often be applied to nominal leveldata.

    suall' involve simpler computations than thecorrespondin" parametric methods and aretherefore easier to understand and appl'.

  • 8/18/2019 2014 Nonparametic Test

    12/62

    !isadvanta"es of $onparametric ethods

    Tend to waste information because e actnumerical data are often reduced to a ualitative

    form.$ot as efficient as parametric tests, so with anonparametric test we "enerall' need stron"er

    evidence 3such as a lar"er sample or "reaterdifferences4 before we re ect a null h'pothesis.

  • 8/18/2019 2014 Nonparametic Test

    13/62

    Comparison Rank sum Test Test statistics

    ! relatedsamples

    Wilco on si"nedrank test T 3n65047 3n 504

    ! independentsamples

    ann#whitne' testZ

    k Independentsamples

    8ruskal#Wallis Test H or 2 χ

    T'pes of rank sum test.

  • 8/18/2019 2014 Nonparametic Test

    14/62

    Part two

    Two related-samples rank sumtest

  • 8/18/2019 2014 Nonparametic Test

    15/62

    * ample 1 The uric from 12 workers were split to two parts

    and the concentration of uric 9" were measured b'two methods. 9'dronium e chan"in" method anddistillation method. lease compare whether theconcentration of uric 9" is different in twomethods:

  • 8/18/2019 2014 Nonparametic Test

    16/62

    1;

    aired samples h'pothesis test

    n is the number of pairs

  • 8/18/2019 2014 Nonparametic Test

    17/62

    (1) Set up hypothesis and confirm α

    Ho: Md= 0

    H1: Md≠ 0

    α= 0.05

    (2) ompute !

    ! " =#5 ! $=%%& so choose !=%%

    The median of difference

  • 8/18/2019 2014 Nonparametic Test

    18/62

    /ompute the difference of each pairs

    /ompute absolute value of the difference

    (ffi => or ? to each of rank

    /ompute sum of positive and ne"ative ranks

    @elect the smaller ranks3T4

    Aank the difference in ascendin" order

    n650/ompute B

    nC50

  • 8/18/2019 2014 Nonparametic Test

    19/62

    T

    T T z σ

    µ 5.0−−=

    24/)12)(1(

    4/)1(

    ++=

    +=

    nnn

    nn

    T

    T

    σ

    µ

    48

    )(

    24)12)(1(

    5.04/)1(3∑ −−++

    −+−=

    j j

    ct t nnn

    nnT z

    /orrection formula

    "e deleted w#en n

    is lar$er t#an %&&'

    T

    T T

    z σ

    µ −=

    t is the units of the same ranks

    -f nC50,we should compute 7-f nC50,we should compute 7

  • 8/18/2019 2014 Nonparametic Test

    20/62

    1!

    +

  • 8/18/2019 2014 Nonparametic Test

    21/62

    (3) Look for critical value

    nD12, we should look up T#value table.Eecause ++ is in theran"e from1+ to ;5,

    so P> 0.05. -n FD0.05level, we can notre ect 90. @o we thinkthe concentration ofuric 9" is same intwo methods.

  • 8/18/2019 2014 Nonparametic Test

    22/62

    Gou can compute the difference ofeach pairs usin" @ @@ b' selectin"H

    Analyze > transform > Computevariable…

    !ata 1

  • 8/18/2019 2014 Nonparametic Test

    23/62

    $ormalit' tests (nal'BeI !escriptive @tatisticsI * plore

    !ependent listI difference

    lotsIJ$ormalit' plots with tests

    /ontinue

    &8

    P

  • 8/18/2019 2014 Nonparametic Test

    24/62

  • 8/18/2019 2014 Nonparametic Test

    25/62

    Two related samples rank sum test

    (nal'BeI nonparametric testI two#related sampleLTest pairsI M1#M2

    Test t'pe I J wilco on

    &8

  • 8/18/2019 2014 Nonparametic Test

    26/62

  • 8/18/2019 2014 Nonparametic Test

    27/62

    9ow to write thereport:

    The difference of two samples wasnKt chosen from normal population

    3W testHP D0.0104 at the si"nificant level 0.05, so wilco on si"nedrank test was used which showed there was no difference in theconcentration of the uric 9" detected b' two methods 3Z D0.%N1P D0.;+O4.

    Table 1 the concentration of the uric 9" with two methods in 12

    workers

  • 8/18/2019 2014 Nonparametic Test

    28/62

    Part three

    Two independent-samples

    rank sum test

  • 8/18/2019 2014 Nonparametic Test

    29/62

    The followin" table is the concentration ofhemosiderin in patients with pneumonia and

    normal people. lease test whether theconcentration of hemosiderin is different in

    different people.

    * ample 2

  • 8/18/2019 2014 Nonparametic Test

    30/62

    Patients wit# pneumonia normal people 1 177

    68 172

    2 7 4

    174 47

    457 1 2

    492 54

    199 47

    515 52

    599 47

    2 8 294

    68

    4

    277

    44

    4

  • 8/18/2019 2014 Nonparametic Test

    31/62

    0%P05P1;+1

    Two independent samples h'pothesis test

  • 8/18/2019 2014 Nonparametic Test

    32/62

    (1) set up hypotheses and confirm α H

    0: M1 = M2 ( t'o popu ation distri ution are same) H

    1: M1 ≠ M2 ( t'o popu ation distri ution are different) α =0.05

    (2) Compute test statistics *an+ a the o ser,ationsin ascendin- order and -i,e the order num er ( 0 is a so

    ran+ed). f the o ser,ations are same& then -et the

    a,era-e of order num er.hoose the ran+ sum 'ith sma er samp e si/e as !.S

  • 8/18/2019 2014 Nonparametic Test

    33/62

    To compute t#e )ilco*on

    test statistic+

    ,% Two samples are

    com(ined

    ,! T#e com(ined alues are

    ordered /rom low to #i$#+and

    ,0 T#e ordered alues are

    replaced (1 ranks+ startin$

    wit# % /or t#e smallest alue

  • 8/18/2019 2014 Nonparametic Test

    34/62

  • 8/18/2019 2014 Nonparametic Test

    35/62

    0 2ind P alue and draw conclusion.

    T.@, 1O+.5, be'ond the ran"e from %2

    to Q;, so we should re ect 90. we canthink the concentration of hemosiderinis hi"her in patients with pneumonia.

  • 8/18/2019 2014 Nonparametic Test

    36/62

    formula of approximately normal distribution

    1 If n is smaller(n1

  • 8/18/2019 2014 Nonparametic Test

    37/62

    $ormalit' tests (nal'BeI !escriptive @tatisticsI * plore

    !ependent listI GRactor list I "rouplotsIJ$ormalit' plots with tests

    /ontinue

    &8

    (ack

    P

  • 8/18/2019 2014 Nonparametic Test

    38/62

    Two independent rank sum test (nal'BeI nonparametric testI two#independent samplesLTest variable listI '

    Sroupin" variable I "roup !efine "roups "roup 1H1

    "roup 2 H2Test t'pe I ann#Whitne' &8

  • 8/18/2019 2014 Nonparametic Test

    39/62

  • 8/18/2019 2014 Nonparametic Test

    40/62

    9ow to write the report:

    The distribution of the concentration of hemosiderin wasskewed in normal "roup 3W testHP D0.0104, so Wilco on ranksum test of two independent samples was used. The resultssupported that there was a si"nificant difference in the twopopulation distributions Z D2.55Q P D0.011 .

  • 8/18/2019 2014 Nonparametic Test

    41/62

    +, P/+ 3

    One doctor treat c#ronic "ronc#itis patients of

    different t*pes usin$ t#e same dru$. #e curati!e

    effect are listed in ta"le - . uestion Is t#e curati!e effect different w#en

    t#is dru$ was used to treat c#ronic "ronc#itis patients

    of different t*pes.

  • 8/18/2019 2014 Nonparametic Test

    42/62

    table 7-4 T#e curati e e//ect o/ some dru$ topatients wit# ! t1pes o/ (ronc#itis

  • 8/18/2019 2014 Nonparametic Test

    43/62

    Set up the hypothesis and confirm α Ho: M1= M2

    H1:

    α= 0.05

    ompute !.S(1) ompute the tota num er of each -roup confirm the ran+

    ran-e of each -roup& then compute the a,era-e ran+ of each-roup

    (2) ompute ran+ sum of each -roup(%) onfirm !.S !. !1= 112.5& !2= 10 %.5. So != 112.5

    (#) ompute /$,a ue

    21 M M ≠

  • 8/18/2019 2014 Nonparametic Test

    44/62

    Ta(le 3-4 T#e curati e e//ect o/ some dru$ topatients wit# ! t1pes o/ (ronc#itis

    5,%6%&% 7!

    5,%&!6%3! 7! 5,%306%89 7!

  • 8/18/2019 2014 Nonparametic Test

    45/62

    In this e a!"le, n 1#$8,n 2#118, so %.& %#8112.5. 'eshoul use *test.

    224.1/

    814.01+,1+,)2424()$1$1()101101(

    1

    )/()(1

    104.1$.38842+

    12/)11+,(118$8

    5.02/)11+,($85.8112

    3

    333

    33

    ==

    =−−+−+−

    −=

    −−−=

    ==+××

    −+×−=

    c z z

    N N t t c

    z

    c

    j j

    3 4ind t#e re5ection re$ion and draw conclusion.

    1.22#41. &P 60.05. So 'e can7t re8ect H0. !he curati,e effect is same

    to patients 'ith 2 types of ronchitis.

  • 8/18/2019 2014 Nonparametic Test

    46/62

    !ata IWei"ht cases Wei"ht cases b' fre uenc

    (nal'Be I$onparametric tests I2 independent samplesLL

    Test variables list I &utcome

    Sroupin" variable I t'pe

    !efine "roups "roup 1H1 "roup 2 H2

    Test t'pe I ann#Whitne'

    ok

    !ata +

    http://data4.sav/http://data4.sav/

  • 8/18/2019 2014 Nonparametic Test

    47/62

  • 8/18/2019 2014 Nonparametic Test

    48/62

    table 3 T#e curati e e//ect o/ some dru$ topatients wit# ! t1pes o/ (ronc#itis

    9ow to write the report:

    Z D1.225,P D0.221, we can think the curative effect of this dru"is same to patients with two t'pes of bronchitis.

  • 8/18/2019 2014 Nonparametic Test

    49/62

    Part four

    k independent-samples

    rank sum test

  • 8/18/2019 2014 Nonparametic Test

    50/62

    E*ample 4

    The followin" sample data were obtained fromthree populations ,please compare the

    population distribution is same.

  • 8/18/2019 2014 Nonparametic Test

    51/62

    Sample 1 Sample 2 Sample

    29.7 11.0 72.9

    65.5 4.2 12.6

    28.6 29.9 42.8

    12.9 24.4 6.5

    8.8 8. 8.5

    8. 9.7 52.8

    42.4 14.9 7 .4

    2.7 52.6 9.2

    1 .6 4.7 11.

    10.5 5.2 4.4

    10. 4.0

    15.2 14.

    2.5 12.7

  • 8/18/2019 2014 Nonparametic Test

    52/62

    To compute the 8ruskal#Wallis test statistic,314 (ll the samples are combined

    324 The combined values are ordered from low tohi"h, and3+4 The ordered values are replaced b' ranks,startin" with 1 for the smallest value

  • 8/18/2019 2014 Nonparametic Test

    53/62

  • 8/18/2019 2014 Nonparametic Test

    54/62

    6et up t#e #*pot#esis and confirm 7

    Ho: three popu ation distri ution are same

    H1: three popu ation distri ution are different

    α= 0.05

    Compute .6(1) ompute the tota num er of each -roup confirm the ran+ ran-e

    of each -roup& then compute the a,era-e ran+ of each -roup

    (2) ompute ran+ sum of each -roup(%) onfirmH

    4ind P !alue and draw conclusion

  • 8/18/2019 2014 Nonparametic Test

    55/62

    ∑ +−+= )1(3)1(12 2

    N n

    R

    N N H

    i

    i

    Total sample siBe+;

    each sample siBe

    1+,1+,10

    Aank sum in each "roup225,2++,20O

    82.0

    )13(3)102081323313225()13(3 12

    )1(3)1(

    12

    222

    2

    =

    +−+++=

    +−+

    = ∑ N n

    R N N

    H i

    i

  • 8/18/2019 2014 Nonparametic Test

    56/62

    df D the number of "roup #1 D+#1D2

    Conclusion: Not reject H 0 at 0.05 signifcant level and think

    three population distribution are same.

  • 8/18/2019 2014 Nonparametic Test

    57/62

  • 8/18/2019 2014 Nonparametic Test

    58/62

  • 8/18/2019 2014 Nonparametic Test

    59/62

  • 8/18/2019 2014 Nonparametic Test

    60/62

  • 8/18/2019 2014 Nonparametic Test

    61/62

    9ow to write the report:

    Sroup 1 was skewed 3W testHP D0.02;4, so8ruskal#wallis rank sum test was used. The

    results supported that there was no si"nificantdifference in the three population distributions H D0.;O2 P D0.N11 .

  • 8/18/2019 2014 Nonparametic Test

    62/62

    THE END