Topik 6 Kolerasi

Embed Size (px)

Citation preview

  • 8/12/2019 Topik 6 Kolerasi

    1/42

    CORELATION

    - Pearson-r - Spearman-rho

  • 8/12/2019 Topik 6 Kolerasi

    2/42

    Scatter Diagram

    A scatter diagram is a graph that shows thatthe relationship between two variablesmeasured on the same individual.

    Each individual in the set is represented bya point on in the scatter diagram. Thepredictor variable is plotted on thehorizontal axis and the response variable is

    plotted on the vertical axis.Do not connect points when drawing ascatter diagram.

  • 8/12/2019 Topik 6 Kolerasi

    3/42

    Scatterplot

    A scatterplot is a graph that shows locationof each data formed by a pair of X-Y scores.In a positive linear relationship , as the X

    scores increase, the Y scores tends toincrease.In a negative linear relationship , as the Xscores increase, the Y scores tends todecrease.In a nonlinear relationship , as the X scoresincrease, the Y scores do not only increaseor only decreases

  • 8/12/2019 Topik 6 Kolerasi

    4/42

    Types of relationship

    A horizontal scatterplot, with horizontalregression line, indicates no relationship .Slopping scatterplots with regression linesoriented so that Y increases as X increasesindicate a positive linear relationship .Slopping scatterplots with regression linesoriented so that Y decreases as X increases

    indicate a negative linear relationship.Scatterplots producing curved regressionlines indicate nonlinear relationships.

  • 8/12/2019 Topik 6 Kolerasi

    5/42

  • 8/12/2019 Topik 6 Kolerasi

    6/42

  • 8/12/2019 Topik 6 Kolerasi

    7/42

    Strength of relationship

    The strength of a relationship is the extent to whichone value of Y is consistently paired with one and onlyone value of X.The strength of a relationship is also referred to as thedegree of association between the two variablesThe absolute value of the correlation coefficient (thesize of the number we calculate) indicates the strengthof the relationship.The largest value you can obtain is 1.0 and thesmallest value is 0.The larger the value the stronger the relationship.

  • 8/12/2019 Topik 6 Kolerasi

    8/42

    For example, on average, as height in peopleincreases, so does weight.

    Height(in) Weight(lbs)

    1 60 102

    2 62 120

    3 63 1304 65 150

    5 65 120

    6 68 145

    7 69 1758 70 170

    9 72 185

    10 74 210

  • 8/12/2019 Topik 6 Kolerasi

    9/42

    Example of a Positive Correlation

    If the correlation is positive, when one variable increases, so does the other.

  • 8/12/2019 Topik 6 Kolerasi

    10/42

    For example, as study time increases, thenumber of errors on an exam decreases

    Studytime (min)

    No. Errorson test

    1 90 25

    2 100 28

    3 130 204 150 20

    5 180 15

    6 200 12

    7 220 138 300 10

    9 350 8

    10 400 6

  • 8/12/2019 Topik 6 Kolerasi

    11/42

    Example of a negative correlation

    If the correlation is negative, when one variable increases, the other decreases.

  • 8/12/2019 Topik 6 Kolerasi

    12/42

    Example of a zero correlation

    If there is no relationship between the two variables, thenas one variable increases, the other variable neitherincreases nor decreases. In this case, the correlation iszero. For example, if we measure the SAT-V scores ofcollege freshmen and also measure the circumference oftheir right big toes, there will be a zero correlation.

  • 8/12/2019 Topik 6 Kolerasi

    13/42

    What is the correlationcoefficient?

    Linear means straight line.Correlation means co-relation, or thedegree that two variables "go together".Linear correlation means to go together in astraight line.The correlation coefficient is a number

    that summarizes the direction and degree(closeness) of linear relations between twovariables.

  • 8/12/2019 Topik 6 Kolerasi

    14/42

    What is the correlationcoefficient?

    The correlation coefficient is alsoknown as the Pearson Product-

    Moment Correlation Coefficient .The sample value is called r ,

    and the population value is called

    (rho).

  • 8/12/2019 Topik 6 Kolerasi

    15/42

    What is the correlationcoefficient?

    The correlation coefficient can takevalues between -1 through 0 to +1.

    The sign (+ or -) of the correlationaffects its interpretation.When the correlation is positive ( r >

    0), as the value of one variableincreases, so does the other.

  • 8/12/2019 Topik 6 Kolerasi

    16/42

    Correlation & Association

    Scale Example

    Interval-interval Pearson r

    Ordinal-ordinal Spearman Rank

    Nominal-nominal Phi, Chi-square Independent test

    Nominal-interval Eta

    Nominal-ordinal Theta, Kruskal-Wallis H test

    Ordinal-interval Jaspens M, F test

  • 8/12/2019 Topik 6 Kolerasi

    17/42

    Pearson correlation coefficient

    o The conceptual (definitional) formula ofthe correlation coefficient is:

    where x and y are deviation scores, that

    SX and SY are sample standard deviations, that is,

    (1.1)

  • 8/12/2019 Topik 6 Kolerasi

    18/42

    Pearson correlation coefficient

    Another way of defining correlation is:

    where zx is X in z-score form, zy is Y in z-scoreform, and S and N have their customary meaning.This says that r is the average cross-product of z-scores.

    (1.2)

  • 8/12/2019 Topik 6 Kolerasi

    19/42

    Pearson correlation coefficient

    Where

  • 8/12/2019 Topik 6 Kolerasi

    20/42

    Pearson correlation coefficient

    Sometimes you will see these formulaswritten as:

    and

  • 8/12/2019 Topik 6 Kolerasi

    21/42

    Pearson correlation coefficient

    These formulas are correct when thestandard deviations used in thecalculations are the estimated populationstandard deviations rather than thesample standard deviations.so the main point is to be consistent.

    Either use N throughout or use N-1throughout.

  • 8/12/2019 Topik 6 Kolerasi

    22/42

    Example:

  • 8/12/2019 Topik 6 Kolerasi

    23/42

  • 8/12/2019 Topik 6 Kolerasi

    24/42

  • 8/12/2019 Topik 6 Kolerasi

    25/42

    Interpretation of PearsonCoefficient

    r Interpretation

    0.00-0.20 can be ignored0.20-0.40 low0.40-0.60 medium

    0.60-0.80 high0.80-1.00 very high

  • 8/12/2019 Topik 6 Kolerasi

    26/42

    Strength of Pearson r

    Coefficient Strength

    0.01 0.09 Trivial

    0.10 0.29 Low to moderate0.30 0.49 Moderate to

    substantial

    0.50

    0.69 Substantial to verystrong0.70 0.89 Very strong

    >0.90 Near perfect

  • 8/12/2019 Topik 6 Kolerasi

    27/42

    Spearmans Coefficient of RankCorrelation, r s

  • 8/12/2019 Topik 6 Kolerasi

    28/42

    Spearmans rank -order correlationcoefficient

    The correlation coefficient is used when one or morevariables is measured on an ordinal (ranking) scaleDescribes the linear relationship between two variablesmeasured using ranked scores

    Symbol used rs (The subscript s stands for Spearman;Charles Spearman invented this one)

  • 8/12/2019 Topik 6 Kolerasi

    29/42

    Computational Formula for the SpearmanRank-Order Correlation Coefficient is:

    Rs = 1 6( D2)

    -----------N (N2 -1)

    N is the number of pair ranks

    D is the difference between the two ranks in eachpair

  • 8/12/2019 Topik 6 Kolerasi

    30/42

    Running the Spearman Rank-OrderCorrelation Test1. Determine the difference between the ranks for each

    subjects2. Square each difference and sum them3. Calculate the rho statistics.4. Compare the obtained rho value with the critical value

  • 8/12/2019 Topik 6 Kolerasi

    31/42

    Summary of the Spearman Rank-OrderCorrelation Test

    Hypotheses:H0 : Rho = 0Ha : Rho 0, or Rho < 0, or Rho > 0Assumptiojns:Subjects are randomly selected

    Observations are ranked orderDecision Rules:n = number of pairs of ranksIf rhoobt rhocrit, reject H0If rhoobt < rho crit, do not reject H0

    Formula rho = 1 6( D2)

    n (n2 -1)

  • 8/12/2019 Topik 6 Kolerasi

    32/42

    Sample data

    Participant Observer A: X Observer B: Y

    1 4 3

    2 1 2

    3 9 8

    4 8 6

    5 3 5

    6 5 4

    7 6 78 2 1

    9 7 9

  • 8/12/2019 Topik 6 Kolerasi

    33/42

    SolutionParticipant Observer A: X Observer B: Y D D 2

    1 4 3 1 1

    2 1 2 -1 1

    3 9 8 1 1

    4 8 6 2 4

    5 3 5 -2 4

    6 5 4 1 1

    7 6 7 -1 1

    8 2 1 1 1

    9 7 9 -2 4

    D2=18

  • 8/12/2019 Topik 6 Kolerasi

    34/42

    SolutionRs = 1 6( D2)

    -----------N (N2 -1)

    = 1 (6(18))----------9 (92 -1)

    = 1 - ((108)/720)

    = 1 0.15= + .85

  • 8/12/2019 Topik 6 Kolerasi

    35/42

    What does the value of r s tell you?Spearmans rank correlation coefficient is actually derived fromthe product-moment correlation coefficient , such that:

    -1 rs 1rs = 0.85 Means that a child receiving a particular ranking fromone observer tended to receive very close to the same rankingfrom other observerrs = +1 means the ranking is in complete agreementrs = 0 means that there is no correlation between the rankingsrs = -1 means that the ranking are in complete disagreement. Infact they are in exact reverse order.

  • 8/12/2019 Topik 6 Kolerasi

    36/42

    Exercise:

    The marks of eight candidates in English and Mathematics are:

    Candidate 1 2 3 4 5 6 7 8

    English (x) 50 58 35 86 76 43 40 60

    Maths (y) 65 72 54 82 32 74 40 53

    Rank the results and hence find Spearmans rankcorrelation coefficient between the two sets of marks.Comment on the value obtained,

  • 8/12/2019 Topik 6 Kolerasi

    37/42

    Solution

    English(x)

    50 58 35 86 76 43 40 60

    Maths

    (y)

    65 72 54 82 32 74 40 53

    Rank x 4 5 1 8 7 3 2 6

    Rank y 5 6 4 8 1 7 2 3

    D -1 -1 -3 0 6 -4 0 3

    D2 1 1 9 0 36 16 0 9 D 2=72

  • 8/12/2019 Topik 6 Kolerasi

    38/42

    SolutionRs = 1 6( D2)

    -----------N (N2 -1)

    = 1 (6(72))----------8 (82 -1)

    = 1 - ((432)/504)

    = 1 0.857= .142

    Spearmans coefficient of rankcorrelation is 0.142This appears to show a veryweak positive correlation between the English andMathematics ranking

  • 8/12/2019 Topik 6 Kolerasi

    39/42

    Tied Ranks

    A tied rank occurs when two participants receive thesame rank on the same variable (e.g two person are tiedfor first on variable x)Tied ranks result in an incorrect value of rsResolve (correct) any tied ranks before computing rsTherefore, for each participant at a tied rank, assign the meanof the ranks that would have been used had there not been a tie

  • 8/12/2019 Topik 6 Kolerasi

    40/42

    Example

    Runner Race X Race Y To resolve ties New Y

    A 4 1 Tie uses ranks 1

    and 2, becomes 1.5

    1.5

    B 3 1 Tie uses ranks 1and 2, becomes 1.5

    1.5

    C 2 2 Becomes 3rd 3

    D 1 3 Becomes 4th 4

  • 8/12/2019 Topik 6 Kolerasi

    41/42

    Example

    Runner Race X New Y D D 2

    A 4 1.5 2.5 6.25

    B 3 1.5 1.5 2.25

    C 2 3 -1 1

    D 1 4 -3 9

    D2= 18.5

  • 8/12/2019 Topik 6 Kolerasi

    42/42

    SolutionRs = 1 6( D2)

    -----------N (N2 -1)

    = 1 (6(18.5))----------4 (42 -1)

    = 1 - ((111)/60)

    = 1 1.85= - .85