Vous êtes sur la page 1sur 14

REGRESI

ISI:
MODEL RGRESI
dengan
LEAST SQUARE

Least-Squares
Regression

Linear relationships
between two variables
are defined using a
regression line
A mathematical
expression (equation)

Simplest type of
relationship straight
line

Least-Squares
Regression

How many straight lines


can you fit through a
data set like this?

Least-Squares
Regression

How many straight lines


can you fit through a data
set like this?

Least-Squares
Regression

How many straight lines can


you fit through a data set
like this?

Least-Squares
Regression
How do we find the best straight
line that relates two variables?
Take a ruler and try to fit it?
How many answers would that
give?

The most common practice is to


find the Least-Squares Line
How?
Find a line that passes through
points such that there is a
minimum distance between each
value of the response variable and
the line.
These distances are squared and
added up for all points in the
sample
For the least-squares line, that sum
is smaller than it would be for any
other line

Least-Squares
Regression
Equation
of any straight line
Response variables on vertical axis
Y
Explanatory variable on horizontal
axis X
The equation that relates these two
Y=a + bX
Where a and b are numbers
a: intercept point where line
crosses the y axis, when X=0
b: slope how much an increase
there is in variable Y when
variable X increases by 1 unit
Positive slope
Negative slope

Least-Squares Regression

Regression line:

Y = a + bX

Where b is the slope


calculated by
Sy
br
Sx
And the intercept a

a y bx

Where
and
represent
the coordinates of a
point on the line

Least-Squares Regression

It is possible to find a
regression line if we
know the slope and one
point through which the
line passes.
Example: What is the
equation of the leastsquares line that has the
Sfollowing
y 20, S x 5, r 0.5, x 3 and y 4
characteristics?

Least-Squares Regression
When developing a regression
equation, it matters which is
the explanatory and which is
the response variable.
When calculating the
equation we consider
distances from the response
variable to the line.
Reversing the roles will in
turn produce different
equations.

Correlation coefficient r
r describes the strength of
the relationship
In regression
r2 = fraction of variation in
values of Y that is explained
by X
Example:
The correlation between IQ
and GPA was found to be
a: r=0.50
b: r=0.99

What percent of the


observed variation in the
students GPAs can be
explained by IQ alone?

1 r 1
What are the limits of r2?
r2 indicates the strength
of a relationship just like
r

What is r2 when r = 1
What is r2 when r = -1
What is r2 when r = 0

Vous aimerez peut-être aussi