Академический Документы
Профессиональный Документы
Культура Документы
INTRODUCTION
INTRODUCTION
SCATTER DIAGRAM
• Regression analysis - produces an equation
that express the dependent variable (Y) as a
function of independent variables (X). • In a scatter diagram, the independent variable is plotted along the
horizontal X-axis and the dependent variable is plotted along the
vertical Y-axis.
• Correlation analysis - measures the
• Information available in a scatter plot:
strength of a relationship.
(i) Type of a relationship
(Linear / Nonlinear / No relationship)
• Scatter Diagram / Scatter plot - An (ii) Direction of a relationship
initial step to investigate the relationship (Positive / Negative)
between the dependent and independent
• The less scattered the points in the scatter diagram, the higher
variable. is the degree of relationship between the dependent and
independent variables.
Y Y
X
Positive Linear Relationship
Y
X X
X
Nonlinear Relationship
Negative Linear Relationship
Nornadiah Mohd Razali/FSKM/UiTM 5 Nornadiah Mohd Razali/FSKM/UiTM 6
1
3/23/2011
Height 73 69 72 70 72 66 72 72 74
X Weight 201 170 180 200 190 175 205 185 186
SS XY XY XX
X2 , SSYY Y 2 r 0.7 Strong/high correlation
n n n
1 Perfect correlation
2
3/23/2011
EXAMPLE 3 EXAMPLE 3
SS XY
Y _____ Y _____ XY _____ X _____ X _____ n _____ r
2 2
SS XX SSYY
SS XY XY
X Y
n
X 2
Interpretation: There is a ______ , ________ linear correlation
SS XX X 2
n between __________ and ___________.
Y 2
SSYY Y 2
n
Nornadiah Mohd Razali/FSKM/UiTM 13 Nornadiah Mohd Razali/FSKM/UiTM 14
EXAMPLE 4 EXAMPLE 4
SS XY
Y _____ Y _____ XY _____ X _____ X _____ n _____ r
2 2
SS XX SSYY
SS XY XY
X Y
n
X 2 Interpretation: There is a ______ , ________ linear correlation
SS XX X
2
n between __________ and ___________.
Y 2
SSYY Y 2
n
Nornadiah Mohd Razali/FSKM/UiTM 15 Nornadiah Mohd Razali/FSKM/UiTM 16
• Regression analysis – analyze the relationship • The equation is called a linear regression
between dependent and independent variable (s). model.
• Simple linear regression – analyze the relationship • A regression model describes the
between one dependent variable and one independent relationship between the dependent and
variable. independent variables.
• Multiple linear regression – analyze the relationship • The regression line can be used to make
between one dependent variable and more than one a prediction about the value of y for a
independent variables. given value of x.
3
3/23/2011
ASSUMPTIONS OF A LINEAR
REGRESSION ANALYSIS
In general, a simple linear regression model
is written as:
• In the linear regression model, the values of • Interpretation of the regression coefficient:
A and B are unknown. Therefore, we have to
estimate their values by using the least
square method. a in the regression model means:
• The regression model with the estimated The value of y when x=0
values of A and B is called an estimated (If x=0 is in the range of the dataset)
regression model/regression line and is
written as follows, No practical meaning
(If x=0 is not in the range of the dataset)
ŷ = a + bx
4
3/23/2011
EXAMPLE 5 EXAMPLE 5
y x
From the previous calculation,
a b
X _____ Y _____ SS xy _____ SS xx _____
n n
SS xy Interpretation:
b
SS xx
Interpretation:
EXAMPLE 6 PREDICTION
Refer to Example 2. Find the regression equation and • Given a value of X, we can predict the value of Y by using
interpret the values of the regression coefficient. the estimated regression equation.
Example 7:
COEFFICIENT OF
EXAMPLE 8
DETERMINATION
• Coefficient of determination, r2, measures the total Compute the coefficient of determination for Example 1.
variation in Y that is explained by the independent Interpret the values.
variable, X.
From the previous calculation,
SS xy
r2 b SS xy _____ SS xx _____ b _____
SS yy
SS xy
correlation coefficient, r r 2 b
2
SS yy
• If r2 =0.80, this means that 80% of the total variation Interpretation:
in Y is explained by X.
Nornadiah Mohd Razali/FSKM/UiTM 29 Nornadiah Mohd Razali/FSKM/UiTM 30
5
3/23/2011
CHECKING THE
EXAMPLE 9
ASSUMPTION
Compute the coefficient of determination for Example 2. • To check the normality assumption, we use the normal
Interpret the values. probability plot or Q-Q plot.
SS xy
r 2 b
SS yy
Interpretation:
EXAMPLE 10 EXAMPLE 10
6
3/23/2011
EXAMPLE 10 EXAMPLE 10
EXAMPLE 11
EXAMPLE 11
OCTOBER 2010
EXAMPLE 11 EXAMPLE 11
7
3/23/2011
EXERCISE 1 EXERCISE 1
EXERCISE 1 EXERCISE 2
a) Construct a scatter diagram for the data. Table below lists the amount (in million of RM) spent on
advertising and the total sales (in millions of RM) for the
b) Compute SSxx, SSyy, and SSxy.
year 2007 for a sample of six different hotels:
c) Calculate r and r2 and explain the values obtained.
Advertising Total Sales
d) Obtain a regression equation using the least square Expenditure
method. 2.0 47
e) Interpret the meaning of the values of a and b 1.6 35
calculated in c). 1.0 23
f) Draw the equation above on the graph in a). 3.5 74
g) Predict the monthly auto insurance premium for a 1.2 26
driver with 10 years of driving experience. 4.5 85
Nornadiah Mohd Razali/FSKM/UiTM 45 Nornadiah Mohd Razali/FSKM/UiTM 46
EXERCISE 2 EXERCISE 3
a) Construct a scatter diagram for the above data. A regression analysis was done to examine the relationship
Comment on the diagram. between the working experience (in years)of tourist
b) Compute/calculate the equation for the regression guides and their level of knowledge regarding the local
line. Interpret the coefficient of the regression line. places of interest. The following table gives the knowledge
c) Does the model useful in explaining the total sales? scores of 10 tourist guides and their working experience.
If yes, give your reason.
d) Forecast the total sales of a hotel that plans to
spend RM5 million on advertising for the year 2010.
8
3/23/2011
EXERCISE 3 EXERCISE 3