Correlation.

Slides:



Advertisements
Similar presentations
Topic 12: Multiple Linear Regression
Advertisements

Computational Statistics. Basic ideas  Predict values that are hard to measure irl, by using co-variables (other properties from the same measurement.
Kin 304 Regression Linear Regression Least Sum of Squares
6-1 Introduction To Empirical Models 6-1 Introduction To Empirical Models.
Regression Analysis Once a linear relationship is defined, the independent variable can be used to forecast the dependent variable. Y ^ = bo + bX bo is.
Chapter 10 Curve Fitting and Regression Analysis
Correlation Correlation is the relationship between two quantitative variables. Correlation coefficient (r) measures the strength of the linear relationship.
Regression Regression: Mathematical method for determining the best equation that reproduces a data set Linear Regression: Regression method applied with.
LINEAR REGRESSION: Evaluating Regression Models. Overview Standard Error of the Estimate Goodness of Fit Coefficient of Determination Regression Coefficients.
Correlation and Simple Regression Introduction to Business Statistics, 5e Kvanli/Guynes/Pavur (c)2000 South-Western College Publishing.
Least Square Regression
Least Square Regression
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 17 Least Square Regression.
Lesson #32 Simple Linear Regression. Regression is used to model and/or predict a variable; called the dependent variable, Y; based on one or more independent.
Probability & Statistics for Engineers & Scientists, by Walpole, Myers, Myers & Ye ~ Chapter 11 Notes Class notes for ISE 201 San Jose State University.
Variance and covariance Sums of squares General linear models.
Regression and Correlation Methods Judy Zhong Ph.D.
Regression Analysis What is regression ?What is regression ? Best-fit lineBest-fit line Least squareLeast square What is regression ?What is regression.
Biostatistics Unit 9 – Regression and Correlation.
Managerial Economics Demand Estimation. Scatter Diagram Regression Analysis.
Section 5.2: Linear Regression: Fitting a Line to Bivariate Data.
Applied Quantitative Analysis and Practices LECTURE#23 By Dr. Osman Sadiq Paracha.
Thomas Knotts. Engineers often: Regress data  Analysis  Fit to theory  Data reduction Use the regression of others  Antoine Equation  DIPPR.
Regression Regression relationship = trend + scatter
1 Multiple Regression A single numerical response variable, Y. Multiple numerical explanatory variables, X 1, X 2,…, X k.
Correlation and Regression Basic Concepts. An Example We can hypothesize that the value of a house increases as its size increases. Said differently,
Environmental Modeling Basic Testing Methods - Statistics III.
Math 4030 – 11b Method of Least Squares. Model: Dependent (response) Variable Independent (control) Variable Random Error Objectives: Find (estimated)
Regression Analysis. 1. To comprehend the nature of correlation analysis. 2. To understand bivariate regression analysis. 3. To become aware of the coefficient.
LESSON 6: REGRESSION 2/21/12 EDUC 502: Introduction to Statistics.
Chapter 11: Linear Regression and Correlation Regression analysis is a statistical tool that utilizes the relation between two or more quantitative variables.
Using SPSS Note: The use of another statistical package such as Minitab is similar to using SPSS.
Multiple Regression (continued)& Polynomial Regression.
Correlation and Regression Chapter 9. § 9.2 Linear Regression.
Linear regression models. Purposes: To describe the linear relationship between two continuous variables, the response variable (y- axis) and a single.
Summary of the Statistics used in Multiple Regression.
Chapter 14 Introduction to Regression Analysis. Objectives Regression Analysis Uses of Regression Analysis Method of Least Squares Difference between.
Simple and multiple regression analysis in matrix form Least square Beta estimation Beta Simple linear regression Multiple regression with two predictors.
Correlation and Regression Basic Concepts. An Example We can hypothesize that the value of a house increases as its size increases. Said differently,
Yandell – Econ 216 Chap 15-1 Chapter 15 Multiple Regression Model Building.
Chapter 4: Basic Estimation Techniques
Chapter 14 Introduction to Multiple Regression
Regression Analysis AGEC 784.
11-1 Empirical Models Many problems in engineering and science involve exploring the relationships between two or more variables. Regression analysis.
Chapter 12 Simple Linear Regression and Correlation
Part 5 - Chapter
Econometrics Econometrics I Summer 2011/2012
Kin 304 Regression Linear Regression Least Sum of Squares
Ch12.1 Simple Linear Regression
Correlation and Regression Analysis
Multiple Regression and Model Building
The slope, explained variance, residuals
BPK 304W Regression Linear Regression Least Sum of Squares
Regression model with multiple predictors
Regression Analysis Week 4.
6-1 Introduction To Empirical Models
Chapter 12 Simple Linear Regression and Correlation
Multiple Regression Models
Simple Linear Regression
Hypothesis testing and Estimation
J.-F. Pâris University of Houston
Linear regression Fitting a straight line to observations.
Discrete Least Squares Approximation
Least Square Regression
Example on the Concept of Regression . observation
Simple Linear Regression
Multivariate Analysis Regression
3 basic analytical tasks in bivariate (or multivariate) analyses:
Topic 11: Matrix Approach to Linear Regression
Regression and Correlation of Data
Presentation transcript:

Correlation

Correlation Coefficient Array

Correlation Multiple regression Polynomial regression Multivariate transformations

Multiple Regression

Regression Until now we have been concerned with the relationship between two variables Where more complex relationships are concerned it is often better to consider multiple regression or more correctly, multiple linear regression.

Where e is a random error term Theory Consider simplest form of multiple regression where y is the dependant variable and x1 and x2 independent variables y = b0 + b1x1 + b2x2 + e Where e is a random error term

Theory y = b0 + b11x11 + b21x21 + e1

Theory y1 = b0 + b11x11 + b21x21 + e1 y2= b0 + b12x12 + b22x22 + e2 : : : : : : yi = b0 + b1ix1i + b2ix2i + ei yn = b0 + b1nx1n + b21x2n + en yi = nb0 + b1x1i + b2x2i

Theory yi = nb0 + b1x1i + b2x2i Least Square “Best” Fit Minimize the sum of squares of error F = ei2 = [yi - b0 - b1x1i - b2x2i]2

F = ei2 = [yi - b0 - b1x1i - b2x2i]2 Theory F = ei2 = [yi - b0 - b1x1i - b2x2i]2 dF/db1 = x1y - b2x1x2 - b1x12 and dF/db2 = x2y - b1x1x2 - b2x22

b1 = [(x22)(x1y)-(x1x2)(x2y)] Theory dF/db1 = x1y - b2x1x2 - b1x12 dF/db2 = x2y - b1x1x2 - b2x22 b1 = [(x22)(x1y)-(x1x2)(x2y)] [(x12)x22)-x1x2)2]

