0% found this document useful (0 votes)
7 views

Module 7 Linear Regression

Uploaded by

Rennel Mallari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Module 7 Linear Regression

Uploaded by

Rennel Mallari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

MODULE 7:

LINEAR REGRESSION
Engr Ren
Definition
• It is used when we want to predict the
value of a variable based on the value of
another variable.
• The variable we want to predict is called
the dependent variable (or sometimes,
the outcome variable).
• The variable we are using to predict the
other variable's value is called the
independent variable (or sometimes, the
predictor variable)
Example
What influence the salary of people?
Example
• Weights of adult males depend to some degree on their
heights
• The circumference of circles depends on their radii
Curve-fitting
• To determine the equation that
connects variables
• Collect data that show
corresponding values of the
variables under consideration
• Plot points using scatterplot
diagram

• The problem of finding equations


of approximating curves that fit
given sets of data is called curve
fitting
Equations of Approximating Curves
• Several common types of approximating curves and their
equations are listed below
Method of Least Squares
• To avoid individual judgment in constructing lines
to fit sets of data, it is necessary to agree on
definition of best fitting line

• A measure of the goodness of fit test of the curve


to the given data is provided by the quantity
𝐷12 + 𝐷22 + ⋯ If this is small, the fit is good.

• A curve having this property is said to fit the data


in the least-squares sense.
The Least-Squares Line
• The least-squares line approximating the set of points has the
equation
• Y = 𝑏0 + 𝑏1 𝑋

• b1

• b0=
Another solution
• Finding least squares can be shortened by transforming the data x = X – Mean X
• And y = Y-mean Y
Problem
• Fit a least squares line to the data by using
• (a) X as independent variable
• (b) Estimate the weight of a student in lb whose height
is known to be 63 inches
Solution

0
Solution
Another solution
Another solution
Problem
• Fit a least squares line to the data by using
• (c) Y as independent variable
Problem
• Fit a least squares line to the data by using
• (c) Y as independent variable
Testing the significance of “b”
• The usual approach in testing the significance of “b” is to assume that b=0
• This implies that if b=0, then the two variables are not linearly related.
• When the relationship of two variables is proven to be linear, then we can say that
the variable X can be used in predicting the value of Y.
STEPS
• 1. State the hypothesis
• 2. state the level of significance and df
• 3. get the tabular value of t
• 4. Solve for t
𝑏′
• t= ; where b’=slope of the regression line
𝑆𝑏 ′
• Sb’ = standard error of estimate
Σ𝑒 2
• Sb’ =
(𝑛−2)Σ𝑑 2
• 5. Decision
• 6. Conclusion
Problem
• Test the significance of regression coefficient “b” based from the prev problem.
Problem
• Test the significance of regression coefficient “b” based from the prev problem.
Problems Involving Two Variables

• Linear equation in the variables X, Y and Z


• In 3D rectangular coordinate system this equation represents a plane and the
actual sample points may scatter not too far from this plane, which we call an
approximating plane
• The normal equations corresponding to the least squares plane are given
Problems Involving Two Variables

• Linear equation in the variables X, Y and Z


• In 3D rectangular coordinate system this equation represents a plane and the
actual sample points may scatter not too far from this plane, which we call an
approximating plane
• The normal equations corresponding to the least squares plane are given
Problem
• Fit an equation of the forms
• To the given data

X Y Z
1 10 12
2 1 18
3 2 24
4 3 30
Solution
Solution
AS2
1. The table below shows the data from the computer sales since 1960 to 1969.
YEAR COST(X) SALES(Y)
1960 15 38
1961 30 53
1962 16 60

f. Test the significance of regression coefficient b at 1% level of significance 1963 39 72


1964 20 40
1965 36 47
1966 45 82
1967 10 21
1968 13 25
1969 16 40
2

X Y Z X Y Z

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy