Spearman Rank Correlation Coefficient

Embed Size (px)

Citation preview

  • 8/3/2019 Spearman Rank Correlation Coefficient

    1/25

    Statistical Methodand Advanced Application

  • 8/3/2019 Spearman Rank Correlation Coefficient

    2/25

    SPEARMAN RANK

    CORRELATION COEFFICIENT

    SMALL SAMPLELARGE SAMPLE

    APPROXIMATION

  • 8/3/2019 Spearman Rank Correlation Coefficient

    3/25

    SMALL SAMPLE

  • 8/3/2019 Spearman Rank Correlation Coefficient

    4/25

    Spearman Rank Correlation

    Coefficient

    Learning Outcome

    Student should be able to make

    a relationship between two

    variable by using Spearman rankcorrelation coefficient.

  • 8/3/2019 Spearman Rank Correlation Coefficient

    5/25

    Assumptions

    a)The data consist of a random sample ofn

    pairs of numeric or non-numeric

    observations.

    b)Each pair of observations represents two

    measurements taken on the same object orindividual, called the unit of association.

  • 8/3/2019 Spearman Rank Correlation Coefficient

    6/25

    Procedures

    1)If the data consist of observations from a bivariate population, wedesignate the n pairs of observations (X1,Y1), (X2,Y2),, (Xn,Yn).

    2)EachXis ranked relative to all other observed values ofX, from

    smallest to largest in order of magnitude. The rank of the ith value of

    Xis denoted by R(Xi )=1 ifXi is the smallest observed value ofX.

    3) Each Yis ranked relative to all other observed values ofY, from

    smallest to largest in order of magnitude. The rank of the ith value of

    Yis denoted by R(Yi )=1 ifYi is the smallest observed value ofY.

    4)If ties occur among theXs or among the Ys, each tied value is

    assigned the mean of the rank positions for which it is tied.

    5)If the data consist of nonnumeric observations, they must be capable

    of being ranked as described.

  • 8/3/2019 Spearman Rank Correlation Coefficient

    7/25

    Hypotheses

    Case A

    (two-sided)

    Case B

    (one-sided)

    Case C

    (one-sided)

    H0 : X and Y are

    independent.H0 : X and Y are

    independent.

    H0 : X and Y are

    independent.

    H1 : X and Y are

    either directly

    or inversely

    related.

    H1 : There is a

    direct

    relationship

    between X andY.

    H1 : There is an

    inverse

    relationship

    between Xand Y.

    = 0

    0

    = 0 = 0sH :0 sH :0 sH :0

    sH :1 0:H s1 > 0:H s1 <

  • 8/3/2019 Spearman Rank Correlation Coefficient

    8/25

    Test Statistic

    1) Rank all sample observations from smallest to

    largest.

    2)Find di and di2where di=R(Xi)R(Yi), and di is

    the difference in the ranks given to the variablesXi and Yi.

    3)Sum the square of the difference in the ranks

    observations from populationXi and Yi, di2

    4)The test statistic is,)1(

    61

    2

    2

    nn

    dr

    i

    s

  • 8/3/2019 Spearman Rank Correlation Coefficient

    9/25

    5) rsis to measure the strength of the relationship

    between the sampleXand Yvalues and as an

    estimate of the strength of the relationship

    betweenXand Yin the sampled population.

    6) When the rank ofXis the same as the rank ofY

    for every pair of observations (perfect direct

    relationship), all the differences di will be equalto zero, and rs will be equal to +1.

    7) Kendall(T3)* has shown that in general rs = -1

    when the rank of one variable within each pair of

    observations (Xi, Yi) is the reverse of the other

    (perfect inverse relationship).

    *Kendall, M.G.,Rank Correlation Methods, fourth edition, London: Griffin, 1970.

  • 8/3/2019 Spearman Rank Correlation Coefficient

    10/25

    Thus if

    [R(X) = 1, R(Y) = n]

    [R(X) = 2, R(Y) = n-1],.,[R(X) = n, R(Y) = 1]

    for n pairs of observations, rs = -1. This may be illustrated

    by means of a simple example. Suppose have the followingpairs of observations of (Xi, Yi) : (0,10),(8,3),(2,9),(5,6).

    The ranks are

    So, the di2=(-3) 2 +(3) 2 + (-1) 2 + (1) 2 = 20. Then

    rs = 1[6(20)/4(16-1) = -1

    8) Kendall also shows that rs can never be greater than +1 or

    less than -1.

    Xi 0 8 2 5

    R(Xi) 1 4 2 3

    Yi 10 3 9 6

    R(Yi) 4 1 3 2

  • 8/3/2019 Spearman Rank Correlation Coefficient

    11/25

    Decision Rule

    Case Reject H0 if

    A

    (Two-sided)

    B

    (One-sided positive)

    C

    (One-sided negative)

    2rr

    s

    rr

    s

    rr

    s

    2rr

    s

  • 8/3/2019 Spearman Rank Correlation Coefficient

    12/25

    Example 9.1(pg 360)

    Pincherle and Robinson(E1)* note a marked interobservervariation in blood pressure. They found that doctors whoread high on systolic tended to read high on diastolic.Table 9.1 shows mean systolic and diastolic bloodpressure readings by 14 doctors. We wish to compute a

    measure of the strength of the relationship between thetwo variables. Under the consumption that these 14doctors constitute a random sample from a population ofdoctors, we wish to know whether we may conclude fromthe data that there is a direct relationship between systolicand diastolic readings. Suppose we let = 0.05

    *G.Pincherle and D.Robinson, Mean Blood Pressure and its Relation to Other Factors

    Determined at a Routine Executive Health Examination, J.Choronic Dis.,27 (1974),245-260;used with permission of Pergamon Press.

  • 8/3/2019 Spearman Rank Correlation Coefficient

    13/25

    Mean blood pressure readings, millimeters mercury, by doctor

    Doctor Systolic Diastolic

    1 141.8 89.72 140.2 74.4

    3 131.8 83.5

    4 132.5 77.8

    5 135.7 85.8

    6 141.2 86.5

    7 143.9 89.4

    8 140.2 89.3

    9 140.8 88.0

    10 131.7 82.2

    11 130.8 84.6

    12 135.6 84.4

    13 143.6 86.3

    14 133.2 85.9

  • 8/3/2019 Spearman Rank Correlation Coefficient

    14/25

    1) HYPOTHESES

    Systolic and diastolic blood pressure readings by

    doctors are independent.

    There is a direct relationship between systolic and

    diastolic blood pressure readings by doctors

    (claim).

    :0H

    :1H

    2) TEST STATISTIC

  • 8/3/2019 Spearman Rank Correlation Coefficient

    15/25

    2) TEST STATISTICSYSTOLIC

    ( )

    DIASTOLIC

    ( )R( ) R( ) = R ( )R( )

    141.8 89.7 12 14 - 2 4

    140.2 74.4 8.5 1 7.5 56.25131.8 83.5 3 4 -1 1

    132.5 77.8 4 2 2 4

    135.7 85.8 7 7 0 0

    141.2 86.5 11 10 1 1

    143.9 89.4 14 13 1 1

    140.2 89.3 8.5 12 - 3.5 12.25

    140.8 88.0 10 11 -1 1

    131.7 82.2 2 3 -1 1

    130.8 84.6 1 6 -5 25

    135.8 84.4 6 5 1 1

    143.6 86.3 13 9 4 16

    133.2 85.9 5 8 -3 9

    iX

    iX iYi

    Y ix iYid2id

    50.132=2id

  • 8/3/2019 Spearman Rank Correlation Coefficient

    16/25

    By using the formula of test static:

    From the table, we get the value ofand n = 14. Then, substitute the values into the

    equation above.

    50.1322

    id

    )1-14(14

    )50.132(6-12

    sr

    7088.0

    )1(

    6-1

    2

    2

    nn

    dr is

  • 8/3/2019 Spearman Rank Correlation Coefficient

    17/25

    3) CRITICAL VALUE

    Table A.21 reveals that, for n = 14 and (1) = 0.05,

    the critical value of is 0.464.s

    r

  • 8/3/2019 Spearman Rank Correlation Coefficient

    18/25

    4) DECISION

    Since 0.7088 > 0.464, we reject .

    5) CONCLUSION

    There is enough evidence to support the claim

    that the doctors who read high on systolic

    tend to read high on diastolic blood pressure.

    0H

  • 8/3/2019 Spearman Rank Correlation Coefficient

    19/25

    Exercise 1

    Table 9.4 shows the serum and bone magnesium levels of 14 patients are reported by

    Alfrey et al.*

    . Can we conclude from these data that a relationship exist betweenserum magnesium and bone magnesium in the sample population?

    Serum Mg ( m Eq./L.) Bone Mg ( m Eq./kg ash )3.60 6722.85 6102.80 6212.70 5672.60 5702.55 6382.55 6122.45 5522.25 5241.80 4001.45 2771.35 2941.40 3380.90 230

    *Alfrey, Allen C.,Nancy L. Miller, and Donald Butkus, Evaluation Of Body Magnesium

    Stores,J.Lab. Clin. Med.,84 (1974), 153-1

  • 8/3/2019 Spearman Rank Correlation Coefficient

    20/25

    Exercise 2

    Ten seventh-grade children randomly selected from a certain public school

    system were ranked according to the quality of their home environment and thequality of their performance in school. The result are shown in table 9.45.

    compute rs and determine whether one can conclude that the two variable are

    directly related.

    Ten seventh-grade children ranked according to quality of home

    environment and quality of performance in school.

    Child Home environment Performance in school1 3 12 7 93 10 84 9 105 2 36 1 47 6 58 4 29 8 610 5 7

  • 8/3/2019 Spearman Rank Correlation Coefficient

    21/25

    Exercise 3

    The Spearman's Rank Correlation Coefficient is used to discover the strength of a link

    between two sets of data. This example looks at the strength of the link between the

    price of a convenience item (a 50cl bottle of water) and distance from the

    Contemporary Art Museum (CAM ) in El Raval, Barcelona. compute rs and

    determine whether one can conclude that the two variable are inversly related.

    Convinence store Distance from CAM ( m) Price of 50cl bottle ()1 50 1.802 175 1.203 270 2.004 375 1.005 425 1.006 580 1.207 710 0.808 790 0.609 890 1.00

    10

    980

    0.85

  • 8/3/2019 Spearman Rank Correlation Coefficient

    22/25

    Large-Sample Approximation

    When the sample size is greater than 100, we

    cannot use Table A.21 to test the significance

    ofrs. Then we may compute

    which is distributed approximately as thestandard normal.

    1 nrzs

  • 8/3/2019 Spearman Rank Correlation Coefficient

    23/25

  • 8/3/2019 Spearman Rank Correlation Coefficient

    24/25

    LINK OF YOUTUBE

    http://www.youtube.com/watch?v=Eu_XOoFNfR4&feature=mfu_in_order&list=UL

    http://www.youtube.com/watch?v=Eu_XOoFNfR4&feature=mfu_in_order&list=ULhttp://www.youtube.com/watch?v=Eu_XOoFNfR4&feature=mfu_in_order&list=ULhttp://www.youtube.com/watch?v=Eu_XOoFNfR4&feature=mfu_in_order&list=ULhttp://www.youtube.com/watch?v=Eu_XOoFNfR4&feature=mfu_in_order&list=UL
  • 8/3/2019 Spearman Rank Correlation Coefficient

    25/25

    Thank You