Lecture 3-2 Summarizing Relationships among variables ©

Slides:



Advertisements
Similar presentations
Things to do in Lecture 1 Outline basic concepts of causality
Advertisements

Chapter 12 Simple Linear Regression
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Curve Fitting ~ Least Squares Regression Chapter.
Covariance and Correlation: Estimator/Sample Statistic: Population Parameter: Covariance and correlation measure linear association between two variables,
Lecture 2 Describing Data II ©. Summarizing and Describing Data Frequency distribution and the shape of the distribution Frequency distribution and the.
Introduction to Regression Analysis
CORRELATON & REGRESSION
2.2 Correlation Correlation measures the direction and strength of the linear relationship between two quantitative variables.
SIMPLE LINEAR REGRESSION
Chapter 3 Summarizing Descriptive Relationships ©.
1 Simple Linear Regression Chapter Introduction In this chapter we examine the relationship among interval variables via a mathematical equation.
REGRESSION AND CORRELATION
Math 227 Elementary Statistics Math 227 Elementary Statistics Sullivan, 4 th ed.
SIMPLE LINEAR REGRESSION
Analysis of Individual Variables Descriptive – –Measures of Central Tendency Mean – Average score of distribution (1 st moment) Median – Middle score (50.
FIN357 Li1 The Simple Regression Model y =  0 +  1 x + u.
BCOR 1020 Business Statistics Lecture 24 – April 17, 2008.
Introduction to Linear Regression.  You have seen how to find the equation of a line that connects two points.
So are how the computer determines the size of the intercept and the slope respectively in an OLS regression The OLS equations give a nice, clear intuitive.
Linear Regression Analysis
Lecture 5 Correlation and Regression
Correlation & Regression
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 13 Linear Regression and Correlation.
Linear Regression and Correlation
1 Doing Statistics for Business Doing Statistics for Business Data, Inference, and Decision Making Marilyn K. Pelosi Theresa M. Sandifer Chapter 11 Regression.
SIMPLE LINEAR REGRESSION
Introduction to Linear Regression and Correlation Analysis
Correlation Scatter Plots Correlation Coefficients Significance Test.
Linear Regression and Correlation
Copyright © Cengage Learning. All rights reserved.
Correlation and regression 1: Correlation Coefficient
STATISTICS: BASICS Aswath Damodaran 1. 2 The role of statistics Aswath Damodaran 2  When you are given lots of data, and especially when that data is.
Section #6 November 13 th 2009 Regression. First, Review Scatter Plots A scatter plot (x, y) x y A scatter plot is a graph of the ordered pairs (x, y)
Simple Linear Regression. Correlation Correlation (  ) measures the strength of the linear relationship between two sets of data (X,Y). The value for.
Chapter 13 Statistics © 2008 Pearson Addison-Wesley. All rights reserved.
Linear Regression When looking for a linear relationship between two sets of data we can plot what is known as a scatter diagram. x y Looking at the graph.
Lecture 3-3 Summarizing r relationships among variables © 1.
Ch4 Describing Relationships Between Variables. Pressure.
© 2008 Pearson Addison-Wesley. All rights reserved Chapter 1 Section 13-6 Regression and Correlation.
Statistical Methods Statistical Methods Descriptive Inferential
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 13 Linear Regression and Correlation.
Lecture note 2 Summarizing Relationships among variables © by Aaed Al- Rabai.
1 Chapter 12 Simple Linear Regression. 2 Chapter Outline  Simple Linear Regression Model  Least Squares Method  Coefficient of Determination  Model.
Y X 0 X and Y are not perfectly correlated. However, there is on average a positive relationship between Y and X X1X1 X2X2.
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
Relationships If we are doing a study which involves more than one variable, how can we tell if there is a relationship between two (or more) of the.
Describing Relationships Using Correlations. 2 More Statistical Notation Correlational analysis requires scores from two variables. X stands for the scores.
LECTURE 9 Tuesday, 24 FEBRUARY STA291 Fall Administrative 4.2 Measures of Variation (Empirical Rule) 4.4 Measures of Linear Relationship Suggested.
Basic Statistics Linear Regression. X Y Simple Linear Regression.
Chapter 8: Simple Linear Regression Yang Zhenlin.
1 Data Analysis Linear Regression Data Analysis Linear Regression Ernesto A. Diaz Department of Mathematics Redwood High School.
Lecture 29 Dr. MUMTAZ AHMED MTH 161: Introduction To Statistics.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics Seventh Edition By Brase and Brase Prepared by: Lynn Smith.
LINEAR EQUATIONS & THEIR GRAPHS CHAPTER 6. INTRODUCTION We will explore in more detail rates of change and look at how the slope of a line relates to.
Correlation and Regression. O UTLINE Introduction  10-1 Scatter plots.  10-2 Correlation.  10-3 Correlation Coefficient.  10-4 Regression.
Correlation and Regression Basic Concepts. An Example We can hypothesize that the value of a house increases as its size increases. Said differently,
Chapter 13 Linear Regression and Correlation. Our Objectives  Draw a scatter diagram.  Understand and interpret the terms dependent and independent.
The simple linear regression model and parameter estimation
Department of Mathematics
Summarizing Descriptive Relationships
Regression and Correlation
Chapter 5 STATISTICS (PART 4).
Understanding Standards Event Higher Statistics Award
The Least-Squares Regression Line
CHAPTER 10 Correlation and Regression (Objectives)
Correlation and Regression
No notecard for this quiz!!
Simple Linear Regression and Correlation
Ch 4.1 & 4.2 Two dimensions concept
Summarizing Descriptive Relationships
Presentation transcript:

Lecture 3-2 Summarizing Relationships among variables ©

Numerical measures of summarizing the relationship between two variables 4To think of what numerical measures we need to represent relationships between variables, see the following three pairs of scatter plots.

Example 1: Relationships between the returns of different stocks Stock B return Stock A return * ** * * * * * * * * * * Stock D return Stock C Return * ** * * * * * * * * * Scatter plot I Scatter Plot II

Example 1 (Continued) 4Scatter Plot I shows a positive relationship while scatter plot II shows a negative relationship. 4We need a numerical measure that shows the direction of the relationship. 4 For this purpose, we use “Covariance”

Example 2: Relationships between advertisement spending and revenue Product I shows a clear linear relationship between the advertisement spending and revenue, while product II does not show much of a relationship. We need to have a numerical measure that shows the strength of linear relationship between two variables. We use “Correlation Coefficient”

Example 3: Number of promotion and sales Promotion seems to be more effective for Product A than product B in the sense that additional promotion brings greater increase in revenue (i.e., the “slope” is steeper). To measure the effectiveness of the promotion, we use “Regression Analysis”

Numerical measures of summarizing relationships 4This lecture covers the following topics 1.Covariance 2.Correlation coefficient 3.Regression Analysis

Covariance 4Covariance is a numerical measure that shows the direction of the relationship between two variables. 4Covariance is one of the most fundamental numerical measures of the relationship between two variables. It will appear in many areas (i.e., computation of returns of a portfolio of stocks) 4In the following slides, we will learn the logic behind the derivation of covariance.

How to measure the direction of the relationship x y * ** * * * * * * * * * * Positive Relationship w z * ** * * * * * * * * * Negative relationship * * * * * * Box I Box II Box III Box IV Box I Box II Box III Box IV

How to measure the direction of the relationship 4From the previous two scatter plots, notice that: 1.When two variables show a positive relationship, there are more data points in Box I and Box III, than in Box II and Box IV 2.When two variables show a negative relationship, there are more data points in Box II and Box IV, than Box I and Box III. 4We use these facts to measure the direction of the relationship.

How to measure the direction of the relationship: Example Number of promotions Revenue from the product A in 1000 yen The data shows the relationships between the number of promotions and revenue. (It is same data set used in the previous handout. Revenue is now denoted in 1000 yen) Suppose you want to know if there is positive relationship between these two variables. Next slide is the scatter plot of this relationship.

How to measure the direction of the relationship: Example, contd Number of promotions and revenue appears to have a positive relationship. Notice that most of the data points are either in Box I or Box III What can we say about Box I and Box III? See the next slide

How to measure the direction of the relationship: Example, contd For each data point, you can compute the distances from the means. Then we can notice that, for any data points in Box I, both of the distances are positive. For any data points in Box III, both of the distances are negative. See the next slide Distance from the mean of X = (X- the mean of X) Distance from the mean of Y = (Y- the mean of Y)

How to measure the direction of the relationship: Example, contd 4For a data point in Box I, distances from the means are both positive. That is, both (X- ) and (Y- ) are positive. Therefore, if we multiply the two distances together, we will have a positive number 4For a data point in Box III, distance from the means are both negative. That is (X- ) and (Y- ) are both negative. Therefore, if we multiply the two distances together, we will again have a positive number. 4Now, what we can say about Box II and Box IV? See next slide.

How to measure the direction of the relationship: Example, contd 4For any points in box II and box IV, one distance will be positive and the other distance will be negative. So if we multiply them together, we will have a negative number.

How to measure the direction of the relationship: Example, contd 4Consider, for each data point, you compute the distances from the means, then multiply them together. Further, consider you sum all the multiplied distances together. If the resulting number is positive, this roughly indicates that there are more data points in Box I and Box III than Box II and Box IV. This in turn indicates that the data shows positive relationship. If the resulting number is negative, this indicates a negative relationship. 4This is the basic idea of measuring the direction of the relationship between two variables, and this is the first step to compute “Covariance”.

Computation of the Sample Covariance 4The sample covariance is computed in the following way. 1.Compute the mean for each variable. 2.For each observation, and for each variable, compute the distances from the means, i.e. compute (X- ) and (Y- ). Then multiply them together. 3.Sum all the multiplied differences. 4.Divide the sum of the multiplied differences by n-1, (that is the number of observations minus 1).

Computation of Sample covariance Exercise 4Open “Computation of Covariance” data set. Using data on the sheet “data 1”, compute the covariance between the number of promotions and the revenue.

Exercise, contd 4The covariance between the number of promotions and revenue is Positive covariance indicates that the number of promotions and revenue have a positive relationship.

Characteristics of Covariance 1.If covariance is positive, the two variables have a positive relationship 2.If covariance is negative, the two variables have a negative relationship. 3.A large value of covariance does not indicate that the two variables have a strong linear relationship.

A note on Covariance 4One may be tempted to conclude that if the covariance is larger, the relationship between two variables is stronger (in the sense that they have stronger linear relationship) 4However, this is not true. To see this, go over the next example.

A note on Covariance, example 4Open the data “Computation of Covariance”, work sheet “data 2”. Compute the covariance between variable X and Y. (The data 2 is in fact the same as data 1. Only the difference is, the revenue is measure in 1000 yen for data 1, while it is measure in 1 yen for data 2.)

Example, contd 4The covariance for data 2 is This compares the covariance for data 1 which was Even if data 1 and data 2 show exactly the same relationship, covariance for data 2 is much larger. This is simply because the unit of measurement for revenue is different between data 1 and data2. 4This shows that a larger covariance does not mean a stronger relationship. (In this particular example, relationship is exactly the same.) 4To show the strength of the relationship, we use “ Correlation coefficient ”.

Sample Correlation Coefficient The measure of the strength of linear relationship 4Correlation coefficient between X and Y, denoted as r xy, is computed as

Characteristics of Correlation Coefficient 1.The correlation coefficient ranges from –1 to +1 with, r xy = +1 indicates a perfect positive linear relationship: the X and Y points would plot an increasing straight line. r xy = 0 indicates no linear relationship between X and Y. r xy = -1 indicates a perfect negative linear relationship: the X and Y points would plot a decreasing straight line. 2. Positive correlations 2. Positive correlations indicate positive or increasing linear relationships with values closer to +1 indicating data points closer to a straight line and closer to 0 indicating greater deviations from a straight line. 3. Negative correlations 3. Negative correlations indicate decreasing linear relationships with values closer to –1 indicating points closer to a straight line and closer to 0 indicating greater deviations from a straight line. 4.Correlation coefficient is not the slope of the relationship.

Correlation Coefficient Exercise 4Open “Computation of Covariance”. Compute correlation coefficient between the number of promotion and revenue for both data 1 and data 2.

Correlation Coefficient exercise 4Exercise 1: Open Data set “Correlation Coefficient Exercise 1”. This data set shows the relationships between advertisement cost and revenue for two different products. First, produce a scatter plot for each product. Then compute correlation coefficient for each product. 4Exercise 2: Open data set “Correlation Coefficient Exercise 2”. This data set contains two pairs of variables. First, make a scatter plot for each pair in a single graph. Second, compute correlation coefficient for each pair of the variables.

Exercise 1, Answer Product I shows strong positive linear relationship between advertisement cost and revenue. Correlation coefficient is 0.95, which is close to 1. Product II does not show much linear relationship. The correlation coefficient is close to 0.05, which is close to 0.

Exercise 2 (Answer)

Correlation Coefficient Exercise 2 (Answer) 4First, for both pairs, the correlation coefficients are -1. This means that the relationships are perfectly (negatively) linear for both pairs of variables. 4Also note that, even though the slope for the pair I is much steeper, the correlation coefficients are the same for both pairs. This shows that correlation coefficient is not the slope of the relationship.

Correlation Coefficient 4To have more idea about the coefficient correlation, see the following slides

Scatter Plots and Correlation (Figure 3.6) X Y (a) r =.8

X Y (b)r = -.8 Scatter Plots and Correlation (Figure 3.6)

X Y (c) r = 0

Understanding the mathematical notation for the covariance and correlation coefficient. Obs IDVariable X Variable Y 1X1X1 Y1Y1 2X2X2 Y2Y2 ::: nXnXn YnYn This is a typical data format for the use of describing two variables. Using this format, we would like to represent the covariance, and the correlation coefficient using mathematical notations.

Understanding the mathematical notation for the sample covariance and sample correlation coefficient. Obs IDVariable X Variable Y Each X – the mean of X Each Y- the mean of Y (each X- ) * (each Y- the mean Y) 1X1X1 Y1Y1 (X 1 - )(Y 1 - )(X 1 - )*(Y 1 - ) 2X2X2 Y2Y2 (X 2 - )(Y 2 - )(X 2 - )*(Y 2 - ) ::::: nXnXn YnYn (X n - )(Y n - )(X n - )*(Y n - ) The mean Covariance is computed by summing the last colum, then divide the sum by (n-1). Therefore, the mathematical notation for the covariance is given by Next Slide

Mathematical Notation for the sample covariance The mathematical notation for covariance between variable X and variable Y, denoted by either Cov(X,Y) or s xy, is given as where x i and y i are the observed values, and are the sample means, and n is the sample size.

Mathematical Notation for the sample correlation coefficient sample correlation coefficient, r xy, The sample correlation coefficient, r xy, is computed by the equation S x is the standard deviation of variable X. S y is the standard deviation for variable Y.

3. Ordinary Least Square estimation -A Regression Analysis- This is the scatter plot we saw in Lecture 3-1. From the graph, we can see that promotion is more effective for product A than product B. Then, how do we measure the effectiveness of promotions? Correlation coefficient cannot be used for this purpose since it is not the measure of the slope

Ordinary Least Square estimation A Regression Analysis To measure the effectiveness of promotion for each product, we use regression analysis. In this handout, we will talk about a type of regression analysis called “Ordinary Least Square Estimation”

Ordinary Least Square Estimation Ordinary Least Square (OLS) estimation is a method to find a linear equation that best fits the data. Left hand graph is a simple scatter plot of the relationship between the number of promotions and the revenue from product A. The right hand side graph shows the OLS estimation of the linear relationship between the number of promotion and revenue for the product A. Next several slides show the logic behind the OLS estimation.

Ordinary Least Square Estimation (Two variable case) Ordinary Least Square Estimation Ordinary Least Square Estimation assume that the number of promotions and the revenue from the product has the following relationship. More generally, ordinary least square estimation assume that, between variable Y and variable X, there is a following linear relationship. An equation, like this, that describes a relationship among variables is called a “model”, or “regression equation”. The model above contains two parameters,  0 and  1. They are called the model coefficients. The coefficient  0, is the intercept on the Y-axis and the coefficient  1 is the slope. (The slope is the change in Y for every unit change in X.)

Ordinary Least Square Estimation (Two variable case) 4Ordinary Least Square Estimation is a method to find (estimate) the values for β 0 and β 1 that fit the equation to the data “best”. 4The criteria to choose (estimate) the values for β 0 and β 1 is described in the following slides.

Ordinary Least Square Estimation Criteria to estimate the parameter values X (number of promotion) Y (Sales from Product A) eiei (x i, y i ) Vertical distance from the equation to i th data point We choose (estimate) the values for β 0 and β 1 so that the sum of the squared (vertical) distances from the equation to each data point is minimized. (Therefore, this estimation is called ordinary least square estimation.) Excel automatically estimates these values.

Ordinary Least Square Estimation Using Excel, Example Excel can estimate the linear equation model, and draw the line at the same time. The estimated β 0 =105827, and β 1 = Exercise: Open Data “OLS Exercise 1-Promotion and Sales” and reproduce this figure.

Things we can do with OLS 4Using the estimated equation, we can 1.Find the effect of promotion on the revenue for product A. 2.Forecast revenue for different number of promotions. 3.Find the number of promotions necessary to achieve your sales goal.

Effect of promotion on the sales of product A The estimated slope parameter β 1 is the estimated effect of promotion on the revenue from product A. β 1 =99,060 means that if you increase the number of promotion by one, the revenue would increase by 99,060 on average.

Forecasting Revenue 4Estimated equation can be used to forecast revenue for different number of promotions. 4Suppose that you would like to know what would be the expected revenue from product A if the number of promotions is 12. Then expected revenue given the number of promotion equal 12 can be computed as (Expected revenue when number of promotion is 12) =99060* =1,294,547 4So you would expect the revenue to be roughly 1.3 million yen.

Finding the number of promotions that achieve sales goal 4Suppose that you would like achieve the sales of 3,000,000. How many promotions are necessary to achieve this goal? 4To answer this question, simply solve the following equation for X. 3,000,000=99060X X=29.2 4Therefore, if you would like to achieve at least 3,000,000, you would need to utilize promotion 30 times.

Exercise 4Open data “OLS Exercise 1-Promotion and Sales”. Plot the relationship between number of promotion and revenue for product A and product B. 4Estimate the following equation (revenue)= β 0 +β 1 (number of promotion) separately for product A and Product B using OLS. 4Are the effect of promotion different for product A and Product B? 4What would be the revenue from Product B if the number of promotion is 12. 4Suppose the sale goal from product B is 1,000,000.How many promotions are necessary to achieve this goal?

More Topics on Ordinary Least Square Estimations Above graph shows a relationship between advertisement cost and revenue along with the estimated linear equation. The estimated slope coefficient is 13.4, which means that every 1000 yen you spend on advertisement, revenue increases by 13.4 thousand yen. Next Page

More Topics on Ordinary Least Square Estimations However, the graph seems to indicate that there is not much relationship between advertisement spending and revenue. When we estimate linear equation, we typically would like to know if advertisement has any effect on the revenue at all. To answer such a question, just estimating β 0 and β 1 is not enough. We need more information.

More Topics on Ordinary Least Square Estimations To answer the following question, “Would the advertisement have any impact on the revenue?”, we use the concept of “hypothesis testing” using “t-statistics”. This is the topic for the next class.

Topics to be covered next week 4We will cover several more topics on ordinary least square estimation, which include 1.Testing whether advertisement spending has any effect on revenue, using t-statistics. 2.Ordinary Least Square estimation when there are more explanatory variables. 3.Ordinary Least Square estimation when you have a panel data ( repeated observations over time) 4.Analyzing the effect of a policy change (i.e, a new introduction of tax, change in compensation scheme etc) using OLS.