Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Like this presentation? Why not share!

2,297 views

Published on

Data Analysis - Correlation and regression

No Downloads

Total views

2,297

On SlideShare

0

From Embeds

0

Number of Embeds

18

Shares

0

Downloads

0

Comments

0

Likes

6

No embeds

No notes for slide

- 1. Data Analysis II: Explaining Observed Differences – Cross Tabulation, Correlation and Regression<br />Lesson 16<br />
- 2. Explaining Variation with Dependent and Independent Variables<br />Why there are differences or variations in the data?<br />Product usage, preferences and attitudes are partially dependent upon the marketing activities hence such variables are called Dependent Variables.<br />Independent Variable is one which the researcher believes can explain the differences or variations which occur in dependent variables. Eg., Brand’s price, package and advertising.<br />
- 3. Assumptions<br />The data to be analyzed are obtained from descriptive studies, not from experiments.<br />The data are from very large samples, usually in excess of 300 and frequently as large as 1000.<br />The data includes measures on a number of variables for each respondent. <br />
- 4. Method of Analysis<br />Analyze patterns of change hich are common to both a dependent variable and one or more independent variables.<br />Cross-tabulation is applicable to data in which the dependent variable and the indpendent variables are categorical variables or continuous variables which have been placed into categories.<br />Correlation and regression analysis are commonly applied to situations where both the dependent variable and the independent variables are continuous.<br />
- 5. Cross-Tabulation<br />Independent variables in cross-tabulations include the respondents’ age, amount of education, household income, size of family and occupation.<br />In the cells of a cross-tabulation researchers typically show percentages as well as actual counts of the number of different responses given.<br />
- 6. Constructing and Interpreting a Cross-Tabulation<br />Cross-tabulation is used on both types of categorical variables.<br />Assign categories associated with the dependent variable to the rows of the cross-tabulation and assign categories associated with with the independent variable(s) to the columns of the cross-tabulation.<br />Assign top row to the dependent variable category with the largest quantifiable number. Each succeeding row is assigned a category with a progressively lower quantifiable number.<br />Alternately, top row can be assigned to the highest or most desirable category while the bottom row can be assigned to the lowest or most undesirable category.<br />The Independent variable category with the largest quantifiable number is assigned to the rightmost column and the category with the smallest quantifiable number is assigned to the leftmost column. Alternately, rightmost column to highest or most desirable category and leftmost column to the lowest or most undesirable category.<br />Each column percentages total 100%.<br />To interpret the cross-tabulation, analyze the pattern of percentages across each row separately. <br />If the percentages increase from left to right, the dependent variable category is positively associated with the independent variable. <br />If the percentages decrease from left to right, the dependent variable category is negatively associated with the independent variable.<br />
- 7. Three Useful Questions<br />Does the cross-tabulation show a valid or spurious relationship?<br />How many independent variables should be used in the cross-tabulation?<br />Are the differences seen in the cross-tabulation statistically significant, or could they have occurred by chance due to sampling variation?<br />
- 8. Cross-Tabulation shows a valid explanation<br />Changes in the independent variables are believed to cause changes or to explain variation<br />In the dependent variable<br />
- 9. Cross-Tabulation shows a spurious explanation<br />Spurious relationship if the implied relationship between the dependent and <br />independent variables does not seem to be logical.<br />
- 10. How many independent variables should be used?<br />3 or 4 variables at best.<br />
- 11. Are the differences statistically significant?<br />Expected count in the ith cell<br />=(Total Number of Observations in the row in which cell I is located x the total number of observations in the column in which cell I is located)/the total number of observations in all cells<br />If a cross-tabulation reveals an interesting relationship between a dependent and an independent variable, a Chi-square analysis can be used to test whether the observed differences are statistically significant.<br />
- 12. Creating Expected Count<br />100X54/200=27<br />26 23 24<br />27 26 23 24<br />
- 13. Introductory Comments on Correlation and Regression Analysis<br />Correlation and regression analysis can be used in situations where both the dependent and independent variables are of the continuous type.<br />For example examine the relationship between milk consumption and both age and income.<br />More accurate representations of the relationships between variables<br />More objectively arrived at than similar results from cross tabulations<br />
- 14. CORRELATION<br />Data to which regression and correlation can be applied are :<br />They are continuous variables<br />More than one variable is measured for each respondent<br />The number of respondent is greater than the number of variables<br />
- 15. Correlation Analysis<br />A positive relationship is said to exist between two variables when larger values of one variable are associated with larger values of the other variable.<br />Thus, wine consumption and income are said to be positively related if higher levels of wine consumption tend to be associated with higher income.<br />Wine consumption and income are said to be negatively related if lower levels of wine consumption tend to be associated with higher income.<br />
- 16. Correlation Coefficient r<br />A measure of the relationship between two variables is the correlation coefficient r.<br />If there is perfect positive correlation r=+1.00; <br />Perfect negative correlation is indicated by r=-1.00<br />No relationship is shown by r=0<br />
- 17. r<br />R= ∑((Yi-Y)(Xi-X))<br /> √(∑(Yi-Y)² )(∑Xi-X)²)<br />Where Y = average wine consumption<br /> X = average income<br /> Yi=wine consumption of individual HHs<br /> Xi= income from individual HHs<br />
- 18. Household Wine Consumption and Income : City A & B<br />
- 19. Scatter Diagrams of Wine Consumption and Income For City A<br />Annual Income<br />($000)<br />
- 20. Scatter Diagrams of Wine Consumption and Income For City B<br />Annual Income<br />($000)<br />
- 21. Calculations<br />
- 22. Applying correlation coefficient formula for City A & B<br />R = ∑((Yi-Y)(Xi-X))<br /> √(∑(Yi-Y)² )(∑Xi-X)²)<br />=8/√(10)X(10)<br />=8/10<br />=+0.8 for City A<br />r=10/√(10)(10)<br />=10/10<br />=+1.00 for City B (perfect positive correlation)<br />
- 23. R interpretation<br />If r=0.8 or larger, there is a very strong or high relationship between variables<br />If r is between 0.4 and 0.8 (disregarding sign) the relationship between the variables is considered moderate to high.<br />For lower values of r, the relationship is small to insignificant.<br />When a correlation analysis results in an r of less than 0.4 researchers do not have strong evidence that there is a relationship between the dependent and independent variables.<br />The + or – on the correlation coefficient indicates whether the relationship is positive or negative.<br />For eg., if r= -0.8 or -1.00 it means that wine consumption is lower among households with higher income.<br />Correlation analysis, like cross-tabulation attempts to identify ptterns of variations common to a dependent variable and an independent variable.<br />
- 24. REGRESSION ANALYSIS<br />The correlation coefficient is a summary measure which indicates the relative strength and the + or – direction of a relationship between two variables. But it does not describe the underlying relationship. It cannot be used to predict the size of change to expect in the dependent variable if the independent variable is changed by one unit ie., how large a change in wine consumption would occur with a given increase in income? Hence, an equation is needed.<br />
- 25. Regression Analysis<br />Regression Analysis is a technique whereby a mathematical equation is “fitted” to a set of data.<br />The Set of Data<br />The Mathematical Equation<br />The technique which fits the equation to the data<br />How the equation is evaluated to see how well it “describes” the data.<br />
- 26. City C Data<br />
- 27. Data Set<br />Data set must consist of measures of two or more continuous variables and the sample size must be at least two or three times as large as the number of measured variables, preferably much larger.<br />
- 28. Mathematical Equation<br />In most applications of regression analysis, the equation which is used is that of a straight line.<br />The general form of the equation of a straight line is Y=a + bx.<br />Where : <br />Y=the dependent variable<br />X=the independent variable<br />b=a coefficient which indicates the effect on Y of a one unit change in X. That is if b=+8.2, a one unit increase in X will result in an 8.2 unit increase in Y.<br />a=the coefficient which identifies the value of Y when the value of X is equal to 0. That is, a is the value of Y at which the straight line intersects the Y axis. <br />
- 29. Linear Regression Equation<br />A simple linear regression equation can be applied to the wine consumption data available from City C<br />Y = a +bX<br />Where Y=the predicted values of the dependent variable, that is, monthly household wine consumption in quarts<br />X=The observed values of the independent variable ie., the annual household income in thousands of dollars.<br />b= a coefficient which indicates by how much household wine consumption in quarts is expected to increase with a $1000 increase in annual household income.<br />a=point at which the straight line intersects the y axis.<br />
- 30. Pictorial Presentation of Regression Analysis<br />Household wine consumption Y<br />Regression Line<br />.<br />.<br />Y<br />. . . . . .<br />The location of each dot <br />one Households wine consumption <br />and its Annual income<br />Xi<br />Household Annual Income X<br />
- 31. Fitting the equation to the observed data<br />Plot all wine consumption and annual income data on a scatter diagram from a very large sample.<br />Envision fitting a line through the points in such a manner which results in “the best possible fit”<br />The fitted regression line can be viewed as a “predictor line” in the sense that it “predicts” household wine consumption for each different value of annual household income.<br />For each and every observed value of an annual household income Xi, the regression line provides a predicted value of wine consumption Yi.<br />The difference between the wine consumption reported by household i (Yi) and its predicted wine consumption (Yi) is (Yi-Yi) and this difference is called a residual.<br />The procedure commonly used to calculate the regression line which “best fits” a particular set of data is one called the “least square method”<br />This procedure identifies the one equation which when fitted to the observed data, minimizes the sum of the square of all residuals.<br />That is the procedure minimizes ∑ (Yi-Yi)² for all i. <br />
- 32. Calculating a and b values<br />X=∑Xi/n<br /> =70/5<br /> =14<br />Y=∑Yi/n<br /> =15/5<br /> =3<br />
- 33. Calculating a and b<br />b=n(∑XiYi) – (∑ Xi)(∑ Yi)<br /> n (∑ Xi²) – (∑ Xi)² <br /> =5(226)-(70)(15)<br /> 5(1020)-(70)²<br /> =1130-1050<br /> 5100-4900<br /> =80/200<br /> =+0.40 <br />
- 34. Substituting <br />a=Y-bX<br />a=3- (0.40)(14)<br /> =3-5.6<br /> =-2.60<br />Completing the regression equation<br />Y=-2.60+0.40X<br />
- 35. a, b and slope<br />It should be noted that the regression line intersects the Y axis at -2.60, that is at the value of the a coefficient.<br />The b coefficient indicates that for each $1000 increase in annual household income, monthly wine consumption is predicted to increase by 0.40 quarts.<br />This is demonstrated by setting the slope of the regression line at a value of +0.40, which takes it in an upward direction to the right. <br />
- 36. Advantages of Regression<br />The result demonstrates the advantage of a regression analysis over a correlation analysis.<br />With an r=+0.80, the correlation analysis only identifies the presence of a moderately strong <br />positive relationship between wine consumption and income.<br />The regression analysis leads to a more complete description of the relationship, for example,<br />Predicrted monthly wine consumption for selected annual incomes are shown in above table.<br />Because the b coefficient indicates by how much the dependent variable will change for a <br />Given change in the independent variable, a regression equation is a type of descriptive<br /> relationship which can help researchers arrive at better understanding of variation in <br />Dependent variable. <br />
- 37. Evaluating the Regression Equation<br />All regression procedures also calculate a measure called the “coefficient of determination” which is identified as R².<br />This coefficient takes on a maximum value of 1.00 but can be 0 also.<br />An R² value of 1.00 indicates that the regression equation “explains” 100 percent of the variance in the dependent variable about its mean. <br />This variance would be explained perfectly if every dot in the scatter diagram fell precisely on the regression line, that is, if all of the residuals were equal to 0.<br />When the regression equation does not fit the data perfectly, some of the residuals will be greater than 0.<br />Those residuals form a distribution around the regression equation and this distribution can be used as a measure of how much variance is “unexplained” by the regression equation. <br />
- 38. Regression Equation<br />R² = (Total Variance in the Dependent Variable) – (Variance unexplained by the regression equation)<br /> Total Variance in the Dependent Variable<br />If the regression line explains all the variance in Y, all the residuals will be 0, the variance “unexplained” by the regression equation will be 0, and the coefficient of determination will be <br />R² = Total Variance in the dependent variable -0 <br /> Total Variance in the dependent variable<br /> = 1.00<br />R² values in the 0.50-1.00 range are usually interpreted to mean that the regression equation does a good job of explaining the Y variation.<br /> = ∑ (Yi-Y)² - ∑(Yi-Y*)²<br /> ∑ (Yi-Y)²<br />
- 39. Calculating R² for the Wine Consumption Regression Equation for City C<br />Y = ∑Yi/n<br />=15/5=3<br />R² = (10-3.6)/10<br /> = 0.64<br />
- 40. Interpretation of R² Values in Explaining Variance<br />Y*i=-2.60+0.40Xi is capable of explaining about 64 percent of the total variance observed in the dependent variable – monthly household wine consumption.<br />Or 36per cent of the total variance in household wine consumption is “unexplained” by the regression equation.<br />
- 41. R² Explained<br />If the regression line does not explain any of the variance in Y, all the residuals will be large, and the variance “unexplained” by the regression equation will be approximately equal to total Y variance. The two terms in the numerator of the R² formula will be equal, the numerator will be 0 and R² will be 0.<br />An R² value approximating 0 indicates that the regression equation does not explain any of the variance observed in Y. <br />In general, R² values of 0.25 or less indicate that the regression equation is of little use in explaining variance. <br />Regression equations with R² values in the 0.25 – 0.50 range are typically judged to be of only moderate use in explaining the variance observed in a dependent variable.<br />
- 42. Multiple Linear Regression<br />Simple Linear Regression uses one independent variable.<br />When two or more independent variables are used in a linear regression analysis, it is called multiple linear regression.<br />Y=a+bX1+cX2+dX3+…<br />Where Y is the dependent variable and X1,X2,X3… are independent variables.<br />The additional coefficients (c,d) are similar to the b coefficient, except that they are associated with independent variables X2 and X3. <br />
- 43. Calculations needed for the Multiple Linear Regression of Wine Consumption in City C<br />Y= 15/5 X1=70/5 X2=150/5<br /> = 3 =14 =30<br />
- 44. Calculations<br />
- 45. Calculating b<br />Y=Y-Y<br />X1=X1-X1<br />X2=X2-X2<br />b=(∑yx1)(∑x2²)-(∑yx2)(∑x1x2)<br /> (∑x1²)(∑x2²)-(∑x1x2)²<br /> = (16)(74)-(25)(46)<br /> (40)(74) –(46)²<br /> =1184-1150/2960-2116=34/844<br /> =0.0402<br />
- 46. Calculating c<br />c=(∑yx2)(∑x1²)-(∑yx1)(∑x1x2)<br /> (∑x1²)(∑x2²)-(∑x1x2)²<br /> =(25)(40)-(16)(46) <br /> (40)(74)-(46)²<br /> =1000-736/2960-2116=264/844<br /> =0.312<br />
- 47. Calculating a<br />a=Y-bX1-cX3<br /> = 3.0-(0.0402)(14)<br /> =(0.312)(30)<br /> =-6.923<br />
- 48. The REGRESSION EQUATION<br />Y*=-6.923+0.0402X1+0.312X2<br />From this equation, researchers see that a greater increase in wine consumption is associated with a one-year increase in age(0.312 quarts) than is associated with a $1000 increase in annual income(0.0402 quarts)<br />As in simple linear regression, the a coefficient (-6.923) should be interpreted as a structural coefficient.<br />
- 49. Stepwise Multiple Linear Regression<br />Five independent variables (x1,x2,x3,x4,X5)<br />Stepwise multiple regression first evaluates each independent variable separately to determine which one results in the largest R² - that is , which one explains most of the variation in the dependent variable. If it is x3, that independent variable is selected for the regression equation.<br />
- 50. Stepwise Multiple Linear Regression<br />Next, the stepwise regression evaluates X3, in combination with each of the remaining independent variables (one at a time) to determine which one of the latter results in the largest increase in R². If it is X5, that variable becomes the second independent variable selected for the regression equation.<br />Likewise, remaining variables are evaluated one at a time with the two already selected ones to determine which one is the third variable.<br />This continues until R² can no longer be increased significantly by adding another independent variable to the regression equation.<br /> The independent variables which are not selected do not become part of the regression equation.<br />
- 51. Problems in using Regression Analysis<br />Inadequate sample size. Should be 2-3 times the number of variables.<br />Independent variables measured do not have direct effect on the dependent variable.<br />Independent Variables are highly correlated. Their effect will be same as single variable which has been used twice in equation.<br />Relationship between dependent and independent variable is not linear ie unusual shape. Hence, it cannot be analyzed by regression techniques.<br />

No public clipboards found for this slide

×
### Save the most important slides with Clipping

Clipping is a handy way to collect and organize the most important slides from a presentation. You can keep your great finds in clipboards organized around topics.

Be the first to comment