Download 3C Least Squares Regression

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Data assimilation wikipedia , lookup

Forecasting wikipedia , lookup

Interaction (statistics) wikipedia , lookup

Lasso (statistics) wikipedia , lookup

Instrumental variables estimation wikipedia , lookup

Choice modelling wikipedia , lookup

Time series wikipedia , lookup

Coefficient of determination wikipedia , lookup

Regression analysis wikipedia , lookup

Linear regression wikipedia , lookup

Transcript
Introduction to regression
3C. Least-squares regression
• Another method for finding the equation of
a straight line is the least-squares
regression.
• Least-squares works by mathematically
balancing the distance that points are away
from the regression line.
• Easy to work out using CAS calculator.
Using CAS
• Input data into spreadsheet on Lists &
Spreadsheet.
• Create scatterplot in Data & Statistics
• Then,
– MENU
– 4: Analyse
– 6: Regression
– 1: Show Linear (mx+b)
– [or 2: Show Linear (a+bx)]
• To find r and r2
– Go back to Lists & Spreadsheet page
– MENU
– 4: Statistics
– 1: Stat Calculations
– 3: Linear Regression (mx+b)
– Fill in the table with X List as the independent
variable and Y List as the dependent variable.
Example
• Exercise 3C, Q.1
• Then, you do Q.2 and Q.3
Calculating least-squares regression
by hand
• If you are given a summary of the data
rather than the data itself, you may need to
calculate the least-squares regression by
hand.
• Summary data:
– x the mean of the independent variable
– y the mean of the dependent variable
– sx the standard deviation of the independent
variable
– sy the standard deviation of the dependent
variable
– r Pearson’s product-moment correlation
coefficient
The formulae
• The general form of the least-squares
regression line is y  mx  c
• where:
sx
– The slope of the regression line is m  r
sy
– The y-intercept of the regression line is c  y  mx
Example
• Ex 3C, Q.4
• Then, you do
– 5(a)(d), 7, 10, 11, 12, 13