Theory dF/db1 = x1y - b2x1x2 - b1x12 b1 = [(x22)(x1y)-(x1x2)(x2y)] [(x12)(x22)-(x1x2)2] b2 = [(x12)(x2y)-(x1x2)(x1y)] [(x22)(x12)-(x1x2)2]

b0 = mean(y)-b1mean(x1)-b2mean(x2) Theory b0 = mean(y)-b1mean(x1)-b2mean(x2)

Analysis of Variance Total SS = y2 - [y]2/n Reg SS = b1x1y + b2x2y More generally : Reg SS = [bixiy] Residual SS = Total SS - Reg SS

Analysis of Variance Table

Example

Example x12=1,753.7; x22=23.2; x1y=-65.2  x2y=7,210.0; x1x2=-156.7; y2=3,211,504

b1 = [(x22)(x1y)-(x1x2)(x2y)] Example x12=1,753.7; x22=23.2; x1y=-65.2  x2y=7,210.0; x1x2=-156.7; y2=3,211,504 b1 = [(x22)(x1y)-(x1x2)(x2y)] [(x12)(x22)-(x1x2)2]

b1 = [(x22)(x1y)-(x1x2)(x2y)] Example x12=1,753.7; x22=23.2; x1y=-65.2  x2y=7,210.0; x1x2=-156.7; y2=3,211,504 b1 = [(x22)(x1y)-(x1x2)(x2y)] [(x12)x22)-x1x2)2] b1 = [(23.2)(-65.2)-(-156.7)(7210)] [(1753.7)(23.2)-(-156.6)2] = -23.75

