Kul 5 Korelasi Dan Regresi2012I1

  • Upload
    penyabu

  • View
    219

  • Download
    0

Embed Size (px)

Citation preview

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    1/25

    Correlationlinear pattern of relationshipbetween one variable (x) and anothervariable (y) an association betweentwo variables

    relative position of one variablecorrelates with relative distribution ofanother variable

    graphical representation of the

    relationship between two variablesWarning:

    No proof of causality

    Cannot assume x causes y

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    2/25

    A new sort of test : Perbedaan t-

    test, chi square, correlasi

    One qualitative and one quantitative variable

    = t-test

    Two qualitative variables = chi square

    What if you have two quantitative variables,

    and you want to know how much they go

    together? E.g., study time and grades

    correlation

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    3/25

    3

    Overview of Correlation and Regression

    Correlation seeks to establish whether a relationship exists betweentwo variables

    Regression seeks to use one variable to predict another variable

    Both measure the extent of a linear relationship between two variables

    Statistical tests are used to determine the strength of the relationship

    15

    16

    17

    18

    19

    20

    21

    22

    15 16 17 18 19 20 21 22

    Parent size

    Daughte

    rsize

    15

    16

    17

    18

    19

    20

    21

    22

    15 16 17 18 19 20 21 22

    Parent size

    Daughte

    rsize

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    4/25

    Koefisien Korelasir

    A measure of the strength and direction of a linear relationship between twovariables

    The range ofris from 1 to 1.

    Ifris close to 1

    there is a strongpositive

    correlation.

    Ifris close to 1 there

    is a strong negativecorrelation.

    Ifris close to 0

    there is no linearcorrelation.

    1 0 1

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    5/25

    r indicates strength of relationship (strong, weak, or none)

    direction of relationship

    positive (direct) variables move in same direction

    negative (inverse) variables move in opposite directions

    r ranges in value from

    1.0 to +1.0

    Pearsons Correlation Coefficient

    Strong Negative No Rel. Strong Positive

    -1.0 0.0 +1.0

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    6/25

    Examples of positive and negative relationships. (a) Beer sales are positively

    related to temperature. (b) Coffee sales are negatively related to temperature.

    Contoh: Positive vs Negative

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    7/25

    Examples of relationships that are not linear: (a) relationship between

    reaction time and age; (b) relationship between mood and drug dose.

    Contoh: non-linear relationships

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    8/25

    Correlations:

    0.0

    6.7

    13.3

    20.0

    0.0 4.0 8.0 12.0

    C1 vs C2

    C1

    C2

    0.0

    40.0

    80.0

    120.0

    0.0 83.3 166.7 250.0

    C1 vs C2

    C1

    C2

    Positive

    Large values of X associated

    with large values of Y,small values of X associatedwith small values of Y.

    e.g. IQ and SAT

    Large values of X associated

    with small values of Y& vice versa

    e.g. SPEED and ACCURACY

    Negative

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    9/25

    x y

    8 78

    2 925 90

    12 58

    15 43

    9 746 81

    AbsencesFinalGrade

    Application

    959085807570656055

    45

    40

    50

    0 2 4 6 8 10 12 14 16

    FinalGrad

    e

    X

    Absences

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    10/25

    6084

    8464

    8100

    33641849

    5476

    6561

    624

    184

    450

    696645

    666

    48657 516 3751 579 39898

    1 8 78

    2 2 92

    3 5 90

    4 12 58

    5 15 43

    6 9 74

    7 6 81

    64

    4

    25

    144225

    81

    36

    xy x2

    y2

    Computation ofr

    x y

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    11/25

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    12/25

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    13/25

    13

    Coefficient of Determination,

    r 2

    To understand the strength of the

    relationship between two variables

    The correlation coefficient, r, issquared

    r 2 shows how much of the variationin one measure (say, fecal energy) isaccounted for by knowing the value

    of the other measure (fecal lipid loss)

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    14/25

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    15/25

    15

    Linear Regression Used when the goal is to predict the value of one

    characteristic from knowledge of another Assumes a straight-line, or linear, relationship between two

    variables

    when term simpleis used with regression, it refers tosituation where one explanatory (independent) variable is

    used to predict another Multipleregression is used for more than one explanatory

    variable

    If the point at which the line intercepts or crosses the Y-axis is a

    and the slope of the line is denoted as b, then Y =1X + 0

    Like y = mx + b

    The slope is a measure of how much Y changes for a one-unit

    change in X

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    16/25

    16

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    17/25

    Regression: Correlation + Prediction

    predicting y based on x

    Regression equation

    formula that specifies a line

    y = bx + a

    plug in a x value (distance from target) andpredict y (points)

    note y= actual value of a score

    y= predict value

    Regression

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    18/25

    Simple Linear Regression

    The regression line is the best fit through the data. Best fit is defined asthe average line the one that minimises the distance between the data

    points and the line. It is the best description of the data

    Y=bX + a Y is the dependent variable b is the slope of the line -

    the rate at which Y willchange when X changes byone unit of X

    a is the intercept that value

    of Y when X is equal to zero

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    19/25

    The equation of a line may be written as y = mx + bwhere m is the slope of the line and b is the y-intercept.

    The line of regression is:

    The slope m is:

    The y-intercept is:

    Regression indicates the degree to which the variation in one variable X, is related to or can

    be explained by the variation in another variable Y

    Once you know there is a significant linear correlation, you can write an equation describing

    the relationship between the xand yvariables. This equation is called the line of regression

    or least squares line.

    The Line of Regression

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    20/25

    Calculate m and b.

    Write the equation of the

    line of regression with

    x= number of absencesand y= final grade.

    The line of regression is: = 3.924x+ 105.667

    6084

    8464

    81003364

    1849

    5476

    6561

    624

    184

    450696

    645

    666

    486

    57 516 3751 579 39898

    1 8 78

    2 2 92

    3 5 904 12 58

    5 15 43

    6 9 74

    7 6 81

    64

    4

    25144

    225

    81

    36

    xy x2 y2x y

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    21/25

    0 2 4 6 8 10 12 14 16

    4045

    50556065707580

    859095

    Absences

    Final

    Grad

    e

    m = 3.924 and b = 105.667

    The line of regression is:

    Note that the point = (8.143, 73.714) is on the line.

    The Line of Regression

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    22/25

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    23/25

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    24/25

  • 7/29/2019 Kul 5 Korelasi Dan Regresi2012I1

    25/25