You are on page 1of 30

Introduction

Simple Linear Regression

Simple Linear Regression

Francis Joseph Campe


na

December 4, 2013

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Table of contents

1 Introduction

2 Simple Linear Regression

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Introduction

A mathematical equation that allows us to predict values of one


dependent variable from known values of one or more independent
variable is called a regression equation.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Introduction

A mathematical equation that allows us to predict values of one


dependent variable from known values of one or more independent
variable is called a regression equation.
Note
In regression analysis, the variable being predicted is called the
dependent variable and the variable(s) being used to predict the
value of the dependent variable is(are) called independent variables.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Introduction

The simplest type of regression analysis involving one independent


variable and one dependent variable, in which the relationship
between the variables is approximated by a straight line, is called
SIMPLE LINEAR REGRESSION.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

SLR Model

The regression model used in a simple linear regression is given by

y = 0 + 1 x + .

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

SLR Model

The regression model used in a simple linear regression is given by

y = 0 + 1 x + .

In the simple linear regression model, 0 and 1 are referred to as


the parameters of the model and  is a random variable referred to
as the error term.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

SLR Model

The regression model used in a simple linear regression is given by

y = 0 + 1 x + .

In the simple linear regression model, 0 and 1 are referred to as


the parameters of the model and  is a random variable referred to
as the error term.
Note
The error term accounts for the variability in the dependent
variable y that cannot be explained by the linear relationship
between x and y .

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

SLR Model

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Estimated Regression Equation

Since the values of 0 and 1 ,in the regression model, are usually
unkown in practice, they are estimated by using sample data. The
estimated simple linear regression equation is now given by

y = b0 + b1 x.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Estimated Regression Equation

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Correlation is a measure of the degree of relatedness of variables.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Correlation is a measure of the degree of relatedness of variables.


Sample of pairs of data can yield a numerical value that
represents the degree of relatedness of the two stock prices
over time.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Correlation is a measure of the degree of relatedness of variables.


Sample of pairs of data can yield a numerical value that
represents the degree of relatedness of the two stock prices
over time.
In the transportation industry, is a correlation evident between
the price of transportation and the weight of the object being
shipped? If so, how strong are the correlations?

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Correlation is a measure of the degree of relatedness of variables.


Sample of pairs of data can yield a numerical value that
represents the degree of relatedness of the two stock prices
over time.
In the transportation industry, is a correlation evident between
the price of transportation and the weight of the object being
shipped? If so, how strong are the correlations?
In economics, how strong is the correlation between the
producer price index and the unemployment rate? In retail
sales, are sales related to population density, number of
competitors, size of the store, amount of advertising, or other
variables?

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

The statistic r is the Pearson product-moment correlation


coefficient. It is a measure of the linear correlation of two
variables. It ranges from -1 to +1, representing the strength of the
relationship between the variables.
Note
An r value of +1 denotes a perfect positive linear relationship
between two sets of numbers. An r value of -1 denotes a perfect
negative linear correlation, which indicates an inverse relationship
between two variables: as one variable gets larger, the other gets
smaller. An r value of 0 means no linear relationship is present
between the two variables.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation Coefficient

The measure of linear relationship between two variables X and Y


is estimated by the sample correlation coefficient r , which is given
by
n n
! n !
X X X
n xi yi xi yi
i=1 i=1 i=1
r = v
u
n n
!2 n n
!2
u X X X X
t n xi2 xi n yi2 yi
u
i=1 i=1 i=1 i=1

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Correlation

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Example (Price Stocks)

In an effort to determine whether any correlation exists between


the price of stocks of airlines, an analyst sampled six days of
activity of the stock market. Using the following prices of Delta
stock and Southwest stock, compute the coefficient of correlation.
Stock prices have been rounded off to the nearest tenth for ease of
computation.

Delta(y) 47.6 46.3 50.6 52.6 52.4 52.7


Southwest(x) 15.1 15.4 15.9 15.6 16.4 18.1

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Example (Price Stocks)

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Example (Price Stocks)

The pearson correlation coefficent gives us a value r = 0.6445 and


the estimated simple linear regression equation is give by

y = 23.7088 + 1.6575x

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Example (Converted Sugar)

A study was made on the amount of converted sugar in a certain


process at various temperatures. The data were coded and
recorded as follows.
Converted Sugar(y) 8.1 7.8 8.5 9.8 9.5 8.9 8.6 10.2 9.3 9.2 10.5
Temperature (x) 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2.0

a) Estimate the linear regression line.


b) Estimate the amount of converted sugar produced when the
coded temperature is 1.75.
c) What percentage of the variability of the converted sugar is
explained by temperature?

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Example (Converted Sugar)

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

Example (Converted Sugar)

a) The estimated regression line is y = 6.4136 + 1.8091x.


b) The estimated amount of converted sugar at 1.75 temperature
is 6.4136 + 1.8091(1.75) = 9.5795.
c) The percentage of the variability of the converted sugar that is
explained by temperature 49.699%.
Francis Joseph Campe
na Simple Linear Regression
Introduction
Simple Linear Regression

EXERCISES

1) A study was made by a retail merchant top determine the


relation between weekly advertising expenditures and sales. The
following data were recorded:
Advert. 40 20 25 20 30 50 40 20 50 40 25 50
Sales 385 400 395 365 475 440 490 420 560 525 480 510

1 Plot a scatter diagram


2 Find the estimated regression line to predict weekly sales from
advertising expenditures.
3 Estimate the weekly sales when advertising cost are 35.
4 Interpret the Pearsons correlation coefficient.

Francis Joseph Campe


na Simple Linear Regression
Introduction
Simple Linear Regression

EXERCISES
2) The following data represents the average daily temperature
(Celsius) on 15 days and the quantity of soft drinks (in thousands
of bottles) sold by a company on each of those days:

Temp. (x) 73 78 83 93 96 101 75 78 78 83 93 98 101 94 101


Qty. (y) 33 31 43 55 60 57 30 41 35 49 52 54 65 51 61

1 Find the estimated regression line to predict quantity of


bottled soft drinks sold by the company depending on the
average temperature of the day.
2 What percent of the total variability in the quantity of
softdrinks sold is explained by the temperature of the day?
3 If the temperature on a given day is 90 C , on the average,
how many bottles of softdrink will be estimated to be sold by
the company?
Francis Joseph Campe
na Simple Linear Regression

You might also like