Regression Analysis Chapter 2 Simple Linear Regression
|
|
- Teresa McLaughlin
- 5 years ago
- Views:
Transcription
1 Regression Analysis Chapter 2 Simple Linear Regression Dr. Bisher Mamoun Iqelan biqelan@iugaza.edu.ps Department of Mathematics The Islamic University of Gaza , Semester 2 Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 1 / 22
2 Simple linear regression model Suppose for each subject, we observe/have two variables X and Y. We want to make prediction of Y based on X. Because of random effect, we cannot predict Y accurately. Instead, we can only predict its expected/mean value. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 2 / 22
3 Simple linear regression model Suppose for each subject, we observe/have two variables X and Y. We want to make prediction of Y based on X. Because of random effect, we cannot predict Y accurately. Instead, we can only predict its expected/mean value. Model equation It represents a response variable (the variable of primary interest) as a sum of mean function and error, response = mean function + error. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 2 / 22
4 Simple linear regression model Suppose for each subject, we observe/have two variables X and Y. We want to make prediction of Y based on X. Because of random effect, we cannot predict Y accurately. Instead, we can only predict its expected/mean value. Model equation It represents a response variable (the variable of primary interest) as a sum of mean function and error, response = mean function + error. Mean function It takes account of the information about the response variable that can be extracted from given predictor variables. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 2 / 22
5 Simple linear regression model Suppose for each subject, we observe/have two variables X and Y. We want to make prediction of Y based on X. Because of random effect, we cannot predict Y accurately. Instead, we can only predict its expected/mean value. Model equation It represents a response variable (the variable of primary interest) as a sum of mean function and error, response = mean function + error. Mean function It takes account of the information about the response variable that can be extracted from given predictor variables. Error term It represents any information not accounted for by the mean function. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 2 / 22
6 Notation for the Mean function The mean function is known also as regression function or regression line. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 3 / 22
7 Notation for the Mean function The mean function is known also as regression function or regression line. We denote the expected value of Y by EY Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 3 / 22
8 Notation for the Mean function The mean function is known also as regression function or regression line. We denote the expected value of Y by EY or E(Y X). Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 3 / 22
9 Notation for the Mean function The mean function is known also as regression function or regression line. We denote the expected value of Y by EY or E(Y X). Obviously, EY = µ(x). Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 3 / 22
10 Notation for the Mean function The mean function is known also as regression function or regression line. We denote the expected value of Y by EY or E(Y X). Obviously, EY = µ(x). In summary, all of the following are the same thing: µ(x) E(Y X) EY with β 0 and β 1 being unknown, β 0 + β 1 X Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 3 / 22
11 Notation for the Mean function The mean function is known also as regression function or regression line. We denote the expected value of Y by EY or E(Y X). Obviously, EY = µ(x). In summary, all of the following are the same thing: µ(x) E(Y X) EY with β 0 and β 1 being unknown, β 0 + β 1 X µ(x) is used when EY is studied as a function of the predictor. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 3 / 22
12 Notation for the Mean function The mean function is known also as regression function or regression line. We denote the expected value of Y by EY or E(Y X). Obviously, EY = µ(x). In summary, all of the following are the same thing: µ(x) E(Y X) EY with β 0 and β 1 being unknown, β 0 + β 1 X µ(x) is used when EY is studied as a function of the predictor. EY simply refers to the expected value of the dependent variable. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 3 / 22
13 Notation for the Mean function The mean function is known also as regression function or regression line. We denote the expected value of Y by EY or E(Y X). Obviously, EY = µ(x). In summary, all of the following are the same thing: µ(x) E(Y X) EY with β 0 and β 1 being unknown, β 0 + β 1 X µ(x) is used when EY is studied as a function of the predictor. EY simply refers to the expected value of the dependent variable. E(Y X) emphasises the dependence of EY on the predictor. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 3 / 22
14 SLM: basic equation and terminology The Simple linear regression model (SLM) equation is Y = µ(x) + ε = β 0 + β 1 X +ε. }{{} mean function r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 4 / 22
15 SLM: basic equation and terminology The Simple linear regression model (SLM) equation is Y = µ(x) + ε = β 0 + β 1 X +ε. }{{} mean function Y is called response or dependent variable. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 4 / 22
16 SLM: basic equation and terminology The Simple linear regression model (SLM) equation is Y = µ(x) + ε = β 0 + β 1 X +ε. }{{} mean function Y is called response or dependent variable. The variable X is called predictor(s), explanatory or independent variable(s). r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 4 / 22
17 SLM: basic equation and terminology The Simple linear regression model (SLM) equation is Y = µ(x) + ε = β 0 + β 1 X +ε. }{{} mean function Y is called response or dependent variable. The variable X is called predictor(s), explanatory or independent variable(s). ε is called random error with Eε = 0, which is not observable and not estimable. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 4 / 22
18 SLM: basic equation and terminology The Simple linear regression model (SLM) equation is Y = µ(x) + ε = β 0 + β 1 X +ε. }{{} mean function Y is called response or dependent variable. The variable X is called predictor(s), explanatory or independent variable(s). ε is called random error with Eε = 0, which is not observable and not estimable. β 0 and β 1 are unknown, called regression coefficients. β 0 is also called intercept (value of EY when X = 0); β 1 is called slope indicating the change of Y on average when X increases one unit. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 4 / 22
19 SLM: basic equation and terminology The Simple linear regression model (SLM) equation is Y = µ(x) + ε = β 0 + β 1 X +ε. }{{} mean function Y is called response or dependent variable. The variable X is called predictor(s), explanatory or independent variable(s). ε is called random error with Eε = 0, which is not observable and not estimable. β 0 and β 1 are unknown, called regression coefficients. β 0 is also called intercept (value of EY when X = 0); β 1 is called slope indicating the change of Y on average when X increases one unit. The model is called linear because the mean function is linear with respect to the parameters. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 4 / 22
20 SLM: basic equation and terminology cont.. Suppose we have n observations, (X 1, Y 1 ), (X 2, Y 2 ),..., (X n, Y n ) The linear regression model also means Y 1 = β 0 + β 1 X 1 + ε 1 Y 2 = β 0 + β 1 X 2 + ε 2.. Y n = β 0 + β 1 X n + ε n In the model, X i is known, observable, and non-random, ε i is called random error (unobservable). Thus Y i is random. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 5 / 22
21 Assumptions and features of the model X i is non-random, but ε i is random. Thus the first part of Y i : β 0 + β 1 X i is due to regression on (X); the second part: ε i is due to the random effect. {Mean of random errors} Eε i = 0, thus EY i = E{β 0 + β 1 X i + ε i } = β 0 + β 1 X i + Eε i = β 0 + β 1 X i {Homogeneity of Variance} Var(ε i ) = σ 2 {independence} Cov(ε i, ε j ) = 0 for any i j. Thus (prove it based on the previous point), Var(Y i ) = σ 2 and Cov(Y i, Y j ) = 0 for any i j. Thus Y i and Y j are uncorrelated. Parameters in the model: β 0, β 1 and σ 2 need to be estimated. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 6 / 22
22 Parameter Estimation We do not know the parameters of the model but for any given b = (b 0, b 1 ) T, we can compute deviations of Y i from its expected value defined by e i = Y i (b 0 + b 1 X i ). r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 7 / 22
23 Parameter Estimation We do not know the parameters of the model but for any given b = (b 0, b 1 ) T, we can compute deviations of Y i from its expected value defined by e i = Y i (b 0 + b 1 X i ). It seems natural to choose as estimator of θ = (β 0, β 1 ) T, whose deviations are small rather than large. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 7 / 22
24 Parameter Estimation We do not know the parameters of the model but for any given b = (b 0, b 1 ) T, we can compute deviations of Y i from its expected value defined by e i = Y i (b 0 + b 1 X i ). It seems natural to choose as estimator of θ = (β 0, β 1 ) T, whose deviations are small rather than large. So, to find good b 0 and b 1 is to minimize the sum of squares of the deviations. n n S(b) = e 2 i = (Y i b 0 b 1 X i ) 2, i=1 i=1 This method is called the (ordinary) least squares estimation (l.s.e., or o.l.s.). r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 7 / 22
25 Sum of squares of deviations An example of linear regression model Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 8 / 22
26 Least squares estimator Principle of least squares Take as an estimate of the parameters the vector that makes the sum of squares as small as possible. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 9 / 22
27 Least squares estimator Principle of least squares Take as an estimate of the parameters the vector that makes the sum of squares as small as possible. l.s.e. Applied to the linear model, the principle of least squares leads to the following definition. Definition: A vector ˆθ is a least squares estimator (l.s.e.) of θ if S(ˆθ) S(b) for any b. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 9 / 22
28 Least squares estimator Principle of least squares Take as an estimate of the parameters the vector that makes the sum of squares as small as possible. l.s.e. Applied to the linear model, the principle of least squares leads to the following definition. Definition: A vector ˆθ is a least squares estimator (l.s.e.) of θ if S(ˆθ) S(b) for any b. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 9 / 22
29 Derivation of the normal equations Let S be the sum of squares, S(b 0, b 1 ) = = n i=1 e 2 i n (Y i b 0 b 1 X i ) 2 i=1 Its minimum may be found by solving the system S b r = 0, r = 0, 1. r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 10 / 22
30 Derivation of the normal equations Let S be the sum of squares, S(b 0, b 1 ) = = n i=1 e 2 i n (Y i b 0 b 1 X i ) 2 i=1 Its minimum may be found by solving the system S b r = 0, r = 0, 1. Note that e i b 0 = 1, and e i b 1 = X i r. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 10 / 22
31 Derivation of the normal equations (cont.) S b 0 = 2 S b 1 = 2 n (Y i b 0 b 1 X i ), i=1 n X i (Y i b 0 b 1 X i ). i=1 Equating to 0, we get the system 2 2 n (Y i b 0 b 1 X i ) = 0, i=1 n X i (Y i b 0 b 1 X i ) = 0. i=1 Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 11 / 22
32 Derivation of the normal equations (cont.) The values of β 0 and β 1 that minimize S(b 0, b 1 ) are given by ˆβ 1 = n i=1 (X i X)(Y i Ȳ ) n i=1 (X i X) 2, (1) and { n ˆβ 0 = 1 Y i b 1 n i=1 } n X i = Ȳ b 1 X. (2) i=1 Note that we give the formula for ˆβ 1 before the formula for ˆβ 0 because ˆβ 0 uses ˆβ 1. To ease computations let, x i = X i X and y i = Y i Ȳ, then Equation (1) can be written by n i=1 ˆβ 1 = x iy i n, (3) i=1 x2 i Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 12 / 22
33 Terminology for the estimation The least squares regression line is given by Ŷ = ˆβ 0 + ˆβ 1 X (4) (Note that we use Ŷ, to denote the predicted/fitted value of Y for a given X) For each observation in our data we can compute Ŷ i = ˆβ 0 + ˆβ 1 X i These are called the fitted values. Thus, the ith fitted value, Ŷi, is the point on the least squares regression line (4) corresponding to X i. The vertical distance corresponding to the ith observation is e i = Y i Ŷi, i = 1, 2,..., n. These vertical distances are called the ordinary least squares residuals. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 13 / 22
34 Alternative expression for ˆβ 1 It is often useful to use an equivalent formula for estimating ˆβ 1. Problem Show that an alternative formula for ˆβ 1 can be expressed as ˆβ 1 = Cov(Y, X) Var(X) (5) = Corr(Y, X) S Y S X (6) Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 14 / 22
35 Alternative expression for ˆβ 1 It is often useful to use an equivalent formula for estimating ˆβ 1. Problem Show that an alternative formula for ˆβ 1 can be expressed as ˆβ 1 = Cov(Y, X) Var(X) (5) = Corr(Y, X) S Y S X (6) Note that from Equations (5) and (6) it can be seen that ˆβ 1, Cov(Y, X), and Corr(Y, X) have the same sign. This makes intuitive sense because positive (negative) slope means positive (negative) correlation. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 14 / 22
36 Alternative expression for ˆβ 1 It is often useful to use an equivalent formula for estimating ˆβ 1. Problem Show that an alternative formula for ˆβ 1 can be expressed as ˆβ 1 = Cov(Y, X) Var(X) (5) = Corr(Y, X) S Y S X (6) Note that from Equations (5) and (6) it can be seen that ˆβ 1, Cov(Y, X), and Corr(Y, X) have the same sign. This makes intuitive sense because positive (negative) slope means positive (negative) correlation. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 14 / 22
37 Example1: Data Consider the following data Obs. X Y By simple calculation, X = , Ȳ = , and 6 (X i X)(Y 6 i Ȳ ) = , (X i X) 2 = Thus, i=1 and hence the estimated model is i=1 ˆβ 1 = , ˆβ0 = Ŷ = X Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 15 / 22
38 Example1 Cont.. The Fitted Values, Y i, and the Ordinary Least Squares Residuals, e i, for the data Obs. X Y fitted Y : Ŷ residuals So, with X = 3, then our prediction of Y is Ŷ = = Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 16 / 22
39 Graph of Example 1 The model indicates that Y increase with X. As X increases one unit, Y increases unit. Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 17 / 22
40 Examples From Equations (1) and (2) one can obtain the values of ˆβ 1 and ˆβ 0 : ˆβ 1 = = 1.66, and ˆβ 0 = 57 (1.66)(18) = = Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 18 / 22 Example 2 This table shows the observations (years: ) and calculations to estimate the regression equation for the corn-fertilizer problem
41 Example: Using R Example 3 Suppose we have 10 observations for (X, Y ) : (1.2, 1.91), (2.3, 4.50), (3.5, 2.13), (4.9, 5.77), (5.9, 7.40), (7.1, 6.56), (8.3, 8.79), (9.2, 6.56), (10.5, 11.14), (11.5, 9.88). We hope to fit a linear regression model Y i = β 0 + β 1 X i + ε i, i = 1, 2,..., 10 Here a code of R (the words after # are comments only) > X=c(1.2,2.3,3.5,4.9,5.9,7.1,8.3,9.2,10.5,11.5) > Y=c(1.91,4.50,2.13,5.77,7.40,6.56,8.79,6.56, ) > plot(x, Y) # plot the observations (data) > myreg = lm(y ~ X) # do the linear regression > summary(myreg) # output the estimation Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 19 / 22
42 Example 3 R Output Once we type the following command, > summary(myreg) we have the following output Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) X *** --- Signif. codes: 0 *** ** 0.01 * Residual standard error: on 8 degrees of freedom Multiple R-squared: , Adjusted R-squared: F-statistic: on 1 and 8 DF, p-value: Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 20 / 22
43 Example 3 R Output cont.. From the previous R Output, the fitted regression line/model is Ŷ = X and for any new subject/individual with X, its prediction of EY is Ŷ = X So, for the above data, If X = 3, then we predict Ŷ = If X = 3.0, then we predict Ŷ = If X = 0.5, then we predict Ŷ = Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 21 / 22
44 Example 3: Creating of R plots title("scatter of (X,Y) and fitted linear regression model") The following code will plot the points with the fitted line plot(x, Y, pch=15) # plot the observations (data) myreg = lm(y ~ X) # do the linear regression lines(x, myreg$fitted, lwd=2, col=2) # plot the fitted Dr. Bisher M. Iqelan (Department of Math.) Chapter 2: Simple Linear Regression , Semester 2 22 / 22
Simple Linear Regression
Simple Linear Regression In simple linear regression we are concerned about the relationship between two variables, X and Y. There are two components to such a relationship. 1. The strength of the relationship.
More informationSTAT5044: Regression and Anova. Inyoung Kim
STAT5044: Regression and Anova Inyoung Kim 2 / 47 Outline 1 Regression 2 Simple Linear regression 3 Basic concepts in regression 4 How to estimate unknown parameters 5 Properties of Least Squares Estimators:
More informationChapter 1 Linear Regression with One Predictor
STAT 525 FALL 2018 Chapter 1 Linear Regression with One Predictor Professor Min Zhang Goals of Regression Analysis Serve three purposes Describes an association between X and Y In some applications, the
More informationLecture 14 Simple Linear Regression
Lecture 4 Simple Linear Regression Ordinary Least Squares (OLS) Consider the following simple linear regression model where, for each unit i, Y i is the dependent variable (response). X i is the independent
More informationChapter 1: Linear Regression with One Predictor Variable also known as: Simple Linear Regression Bivariate Linear Regression
BSTT523: Kutner et al., Chapter 1 1 Chapter 1: Linear Regression with One Predictor Variable also known as: Simple Linear Regression Bivariate Linear Regression Introduction: Functional relation between
More informationST430 Exam 1 with Answers
ST430 Exam 1 with Answers Date: October 5, 2015 Name: Guideline: You may use one-page (front and back of a standard A4 paper) of notes. No laptop or textook are permitted but you may use a calculator.
More informationRegression Models - Introduction
Regression Models - Introduction In regression models there are two types of variables that are studied: A dependent variable, Y, also called response variable. It is modeled as random. An independent
More informationUNIVERSITY OF MASSACHUSETTS. Department of Mathematics and Statistics. Basic Exam - Applied Statistics. Tuesday, January 17, 2017
UNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Basic Exam - Applied Statistics Tuesday, January 17, 2017 Work all problems 60 points are needed to pass at the Masters Level and 75
More informationChapter 2: simple regression model
Chapter 2: simple regression model Goal: understand how to estimate and more importantly interpret the simple regression Reading: chapter 2 of the textbook Advice: this chapter is foundation of econometrics.
More informationCh 2: Simple Linear Regression
Ch 2: Simple Linear Regression 1. Simple Linear Regression Model A simple regression model with a single regressor x is y = β 0 + β 1 x + ɛ, where we assume that the error ɛ is independent random component
More informationMeasuring the fit of the model - SSR
Measuring the fit of the model - SSR Once we ve determined our estimated regression line, we d like to know how well the model fits. How far/close are the observations to the fitted line? One way to do
More informationMATH 644: Regression Analysis Methods
MATH 644: Regression Analysis Methods FINAL EXAM Fall, 2012 INSTRUCTIONS TO STUDENTS: 1. This test contains SIX questions. It comprises ELEVEN printed pages. 2. Answer ALL questions for a total of 100
More informationMath 3330: Solution to midterm Exam
Math 3330: Solution to midterm Exam Question 1: (14 marks) Suppose the regression model is y i = β 0 + β 1 x i + ε i, i = 1,, n, where ε i are iid Normal distribution N(0, σ 2 ). a. (2 marks) Compute the
More informationStatistics for Engineers Lecture 9 Linear Regression
Statistics for Engineers Lecture 9 Linear Regression Chong Ma Department of Statistics University of South Carolina chongm@email.sc.edu April 17, 2017 Chong Ma (Statistics, USC) STAT 509 Spring 2017 April
More informationCategorical Predictor Variables
Categorical Predictor Variables We often wish to use categorical (or qualitative) variables as covariates in a regression model. For binary variables (taking on only 2 values, e.g. sex), it is relatively
More informationECON The Simple Regression Model
ECON 351 - The Simple Regression Model Maggie Jones 1 / 41 The Simple Regression Model Our starting point will be the simple regression model where we look at the relationship between two variables In
More informationWell-developed and understood properties
1 INTRODUCTION TO LINEAR MODELS 1 THE CLASSICAL LINEAR MODEL Most commonly used statistical models Flexible models Well-developed and understood properties Ease of interpretation Building block for more
More informationApplied Regression Analysis
Applied Regression Analysis Chapter 3 Multiple Linear Regression Hongcheng Li April, 6, 2013 Recall simple linear regression 1 Recall simple linear regression 2 Parameter Estimation 3 Interpretations of
More informationLinear Regression Model. Badr Missaoui
Linear Regression Model Badr Missaoui Introduction What is this course about? It is a course on applied statistics. It comprises 2 hours lectures each week and 1 hour lab sessions/tutorials. We will focus
More informationTMA4255 Applied Statistics V2016 (5)
TMA4255 Applied Statistics V2016 (5) Part 2: Regression Simple linear regression [11.1-11.4] Sum of squares [11.5] Anna Marie Holand To be lectured: January 26, 2016 wiki.math.ntnu.no/tma4255/2016v/start
More informationRegression Models - Introduction
Regression Models - Introduction In regression models, two types of variables that are studied: A dependent variable, Y, also called response variable. It is modeled as random. An independent variable,
More informationInference for Regression
Inference for Regression Section 9.4 Cathy Poliak, Ph.D. cathy@math.uh.edu Office in Fleming 11c Department of Mathematics University of Houston Lecture 13b - 3339 Cathy Poliak, Ph.D. cathy@math.uh.edu
More informationMAT2377. Rafa l Kulik. Version 2015/November/26. Rafa l Kulik
MAT2377 Rafa l Kulik Version 2015/November/26 Rafa l Kulik Bivariate data and scatterplot Data: Hydrocarbon level (x) and Oxygen level (y): x: 0.99, 1.02, 1.15, 1.29, 1.46, 1.36, 0.87, 1.23, 1.55, 1.40,
More informationSTAT420 Midterm Exam. University of Illinois Urbana-Champaign October 19 (Friday), :00 4:15p. SOLUTIONS (Yellow)
STAT40 Midterm Exam University of Illinois Urbana-Champaign October 19 (Friday), 018 3:00 4:15p SOLUTIONS (Yellow) Question 1 (15 points) (10 points) 3 (50 points) extra ( points) Total (77 points) Points
More informationStatistical View of Least Squares
Basic Ideas Some Examples Least Squares May 22, 2007 Basic Ideas Simple Linear Regression Basic Ideas Some Examples Least Squares Suppose we have two variables x and y Basic Ideas Simple Linear Regression
More informationSimple Linear Regression
Simple Linear Regression September 24, 2008 Reading HH 8, GIll 4 Simple Linear Regression p.1/20 Problem Data: Observe pairs (Y i,x i ),i = 1,...n Response or dependent variable Y Predictor or independent
More informationSimple linear regression
Simple linear regression Biometry 755 Spring 2008 Simple linear regression p. 1/40 Overview of regression analysis Evaluate relationship between one or more independent variables (X 1,...,X k ) and a single
More information1. The OLS Estimator. 1.1 Population model and notation
1. The OLS Estimator OLS stands for Ordinary Least Squares. There are 6 assumptions ordinarily made, and the method of fitting a line through data is by least-squares. OLS is a common estimation methodology
More information1. Simple Linear Regression
1. Simple Linear Regression Suppose that we are interested in the average height of male undergrads at UF. We put each male student s name (population) in a hat and randomly select 100 (sample). Then their
More information36-707: Regression Analysis Homework Solutions. Homework 3
36-707: Regression Analysis Homework Solutions Homework 3 Fall 2012 Problem 1 Y i = βx i + ɛ i, i {1, 2,..., n}. (a) Find the LS estimator of β: RSS = Σ n i=1(y i βx i ) 2 RSS β = Σ n i=1( 2X i )(Y i βx
More informationChapter 14 Simple Linear Regression (A)
Chapter 14 Simple Linear Regression (A) 1. Characteristics Managerial decisions often are based on the relationship between two or more variables. can be used to develop an equation showing how the variables
More informationIntroduction and Single Predictor Regression. Correlation
Introduction and Single Predictor Regression Dr. J. Kyle Roberts Southern Methodist University Simmons School of Education and Human Development Department of Teaching and Learning Correlation A correlation
More informationLecture 2. The Simple Linear Regression Model: Matrix Approach
Lecture 2 The Simple Linear Regression Model: Matrix Approach Matrix algebra Matrix representation of simple linear regression model 1 Vectors and Matrices Where it is necessary to consider a distribution
More information13 Simple Linear Regression
B.Sc./Cert./M.Sc. Qualif. - Statistics: Theory and Practice 3 Simple Linear Regression 3. An industrial example A study was undertaken to determine the effect of stirring rate on the amount of impurity
More informationEconometrics I KS. Module 1: Bivariate Linear Regression. Alexander Ahammer. This version: March 12, 2018
Econometrics I KS Module 1: Bivariate Linear Regression Alexander Ahammer Department of Economics Johannes Kepler University of Linz This version: March 12, 2018 Alexander Ahammer (JKU) Module 1: Bivariate
More informationApplied Econometrics (QEM)
Applied Econometrics (QEM) The Simple Linear Regression Model based on Prinicples of Econometrics Jakub Mućk Department of Quantitative Economics Jakub Mućk Applied Econometrics (QEM) Meeting #2 The Simple
More informationBusiness Statistics. Tommaso Proietti. Linear Regression. DEF - Università di Roma 'Tor Vergata'
Business Statistics Tommaso Proietti DEF - Università di Roma 'Tor Vergata' Linear Regression Specication Let Y be a univariate quantitative response variable. We model Y as follows: Y = f(x) + ε where
More informationSimple Linear Regression
Simple Linear Regression ST 430/514 Recall: A regression model describes how a dependent variable (or response) Y is affected, on average, by one or more independent variables (or factors, or covariates)
More informationSimple Linear Regression
Simple Linear Regression ST 370 Regression models are used to study the relationship of a response variable and one or more predictors. The response is also called the dependent variable, and the predictors
More informationFitting a regression model
Fitting a regression model We wish to fit a simple linear regression model: y = β 0 + β 1 x + ɛ. Fitting a model means obtaining estimators for the unknown population parameters β 0 and β 1 (and also for
More informationProblems. Suppose both models are fitted to the same data. Show that SS Res, A SS Res, B
Simple Linear Regression 35 Problems 1 Consider a set of data (x i, y i ), i =1, 2,,n, and the following two regression models: y i = β 0 + β 1 x i + ε, (i =1, 2,,n), Model A y i = γ 0 + γ 1 x i + γ 2
More information2.4.3 Estimatingσ Coefficient of Determination 2.4. ASSESSING THE MODEL 23
2.4. ASSESSING THE MODEL 23 2.4.3 Estimatingσ 2 Note that the sums of squares are functions of the conditional random variables Y i = (Y X = x i ). Hence, the sums of squares are random variables as well.
More informationWeighted Least Squares
Weighted Least Squares The standard linear model assumes that Var(ε i ) = σ 2 for i = 1,..., n. As we have seen, however, there are instances where Var(Y X = x i ) = Var(ε i ) = σ2 w i. Here w 1,..., w
More informationChapter 3 - Linear Regression
Chapter 3 - Linear Regression Lab Solution 1 Problem 9 First we will read the Auto" data. Note that most datasets referred to in the text are in the R package the authors developed. So we just need to
More informationLecture 18: Simple Linear Regression
Lecture 18: Simple Linear Regression BIOS 553 Department of Biostatistics University of Michigan Fall 2004 The Correlation Coefficient: r The correlation coefficient (r) is a number that measures the strength
More informationEconometrics I Lecture 3: The Simple Linear Regression Model
Econometrics I Lecture 3: The Simple Linear Regression Model Mohammad Vesal Graduate School of Management and Economics Sharif University of Technology 44716 Fall 1397 1 / 32 Outline Introduction Estimating
More informationINTRODUCING LINEAR REGRESSION MODELS Response or Dependent variable y
INTRODUCING LINEAR REGRESSION MODELS Response or Dependent variable y Predictor or Independent variable x Model with error: for i = 1,..., n, y i = α + βx i + ε i ε i : independent errors (sampling, measurement,
More informationMultiple Regression: Example
Multiple Regression: Example Cobb-Douglas Production Function The Cobb-Douglas production function for observed economic data i = 1,..., n may be expressed as where O i is output l i is labour input c
More information8 Nonlinear Regression
8 Nonlinear Regression Nonlinear regression relates to models, where the mean response is not linear in the parameters of the model. A MLRM Y = β 0 + β 1 x 1 + β 2 x 2 + + β k x k + ε, ε N (0, σ 2 ) has
More informationSimple Linear Regression Analysis
LINEAR REGRESSION ANALYSIS MODULE II Lecture - 6 Simple Linear Regression Analysis Dr. Shalabh Department of Mathematics and Statistics Indian Institute of Technology Kanpur Prediction of values of study
More informationGov 2000: 7. What is Regression?
Gov 2000: 7. What is Regression? Matthew Blackwell Harvard University mblackwell@gov.harvard.edu October 15, 2016 Where are we? Where are we going? What we ve been up to: estimating parameters of population
More informationSimple Linear Regression
Simple Linear Regression MATH 282A Introduction to Computational Statistics University of California, San Diego Instructor: Ery Arias-Castro http://math.ucsd.edu/ eariasca/math282a.html MATH 282A University
More informationLAB 5 INSTRUCTIONS LINEAR REGRESSION AND CORRELATION
LAB 5 INSTRUCTIONS LINEAR REGRESSION AND CORRELATION In this lab you will learn how to use Excel to display the relationship between two quantitative variables, measure the strength and direction of the
More informationY i = η + ɛ i, i = 1,...,n.
Nonparametric tests If data do not come from a normal population (and if the sample is not large), we cannot use a t-test. One useful approach to creating test statistics is through the use of rank statistics.
More informationSTAT 3022 Spring 2007
Simple Linear Regression Example These commands reproduce what we did in class. You should enter these in R and see what they do. Start by typing > set.seed(42) to reset the random number generator so
More informationLinear Regression. In this lecture we will study a particular type of regression model: the linear regression model
1 Linear Regression 2 Linear Regression In this lecture we will study a particular type of regression model: the linear regression model We will first consider the case of the model with one predictor
More informationSimple Linear Regression
Simple Linear Regression Reading: Hoff Chapter 9 November 4, 2009 Problem Data: Observe pairs (Y i,x i ),i = 1,... n Response or dependent variable Y Predictor or independent variable X GOALS: Exploring
More informationSample Problems. Note: If you find the following statements true, you should briefly prove them. If you find them false, you should correct them.
Sample Problems 1. True or False Note: If you find the following statements true, you should briefly prove them. If you find them false, you should correct them. (a) The sample average of estimated residuals
More informationNature vs. nurture? Lecture 18 - Regression: Inference, Outliers, and Intervals. Regression Output. Conditions for inference.
Understanding regression output from software Nature vs. nurture? Lecture 18 - Regression: Inference, Outliers, and Intervals In 1966 Cyril Burt published a paper called The genetic determination of differences
More informationLecture 11: Simple Linear Regression
Lecture 11: Simple Linear Regression Readings: Sections 3.1-3.3, 11.1-11.3 Apr 17, 2009 In linear regression, we examine the association between two quantitative variables. Number of beers that you drink
More informationChapter 2 Multiple Regression I (Part 1)
Chapter 2 Multiple Regression I (Part 1) 1 Regression several predictor variables The response Y depends on several predictor variables X 1,, X p response {}}{ Y predictor variables {}}{ X 1, X 2,, X p
More informationMultiple Linear Regression
Multiple Linear Regression Simple linear regression tries to fit a simple line between two variables Y and X. If X is linearly related to Y this explains some of the variability in Y. In most cases, there
More informationLecture 2. Simple linear regression
Lecture 2. Simple linear regression Jesper Rydén Department of Mathematics, Uppsala University jesper@math.uu.se Regression and Analysis of Variance autumn 2014 Overview of lecture Introduction, short
More informationGov 2000: 9. Regression with Two Independent Variables
Gov 2000: 9. Regression with Two Independent Variables Matthew Blackwell Harvard University mblackwell@gov.harvard.edu Where are we? Where are we going? Last week: we learned about how to calculate a simple
More informationNonstationary time series models
13 November, 2009 Goals Trends in economic data. Alternative models of time series trends: deterministic trend, and stochastic trend. Comparison of deterministic and stochastic trend models The statistical
More information22s:152 Applied Linear Regression. Example: Study on lead levels in children. Ch. 14 (sec. 1) and Ch. 15 (sec. 1 & 4): Logistic Regression
22s:52 Applied Linear Regression Ch. 4 (sec. and Ch. 5 (sec. & 4: Logistic Regression Logistic Regression When the response variable is a binary variable, such as 0 or live or die fail or succeed then
More informationSF2930: REGRESION ANALYSIS LECTURE 1 SIMPLE LINEAR REGRESSION.
SF2930: REGRESION ANALYSIS LECTURE 1 SIMPLE LINEAR REGRESSION. Tatjana Pavlenko 17 January 2018 WHAT IS REGRESSION? INTRODUCTION Regression analysis is a statistical technique for investigating and modeling
More informationWeek 3: Simple Linear Regression
Week 3: Simple Linear Regression Marcelo Coca Perraillon University of Colorado Anschutz Medical Campus Health Services Research Methods I HSMP 7607 2017 c 2017 PERRAILLON ALL RIGHTS RESERVED 1 Outline
More informationSimple and Multiple Linear Regression
Sta. 113 Chapter 12 and 13 of Devore March 12, 2010 Table of contents 1 Simple Linear Regression 2 Model Simple Linear Regression A simple linear regression model is given by Y = β 0 + β 1 x + ɛ where
More informationMBF1923 Econometrics Prepared by Dr Khairul Anuar
MBF1923 Econometrics Prepared by Dr Khairul Anuar L4 Ordinary Least Squares www.notes638.wordpress.com Ordinary Least Squares The bread and butter of regression analysis is the estimation of the coefficient
More informationApplied Regression Modeling: A Business Approach Chapter 3: Multiple Linear Regression Sections
Applied Regression Modeling: A Business Approach Chapter 3: Multiple Linear Regression Sections 3.4 3.6 by Iain Pardoe 3.4 Model assumptions 2 Regression model assumptions.............................................
More informationRecent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data
Recent Advances in the Field of Trade Theory and Policy Analysis Using Micro-Level Data July 2012 Bangkok, Thailand Cosimo Beverelli (World Trade Organization) 1 Content a) Classical regression model b)
More informationECON3150/4150 Spring 2015
ECON3150/4150 Spring 2015 Lecture 3&4 - The linear regression model Siv-Elisabeth Skjelbred University of Oslo January 29, 2015 1 / 67 Chapter 4 in S&W Section 17.1 in S&W (extended OLS assumptions) 2
More informationData Analysis and Statistical Methods Statistics 651
y 1 2 3 4 5 6 7 x Data Analysis and Statistical Methods Statistics 651 http://www.stat.tamu.edu/~suhasini/teaching.html Lecture 32 Suhasini Subba Rao Previous lecture We are interested in whether a dependent
More information5. Linear Regression
5. Linear Regression Outline.................................................................... 2 Simple linear regression 3 Linear model............................................................. 4
More informationDensity Temp vs Ratio. temp
Temp Ratio Density 0.00 0.02 0.04 0.06 0.08 0.10 0.12 Density 0.0 0.2 0.4 0.6 0.8 1.0 1. (a) 170 175 180 185 temp 1.0 1.5 2.0 2.5 3.0 ratio The histogram shows that the temperature measures have two peaks,
More informationThe Classical Linear Regression Model
The Classical Linear Regression Model ME104: Linear Regression Analysis Kenneth Benoit August 14, 2012 CLRM: Basic Assumptions 1. Specification: Relationship between X and Y in the population is linear:
More informationSLR output RLS. Refer to slr (code) on the Lecture Page of the class website.
SLR output RLS Refer to slr (code) on the Lecture Page of the class website. Old Faithful at Yellowstone National Park, WY: Simple Linear Regression (SLR) Analysis SLR analysis explores the linear association
More informationTopic 12 Overview of Estimation
Topic 12 Overview of Estimation Classical Statistics 1 / 9 Outline Introduction Parameter Estimation Classical Statistics Densities and Likelihoods 2 / 9 Introduction In the simplest possible terms, the
More informationTwo-Variable Regression Model: The Problem of Estimation
Two-Variable Regression Model: The Problem of Estimation Introducing the Ordinary Least Squares Estimator Jamie Monogan University of Georgia Intermediate Political Methodology Jamie Monogan (UGA) Two-Variable
More informationR 2 and F -Tests and ANOVA
R 2 and F -Tests and ANOVA December 6, 2018 1 Partition of Sums of Squares The distance from any point y i in a collection of data, to the mean of the data ȳ, is the deviation, written as y i ȳ. Definition.
More information15.1 The Regression Model: Analysis of Residuals
15.1 The Regression Model: Analysis of Residuals Tom Lewis Fall Term 2009 Tom Lewis () 15.1 The Regression Model: Analysis of Residuals Fall Term 2009 1 / 12 Outline 1 The regression model 2 Estimating
More informationStatistical View of Least Squares
May 23, 2006 Purpose of Regression Some Examples Least Squares Purpose of Regression Purpose of Regression Some Examples Least Squares Suppose we have two variables x and y Purpose of Regression Some Examples
More informationTopic 14: Inference in Multiple Regression
Topic 14: Inference in Multiple Regression Outline Review multiple linear regression Inference of regression coefficients Application to book example Inference of mean Application to book example Inference
More informationLecture 6 Multiple Linear Regression, cont.
Lecture 6 Multiple Linear Regression, cont. BIOST 515 January 22, 2004 BIOST 515, Lecture 6 Testing general linear hypotheses Suppose we are interested in testing linear combinations of the regression
More informationThe Aitken Model. Copyright c 2012 Dan Nettleton (Iowa State University) Statistics / 41
The Aitken Model Copyright c 2012 Dan Nettleton (Iowa State University) Statistics 611 1 / 41 The Aitken Model (AM): Suppose where y = Xβ + ε, E(ε) = 0 and Var(ε) = σ 2 V for some σ 2 > 0 and some known
More informationThe Simple Regression Model. Part II. The Simple Regression Model
Part II The Simple Regression Model As of Sep 22, 2015 Definition 1 The Simple Regression Model Definition Estimation of the model, OLS OLS Statistics Algebraic properties Goodness-of-Fit, the R-square
More informationHomework 2: Simple Linear Regression
STAT 4385 Applied Regression Analysis Homework : Simple Linear Regression (Simple Linear Regression) Thirty (n = 30) College graduates who have recently entered the job market. For each student, the CGPA
More information22s:152 Applied Linear Regression. Chapter 5: Ordinary Least Squares Regression. Part 2: Multiple Linear Regression Introduction
22s:152 Applied Linear Regression Chapter 5: Ordinary Least Squares Regression Part 2: Multiple Linear Regression Introduction Basic idea: we have more than one covariate or predictor for modeling a dependent
More informationOct Simple linear regression. Minimum mean square error prediction. Univariate. regression. Calculating intercept and slope
Oct 2017 1 / 28 Minimum MSE Y is the response variable, X the predictor variable, E(X) = E(Y) = 0. BLUP of Y minimizes average discrepancy var (Y ux) = C YY 2u C XY + u 2 C XX This is minimized when u
More informationLinear Algebra The Inverse of a Matrix
Linear Algebra The Inverse of a Matrix Dr. Bisher M. Iqelan biqelan@iugaza.edu.ps Department of Mathematics The Islamic University of Gaza 2017-2018, Semester 2 Dr. Bisher M. Iqelan (IUG) Sec.2.2: The
More informationTime Series Analysis
Time Series Analysis hm@imm.dtu.dk Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs. Lyngby 1 Outline of the lecture Regression based methods, 1st part: Introduction (Sec.
More information22s:152 Applied Linear Regression. Take random samples from each of m populations.
22s:152 Applied Linear Regression Chapter 8: ANOVA NOTE: We will meet in the lab on Monday October 10. One-way ANOVA Focuses on testing for differences among group means. Take random samples from each
More informationInference in Regression Analysis
Inference in Regression Analysis Dr. Frank Wood Frank Wood, fwood@stat.columbia.edu Linear Regression Models Lecture 4, Slide 1 Today: Normal Error Regression Model Y i = β 0 + β 1 X i + ǫ i Y i value
More information5. Linear Regression
5. Linear Regression Outline.................................................................... 2 Simple linear regression 3 Linear model............................................................. 4
More informationSection 3: Simple Linear Regression
Section 3: Simple Linear Regression Carlos M. Carvalho The University of Texas at Austin McCombs School of Business http://faculty.mccombs.utexas.edu/carlos.carvalho/teaching/ 1 Regression: General Introduction
More informationRegression - Modeling a response
Regression - Modeling a response We often wish to construct a model to Explain the association between two or more variables Predict the outcome of a variable given values of other variables. Regression
More informationCoefficient of Determination
Coefficient of Determination ST 430/514 The coefficient of determination, R 2, is defined as before: R 2 = 1 SS E (yi ŷ i ) = 1 2 SS yy (yi ȳ) 2 The interpretation of R 2 is still the fraction of variance
More informationAdvanced Quantitative Methods: ordinary least squares
Advanced Quantitative Methods: Ordinary Least Squares University College Dublin 31 January 2012 1 2 3 4 5 Terminology y is the dependent variable referred to also (by Greene) as a regressand X are the
More informationMODELS WITHOUT AN INTERCEPT
Consider the balanced two factor design MODELS WITHOUT AN INTERCEPT Factor A 3 levels, indexed j 0, 1, 2; Factor B 5 levels, indexed l 0, 1, 2, 3, 4; n jl 4 replicate observations for each factor level
More information