Presentation is loading. Please wait.

Presentation is loading. Please wait.

C HAPTER 4: I NTRODUCTORY L INEAR R EGRESSION Chapter Outline 4.1Simple Linear Regression Scatter Plot/Diagram Simple Linear Regression Model 4.2Curve.

Similar presentations


Presentation on theme: "C HAPTER 4: I NTRODUCTORY L INEAR R EGRESSION Chapter Outline 4.1Simple Linear Regression Scatter Plot/Diagram Simple Linear Regression Model 4.2Curve."— Presentation transcript:

1 C HAPTER 4: I NTRODUCTORY L INEAR R EGRESSION Chapter Outline 4.1Simple Linear Regression Scatter Plot/Diagram Simple Linear Regression Model 4.2Curve Fitting 4.3Inferences About Estimated Parameters 4.4 Adequacy of the model coefficient of determination 4.5Pearson Product Moment Correlation Coefficient 4.6Test for Linearity of Regression 4.7 ANOVA Approach Testing for Linearity of Regression

2 Regression – is a statistical procedure for establishing the r/ship between 2 or more variables. This is done by fitting a linear equation to the observed data. The regression line is used by the researcher to see the trend and make prediction of values for the data. There are 2 types of relationship: Simple ( 2 variables) Multiple (more than 2 variables) INTRODUCTION TO LINEAR REGRESSION

3  Many problems in science and engineering involve exploring the relationship between two or more variables.  Two statistical techniques: (1) Regression Analysis (2) Computing the Correlation Coefficient (r).  Linear regression - study on the linear relationship between two or more variables.  This is done by fitting a linear equation to the observed data.  The linear equation is then used to predict values for the data.

4  In simple linear regression only two variables are involved: i. X is the independent variable. ii. Y is dependent variable.  The correlation coefficient (r ) tells us how strongly two variables are related.

5 Example 4.1: 1) A nutritionist studying weight loss programs might wants to find out if reducing intake of carbohydrate can help a person reduce weight. a)X is the carbohydrate intake (independent variable). b)Y is the weight (dependent variable). 2) An entrepreneur might want to know whether increasing the cost of packaging his new product will have an effect on the sales volume. a)X is cost b)Y is sales volume 5

6 4.1 SIMPLE LINEAR REGRESSION MODEL  Linear regression model is a model that expresses the linear relationship between two variables.  The simple linear regression model is written as: where ; Random error is the difference of data point from the deterministic value.

7 This regression line is estimated from the data collected by fitting a straight line to the data set and getting the equation of the straight line,

8 S CATTER PLOT  Scatter plots show the relationship between two variables by displaying data points on a two-dimensional graph.  The variable that might be considered as an explanatory variable is plotted on the x-axis, and the response variable is plotted on the y- axis.  Scatter plots are especially useful when there are a large number of data points. 4.2 CURVE FITTING (SCATTER PLOT)

9  They provide the following information about the relationship between two variables: (1) Strength (2) Shape - linear, curved, etc. (3) Direction - positive or negative (4) Presence of outliers

10 E XAMPLES :

11 A linear regression can be develop by freehand plot of the data. Example 4.2: The given table contains values for 2 variables, X and Y. Plot the given data and make a freehand estimated regression line. PLOTTING LINEAR REGRESSION MODEL 11 X-3-20123 Y123581112

12

13  The Least Square method is the method most commonly used for estimating the regression coefficients  The straight line fitted to the data set is the line: where is the estimated value of y for a given value of X. 4.3 INFERENCES ABOUT ESTIMATED PARAMETERS LEAST SQUARES METHOD

14 i) y-Intercept for the Estimated Regression Equation,

15 ii) Slope for the Estimated Regression Equation,

16 Before, x65637646687268573696 After, y68668648656671574287 a)Develop a linear regression model with “before” as the independent variable and “after” as the dependent variable. b)Predict the score a student would obtain “after” if he scored 60 marks “before”. The data below represent scores obtained by ten primary school students before and after they were taken on a tour to the museum (which is supposed to increase their interest in history) E XAMPLE 3.3: S TUDENTS S CORE I N H ISTORY

17

18

19 INCOME, xFOOD EXPENDITURE, y 5514 8324 3813 6116 339 4915 6717 a)Fit a linear regression model with income as the independent variable and food expenditure as the dependent variable. b)Predict the food expenditure if income is 50. Answer: E XERCISE 4.1:

20 E XERCISE 4.2:

21 The coefficient of determination is a measure of the variation of the dependent variable (Y) that is explained by the regression line and the independent variable (X). The symbol for the coefficient of determination is or. If =0.90, then =0.81. It means that 81% of the variation in the dependent variable (Y) is accounted for by the variations in the independent variable (X). 4.4 ADEQUACY OF THE MODEL COEFFICIENT OF DETERMINATION( ) 21

22 The rest of the variation, 0.19 or 19%, is unexplained and called the coefficient of non determination. Formula for the coefficient of non determination is

23 Relationship Among SST, SSR, SSE where: SST = total sum of squares SSR = sum of squares due to regression SSE = sum of squares due to error SST = SSR + SSE n The coefficient of determination is: where: SSR = sum of squares due to regression SST = total sum of squares 23

