To establish the linear regression model,
Yi = b0 + b1 Xi + ei
We will apply the technique of Method Of Least Squares (MLS) to estimate the parameters b0 and b1.
This method consists of minimizing Error sum of squares given by
E = Σei2 = Σ(Yi - b0 - b1 Xi)2
On differentiating with respect to the parameters b0 and b1 we get two normal equations and solving them we can see that estimates of parameters b0 and b1 are as follows:
b1 = Cov(X,Y)/Var(X) and b0 = Ybar – b1 Xbar.
Thus for the sake of calculations we should prepare the following table:
i |
Xi |
Yi |
Xi2 |
Yi2 |
Xi* Yi |
1 |
|||||
2 |
|||||
. |
|||||
. |
|||||
n |
|||||
Total |
ΣX |
ΣY |
ΣX2 |
ΣY2 |
ΣXY |
After getting these totals in table it is easy to estimate both the parameters.
In order to hold this relation the condition b0 is it should be NON ZERO.
Condition on b1 is also same that it must be NON ZERO.
Here we must note that the relation is linear so that graphically it represents a straight line, where b0 is interpreted as intercept on Y axis or it is the value of Y in the absence of X. Similarly b1 is interpreted as slope of the line, which is rate of change in Y per unit change in X.
Suppose we assume the usual linear relationship yibo byai e for n pairs of observations (xi,...
R STUDIO
Create a simulated bivariate data set consisting of n 100 (xi, yi) pairs: Generate n random a-coordinates c from N(0, 1) Generate n random errors, e, from N(0, o), using o 4. Set yiBoB1x; + , Where Bo = 2, B1 = 3, and eN(0, 4). (That is, y is a linear function of , plus some random noise.) (Now we have simulated data. We'll pretend that we don't know the true y-intercept Bo 2, the true slope...
4. (24 marks) Suppose that the random variables Yi,..., Yn satisfy Y-B BX,+ Ei, 1-1, , n, where βο and βι are parameters, X1, ,X, are con- stants, and e1,... ,en are independent and identically distributed ran- dom variables with Ei ~ N (0,02), where σ2 is a third unknown pa- rameter. This is the familiar form for a simple linear regression model, where the parameters A, β, and σ2 explain the relationship between a dependent (or response) variable Y...
Suppose we are given data on n observations (zi, Y4), i-1, . . . , n, and we have a linear model so that E(X)-β0+B1zi. Let A-SXY/SXX and A-Y-Aī be the least-square estimates given in lecture. (a) Show that E(Sxy)-ASxx and E(Y)-A +AF (b) Use (a) to show that E(BB and E(B)In other words, these are unbiased estimators (c) The fitted values Yi-A+Azi are used as estimates of %), and the residuals e,-x-Y; are used as surrogates for the unobservable...
2. Suppose we are given data on n observations (x,Y), i 1,... , n, and we have a linear model, = SXY/SXX and A,-ㄚ-Ax be the least-square estimates so that E(X) = β0 +ATp Let given in lecture. (a) Show that E(5xx)-A5xx and E(Y)-Ao +A2. (b) Use (a) to show that E(A)-A and E(A)-A. În other words, these are unbiased estimators (c) The fitted values Yi = ArtAz; are used as estimates of E(K), and the residuals ei = Y-...
2
2. Suppose we are given data on n observations (i, Y),, and we have a linear model, so that E(X)-A, + ßiri-Let呙-SXY /SXX and β') = F-β,2 be the least-square estimates given in lecture (a) Show that E(SXY)-ASXX and E (T)-A] + β,7. (b) Use (a) to show that E(角)-βι and E(A) = 3). In other words, these are unbiased estimators. (c) The fitted values Yt = Atari are used as estimates of E(A), and the residuals e.-Yi for...
2. Suppose we are given data on n observations (zi, y), î i, . . . , n, and we have a linear model, so that E (Y,) = Ao +Ari. Let A = SXY/Sxx and A,-F-Ax be the least-square estimates given in lecture. (a) Show that E(SXY)-ASxx and E(y)-Ao +AT. (b) Use (a) to show that E (A)-A and E(A)-A- In other words, these are unbiased estimators (c) The fitted values Yī = β0+812 i are used as estimates...
Suppose we have collected a random sample from our population, denoted by (xi , yi), i = 1, . . . , n. We now fit a least-squares line: yˆi = βˆ 0 + βˆ 1xi (i = 1, . . . , n). What additional assumption do we need in order to carry out statistical inference on our least square estimators βˆ 0 and βˆ 1? c. Using the results we’ve derived in class, prove that the sum of...
5. (20 pts) Suppose that we have a dataset {(yi, x, Tt2, X;3), i,1,... ,n} together with some general belief on the data that higher (lower) value of each covariate x; (j = 1,2,3) will tend to result in higher (lower) y. In this study, we are interested in predicting y; from the total set of the regressors x;i, X;2, xt3. So, we apply the multiple linear regression yi = Bo+B1x1 +B2x52 + B3x43 + t to the data and...
11. Suppose you are interested in estimating the effect of hours spent in an SAT preparation course (hours) on total SAT score (sat). The population is all college-bound high school seniors for a particular year. (i) Suppose you are given a grant to run a controlled experiment. Explain how you would structure the experiment in order to estimate the causal effect of hours on sat. (ii) Consider the more realistic case where students choose how much time to spend in...
1. In the simple regression model y = + β1x + u, suppose that E (u) 0. Letting oo-E(u), show that the model can always be rewrit ten with the same slope, but a new intercept and error, where the new error has a zero expected value 2. The data set BWGHT contains data on births to women in the United States. Two variables of interest are the dependent variable, nfan birth weight in ounces (bught), and an explanatory variable,...