b2 = [(x12)(x2y)-(x1x2)(x1y)] Example x12=1,753.7; x22=23.2; x1y=-65.2  x2y=7,210.0; x1x2=-156.7; y2=3,211,504 b2 = [(x12)(x2y)-(x1x2)(x1y)] [(x12)(x22)-(x1x2)2] b2 = [(1753.7)(-7210)-(-156.7)(-65,194)] [(1753.7)(23.2)-(-156.6)2] = -150.27

Example b0 = 6561 - (-23.75)(96.2) - (150.27)(16.7) = 6336 y = 6336 - 23.75 x1 + 150.27 x2

Analysis of Variance Table

Analysis of Variance Table

Analysis of Variance Table

Analysis of Variance Table

Analysis of Variance Table

Analysis of Variance Table

Matrix Formation of Multiple Regression y = b0 + b1x1 + b2x2 + ….. + bnxn e Y = X x b + E

Introduction to Matrixes } 6b1 + 3b2 = 24 4b1 + 4 b2 = 20 Simultaneous equations [ ] [ ] [ ] } 6 3 b1 24 4 4 b2 20 Matrix Form x =

Matrix Formation y = b0 + b1x1 + b2x2 + ….. + bnxn e Y = X x b + e

Matrix Formation Y = X x b

F = ee’ = YY’ - 2YX’b + bb’ XX’ Matrix Formation F = ee’ = YY’ - 2YX’b + bb’ XX’ dF/db = 2XX’ b - 2YX’ = 0 XX’b = YX’

Two Variable Example = x11 x21 x31 x41 x51 x11 x12 x12 x1x2

Matrix Formation XX’ =

Two Variable Example x11 x12 x21 x22 y1 y2 x1y x2y x =

Matrix Formation = YX’

[ ] [ ] [ ] Two Variable Example x12 x1x2 b1 x1y x2x1 x22 b2 x2y = XX’ x b = YX’ (XX’)-1XX’ x b = (XX’)-1YX’ b = (XX’)-1YX’

Matrix Formation b = (XX’)-1 YX’ Find the inverse of XX’ Donated by (XX’)-1 b = (XX’)-1 YX’

Matrix Inverse with Two Variables A x A-1 = [U]

Matrix Inverse with Two Variables A x A-1 = [U] [ ] [ ] [ ] a b c d 1 ad-bc d -b -c a 1 0 0 1 = x

Matrix Inverse with Two Variables [ ] [ ] [ ] x12 x1x2 b1 x1y x2x1 x22 b2 x2y x =

Matrix Inverse with Two Variables [ ] [ ] [ ] x12 x1x2 b1 x1y x2x1 x22 b2 x2y x = XX’ x b = X’Y

Matrix Inverse with Two Variables [ ] [ ] [ ] x12 x1x2 b1 x1y x2x1 x22 b2 x2y x = XX’ x b = X’Y [ ] [ ] x12 x1x2 x22 - x1x2 x2x1 x22 - x2x1 x12 1 ad-bc = [U] x XX’ x (XX’)-1 = Unit

Matrix Inverse with Two Variables [ ] [ ] [ ] x22 - x1x2 x1y b1 -x2x1 x12 x2y b2 1 ad-bc = x (XX’)-1 x Y = b = x22 x12 - [x2x1]2 1 ad-bc

Compare Matrix with None b1 = [(x22)(x1y)-(x1x2)(x2y)] [(x12)(x22)-(x1x2)2] b2 = [(x12)(x2y)-(x1x2)(x1y)] [(x22)(x12)-(x1x2)2]

Forward Step-Wise Regression

Two Variable Multiple Regression

Analysis of Variance Table y = 6336 - 23.75 x1 + 150.27 x2

Two Variable Multiple Regression There is significant regression effects by regressing both independent variables onto the dependant variable. The is significant linear relationship between height (x1) and yield but no relationship between yield and tiller. There is significant linear relationship between tiller (x2) and yield and no relationship between yield and height.

Two Variable Multiple Regression We may have made the relationship too complex by including both variables. Forward Step-wise Regression. Backward Step-wise Regression.

Two Variable Multiple Regression

Analysis of Variance Table y = 10,131 - 37.11 Height (x1)

