# Correlation and Simple Linear Regression Correlation Analysis Correlation

- Slides: 26

Correlation and Simple Linear Regression

Correlation Analysis Correlation analysis is used to describe the degree to which one variable is linearly related to another. There are two measures for describing correlation: 1. The Coefficient of Correlation or Coefficient of linear correlation or Pearson’s coefficient of linear correlation (ρ / r / R) 2. The Coefficient of Determination (r 2 / R 2 )

Correlation The correlation between two random variables, X and Y, is a measure of the degree of linear association between the two variables. The population correlation, denoted by , can take on any value from -1 to 1. -1 < < 0 0< <1 indicates a perfect negative linear relationship indicates a negative linear relationship indicates no linear relationship indicates a positive linear relationship indicates a perfect positive linear relationship The absolute value of indicates the strength or exactness of the relationship.

Illustrations of Correlation Y = -1 Y X Y = -. 8 X = 0 Y = 1 X X Y = 0 X Y =. 8 X

The coefficient of correlation: Sample Coefficient of Determination

The Coefficient of Correlation or Karl Pearson’s Coefficient of Correlation The coefficient of correlation is the square root of the coefficient of determination. The sign of r indicates the direction of the relationship between the two variables X and Y.

Simple Linear Regression • Regression refers to the statistical technique of modeling the relationship between variables. • In simple linear regression, regression we model the relationship between two variables • One of the variables, denoted by Y, is called the dependent variable and the other, denoted by X, is called the independent variable • The model we will use to depict the relationship between X and Y will be a straight-line relationship • A graphical sketch of the pairs (X, Y) is called a scatter plot

Using Statistics Scatterplot of Advertising Expenditures (X) and Sales (Y) 140 120 100 S ale s This scatterplot locates pairs of observations of advertising expenditures on the x-axis and sales on the y-axis. We notice that: ü Larger (smaller) values of sales tend to be associated with larger (smaller) values of advertising. 80 60 40 20 0 0 10 20 30 40 50 A d ve rtising ü The scatter of points tends to be distributed around a positively sloped straight line. ü The pairs of values of advertising expenditures and sales are not located exactly on a straight line. ü The scatter plot reveals a more or less strong tendency rather than a precise linear relationship. ü The line represents the nature of the relationship on average.

Examples of Other Scatterplots 0 Y Y Y 0 0 X X X Y Y Y X X X

Simple Linear Regression Model n The equation that describes how y is related to x and an error term is called the regression model. n The simple linear regression model is: y = a+ bx +e where: a and b are called parameters of the model, a is the intercept and b is the slope. e is a random variable called the error term.

Assumptions of the Simple Linear Regression Model • • • The relationship between X and Y is a straight-line relationship. The errors i are normally distributed with mean 0 and variance 2. The errors are uncorrelated (not related) in successive observations. That is: ~ N(0, 2) Y Assumptions of the Simple Linear Regression Model E[Y]= 0 + 1 X Identical normal distributions of errors, all centered on the regression line. X

Errors in Regression Y . { Xi X

SIMPLE REGRESSION AND CORRELATION Estimating Using the Regression Line First, lets look at the equation of a straight line is: Dependent variable Y-intercept Independent variable Slope of the line

SIMPLE REGRESSION AND CORRELATION The Method of Least Squares To estimate the straight line we have to use the least squares method. This method minimizes the sum of squares of error between the estimated points on the line and the actual observed points. The sign of r will be the same as the sign of the coefficient “b” in the regression equation Y = a + b X

SIMPLE REGRESSION AND CORRELATION The estimating line Slope of the best-fitting Regression Line Y-intercept of the Best-fitting Regression Line

SIMPLE REGRESSION – EXAMPLE (Appliance store) Suppose an appliance store conducts a five-month experiment to determine the effect of advertising on sales revenue. The results are shown below. (File: PPT_Regr_example) Advertising Exp. ($100 s) Sales Rev. ($1000 S) 1 1 2 1 3 2 4 2 5 4

SIMPLE REGRESSION AND CORRELATION If the slope of the estimating line is positive : - r is the positive square root If the slope of the estimating line is negative : - r is the negative square root The relationship between the two variables is direct

Steps in Hypothesis Testing using SPSS n n n State the null and alternative hypotheses Define the level of significance (α) Calculate the actual significance : p -value Make decision : Reject null hypothesis, if p≤ α, for 2 -tail test Conclusion

Summary of SPSS Regression Analysis Output Model Summary Adjusted R Std. Error of Model R R Square the Estimate 1. 904 a. 817. 756. 606 a. Predictors: (Constant), Advertising expenses ($00) ANOVAb Sum of Model Squares df 1 Regression 4. 900 Residual 1. 100 Total 6. 000 Mean Square F Sig. 1 4. 900 13. 364. 035 a 3. 367 4 a. Predictors: (Constant), Advertising expenses ($00) b. Dependent Variable: Sales revenue ($000)

Excel and SPSS Correlation Outputs Advt. Sales Advt. Sales 1 0. 903696 Correlations Advertising expenses ($00) Sales revenue ($000) Pearson Correlation Sig. (2 -tailed) N Pearson Correlation Sig. (2 -tailed) 1 Advertising expenses ($00) 1 Sales revenue ($000). 904* 5. 904* . 035 5 1 . 035 5 5 N *. Correlation is significant at the 0. 05 level (2 tailed).

Coefficientsa Model 1 (Constant) Advertising expenses ($00) Standar dized Unstandardized Coefficients Std. B Error Beta t Sig. -. 100. 635 -. 157. 885. 700 a. Dependent Variable: Sales revenue ($000) . 191 . 904 3. 656 . 035

Hypothesis Tests for the Correlation Coefficient H 0: = 0 H 1: 0 (No significant linear relationship) (Linear relationship is significant) Use p-value for decision making.

Analysis-of-Variance Table and an F Test of the Regression Model H 0 : The regression model is not significant H 1 : The regression model is significant

The p-value is 0. 035 Conclusion: There is sufficient evidence to reject the null hypothesis in favor of the alternative hypothesis. b is not equal to zero. Thus, the independent variable is linearly related to y.

Testing for the existence of linear relationship n We test the hypothesis: H 0: b = 0 (the independent variable is not a significant predictor of the dependent variable) H 1: b is not equal to zero (the independent variable is a significant predictor of the dependent variable). n If b is not equal to zero (if the null hypothesis is rejected), we can conclude that the Independent variable contributes significantly in predicting the Dependent variable.

Conclusion: Alternately, the actual significance is 0. 035. Therefore we will reject the null hypothesis. The advertising expenses is a significant explanatory variable.

- Simple linear regression and multiple linear regression
- Logistic regression vs linear regression
- Logistic regression vs linear regression
- Multiple regression formula
- Simple linear regression hypothesis
- Excel
- Useless regression chapter 16
- Simple linear regression
- Simple linear regression
- Simple linear regression spss
- Regression equation in excel
- Difference between regression and correlation
- R squared to correlation coefficient
- Difference between regression and correlation
- Difference between regression and correlation
- Prediction interval formula
- Absolute value of correlation coefficient
- Bivariate vs multivariate
- Contoh kasus regresi dan korelasi
- Positive vs negative correlation
- Regression vs correlation
- Coefficient of correlation
- Simple regression analysis
- Positive correlation versus negative correlation
- Knn linear regression
- Hierarchical multiple regression spss
- Linear regression riddle a