24 4.5 PEARSON PRODUCT MOMENT CORRELATION COEFFICIENT (r) Correlation measures the strength of a linear relationship between the two variables. Also known as Pearson’s product moment coefficient of correlation. The symbol for the sample coefficient of correlation is (r) Formula : or

25 Properties of (r): Values of r close to 1 implies there is a strong positive linear relationship between x and y. Values of r close to -1 implies there is a strong negative linear relationship between x and y. Values of r close to 0 implies little or no linear relationship between x and y.

26 A SSUMPTIONS A BOUT THE E RROR T ERM E 1. The error  is a random variable with mean of zero. 2. The variance of , denoted by  2, is the same for all values of the independent variable. 2. The variance of , denoted by  2, is the same for all values of the independent variable. 3. The values of  are independent. 4. The error  is a normally distributed random variable. 4. The error  is a normally distributed random variable.

27 E XAMPLE 4.4: R EFER P REVIOUS E XAMPLE 4.2, S TUDENTS S CORE IN H ISTORY Calculate the value of r and interpret its meaning. S OLUTION : Thus, there is a strong positive linear relationship between score obtain before (x) and after (y).

28 E XERCISE 4.3: Refer to previous Exercise 4.1 and Exercise 4.2, calculate coefficient correlation and interpret the results.

29 To test the existence of a linear relationship between two variables x and y, we proceed with testing the hypothesis. Two test are commonly used: (i) (ii) 4.6TEST FOR LINEARITY OF REGRESSION t -Test F -Test

30 1. Determine the hypotheses. 2. Compute Critical Value/ level of significance. 3. Compute the test statistic. ( no linear r/ship) (exist linear r/ship) (i) t-Test

31 4. Determine the Rejection Rule. Reject H 0 if : There is a significant relationship between variable X and Y. 5.Conclusion. p -value < 

32 E XAMPLE 4.5: R EFER P REVIOUS E XAMPLE 4.3, S TUDENTS S CORE IN H ISTORY Test to determine if their scores before and after the trip is related. Use a=0.05 S OLUTION : 1) 2) ( no linear r/ship) (exist linear r/ship)

33 3) 4) Rejection Rule: 5) Conclusion: Thus, we reject H 0. The score before (x) is linear relationship to the score after (y) the trip.

34 E XERCISE 4.4:

35 E XERCISE 4.5:

36 1. Determine the hypotheses. 3. Compute the test statistic. F = MSR/MSE - this value can get from ANOVA table 4. Determine the Rejection Rule. Reject H 0 if : p-value < a F test > (ii) F-Test ( no linear r/ship) (exist linear r/ship) 2. Specify the level of significance.

37 There is a significant relationship between variable X and Y. 5.Conclusion.

38 4.7 ANOVA APPROACH FOR TESTING LINEARITY OF REGRESSION  The analysis of variance (ANOVA) method is an approach to test the significance of the regression.  We can arrange the test procedure using this approach in an ANOVA table as shown below;

39 E XAMPLE 4.6: The manufacturer of Cardio Glide exercise equipment wants to study the relationship between the number of months since the glide was purchased and the length of time (hours) the equipment was used last week. At, test whether there is a linear relationship between the variables.

40 Solution: 1. Hypothesis: 2. Test Statistic: F = MSR/MSE = 17.303 or using p-value approach: significant value =0.003 3. F-distribution table: 4. Rejection region: (draw picture) Since F statistic > F table (17.303>11.2586 ), we reject H 0 or since p-value (0.003 0.01 ) we reject H 0 5. Thus, there is a linear relationship between the variables (month X and hours Y).

41 EXERCISE 4.6: An agricultural scientist planted alfalfa on several plots of land, identical except for the soil pH. Following are the dry matter yields (in pounds per acre) for each plot. pHYield 4.61056 4.81833 5.21629 5.41852 5.61783 5.82647 6.02131

42 a) Construct a scatter plot of yield (y) versus pH (x). Verify that a linear model is appropriate. b) Compute the estimated regression line for predicting Yield from pH. c) If the pH is increased by 0.1, by how much would you predict the yield to increase or decrease? d) For what pH would you predict a yield of 1500 pounds per acre? e) Calculate coefficient correlation, and interpret the results. Answer :

43 EXERCISE 4.7 A regression analysis relating the current market value in dollars to the size in square feet of homes in Greeny County, Tennessee, follows. The portion of a regression software output as below: a) Determine how many homes in the sample. b) Determine the regression equation. c) Can you conclude that there a linear relationship between the variables at ? PredictorCoefSE CoefTP Constant12.7268.1151.570.134 Size0.000113860.000028963.930.001 Analysis of Variance SourceDFSSMSFP Regression1103541035415.460.001 Error1812054670 Total1922408


Download ppt "C HAPTER 4: I NTRODUCTORY L INEAR R EGRESSION Chapter Outline 4.1Simple Linear Regression Scatter Plot/Diagram Simple Linear Regression Model 4.2Curve."

Similar presentations


Ads by Google