Analysis of Variance Table y = 6336 - 23.75 Height + 150.27 Tiller

Analysis of Variance Table y = 6336 - 23.75 Height + 150.27 Tiller

Analysis of Variance Table y = 6336 - 23.75 Height + 150.27 Tiller

Analysis of Variance Table y = 10,131 - 37.11 Height (x1)

Forward Step-Wise Regression Example 2 20 Spring Canola Cultivars Average over 10 environments Seed yield; plant establishment; days to first flowering, days to end of flowering; plant height; and oil content

Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 1.00 F.Start -0.30 F.Finish -0.15 0.93 Height -0.45 0.72 0.70 0.04 -0.51 -0.52 -0.27 0.31 -0.82 -0.80 -0.53 -0.21

Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 1.00 -0.30 -0.15 -0.45 0.04 0.31 F.Start 0.93 0.72 -0.51 -0.82 F.Finish 0.70 0.52 0.80 Height -0.27 -0.53 -0.52 -0.21 -0.80

Analysis of Variance Table y = 3,194 - 32.9 x F.Start

A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 1.00 -0.30 -0.15 -0.45 0.04 0.31 F.Start 0.93 0.72 -0.51 -0.82 F.Finish 0.70 0.52 0.80 Height -0.27 -0.53 -0.52 -0.21 -0.80 A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x

A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 1.00 -0.30 -0.15 -0.45 0.04 0.31 F.Start 0.93 0.72 -0.51 -0.82 F.Finish 0.70 0.52 0.80 Height -0.27 -0.53 -0.52 -0.21 -0.80 A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x

A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 1.00 -0.30 -0.15 -0.45 0.04 0.31 F.Start 0.93 0.72 -0.51 -0.82 F.Finish 0.70 0.52 0.80 Height -0.27 -0.53 -0.52 -0.21 A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x

A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 1.00 -0.30 -0.15 -0.45 0.04 0.31 F.Start 0.93 0.72 -0.51 -0.82 F.Finish 0.70 0.52 0.80 Height -0.27 -0.53 -0.52 -0.21 A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x

A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 1.00 -0.30 -0.15 -0.45 0.04 0.31 F.Start 0.93 0.72 -0.51 -0.82 F.Finish 0.70 0.52 0.80 Height -0.27 -0.53 -0.52 -0.21 -0.80 -0.63 A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x

A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 0.91 0.38 -0.23 0.11 0.06 F.Start F.Finish 0.36 0.03 -0.05 0.04 Height 0.48 0.10 0.74 0.21 -0.63 0.33 A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x

Analysis of Variance Table y = 5335 - 38.4 F.Start - 57.7 %Oil

A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x Example #2 Character Est. F.St. F.Fi. Ht. %Oil Yield Establish 0.90 0.39 -0.23 0.04 F.Start F.Finish 0.36 Height 0.48 0.11 0.05 0.29 A[i,j] = A[i,j]–{Ai,x x Ax,j}/Ax,x

Analysis of Variance Table y = 6779 - 30.4 FS - 63.0 %Oil + 8.7 Height

Analysis of Variance Table y = 5335 - 38.4 F.Start - 57.7 %Oil

Forward Step-Wise Regression Enter the variable “most associated with the dependant variable. Check to see if relationship is significant. Adjust the relationship between the dependant variable and the other remaining variables, accounting for the relationship between the dependant variable and the entered variable(s).

Forward Step-Wise Regression

Forward Step-Wise Regression Enter most correlated variable

Forward Step-Wise Regression Enter most correlated variable Check that entry is significant

Forward Step-Wise Regression Enter most correlated variable Check that entry is significant Adjust correlation with other variables

Forward Step-Wise Regression Enter most correlated variable Check that entry is significant Adjust correlation with other variables

Polynomial Regression

Polynomial Regression

Polynomial Regression

Polynomial Regression

Analysis of Variance Table y = -36.25 + 15.730 N - 0.218 N2

Polynomial Regression y = -36.25 + 15.730 N - 0.218 N2 dY/dN = Slope

Polynomial Regression y = -36.25 + 15.730 N - 0.218 N2 dy/dN = +15.730 - 0.436 N 0.436 N = 15.730 n = 36.08

Multivariate Transformation