Docsity

Least Squares Regression: A Comprehensive Guide with Exercises, Exams of Mathematics

Toggle sidebar
bg1
MATH 3339 Least square regression
1 / 5
1.
correlation mea-
sures ?
The
direction
and
strength
of
the
straight
line
relationship
between
two
quantita-
tive variables
If a scatter plot shows a linear relationship, we would like to summarize
this overall
pattern by drawing a line on the scatter plot.
2.
Regression line
Is
a
straight
line
that
describes
how
a
response
variable
y
changes
as
an
explana-
tory variable x changes
3.
Least-squares re-
gression line
(LSRL)
4.
linear
regression
model is
5.
The least
squares estimate
of the slope
coefficient
6.
The least
squares estimate of the intercept β0 of
pf3
pf4
pf5

Partial preview of the text

Download Least Squares Regression: A Comprehensive Guide with Exercises and more Exams Mathematics in PDF only on Docsity!

  1. correlation mea- sures? The direction and strength of the straight line relationship between two quantita- tive variables If a scatter plot shows a linear relationship, we would like to summarize this overall pattern by drawing a line on the scatter plot.
  2. Regression line Is a straight line that describes how a response variable y changes as an explana- tory variable x changes
  3. Least-squares re- gression line (LSRL)
  4. linear regression model is
  5. The least squares estimate of the slope coefficient
  6. The least squares estimate of the intercept β0 of

the LSRL of Y on X is the line that makes the sum of the squares of the vertical distances of the data points from the line as small as possible. Y= β0 + β1x + ε

  • Y is dependent variable (response) x is the independent variable (explanatory)
  • β0 is the population intercept of the line
  • β1 is the population slope of the line
  • ε is the error term which is assumed to have mean value
  • The variability: σ of the response y about this line. More precisely, σ is the standard deviation of the deviations of the errors Check image.
    • Sx: Standard deviation of X
    • Sy: Standard deviation of Y
    • cor(x,y): correlation between X and Y
    • Sxy = Yi (xi − ̄x) β0 = ̄y − ˆβ1 ̄x
  1. Residual A residual is the ditterence between an observed value of the response variable and the value predicted by the regression line residual = observed y - predicted y
  1. Residual plots in R
  2. Examining a residual plot
    • We can determine residuals for each observation
    • The closer the residuals are to zero, the better we are at predicting the response variable
    • We can plot the residuals for each observation, these are called the residual plots.
    • Input the data
    • Create the linear models: name.lm=lm(y~x)
    • Create the plot: plot(x,resid(name.lm))
    • A curved pattern shows that the relationship is not linear
    • Increasing spread about the zero line as x increases indicated the prediction of y will be less accurate for larger x. Decreasing spread about the zero line as x increases indicated the prediction of y to be more accurate for larger x.
    • Individual points with larger residuals are considered outliers in the vertical (y) direction
    • Individual points that are extreme in the x direction are considered outliers for the x- variable.