Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Tentamen (uitwerkingen)

MGT 6203 Graded Homework 1 Solutions.

Beoordeling
-
Verkocht
-
Pagina's
19
Cijfer
A+
Geüpload op
21-06-2021
Geschreven in
2020/2021

Graded Homework 1 Solution Manual Question 1. Choose the correct statement regarding the sum of residuals calculated using Ordinary Least Squares (OLS). Answer 1. (B) The sum of residuals will always be equal to zero if you include intercept term in your model and you are using OLS to estimate the coefficients. When an intercept is included in multiple linear regression for a data set with p points, the line is of the form: In OLS (Ordinary Least Square) Regression, the objective is to minimize the SSE (Sum of Squared Errors) to 0, which is obtained as follows: And to find all the betas, we differentiate all the above equation against all of betas individually including β0. We obtain ‘p+1’ equations to solve for all the ‘p+1’ betas. Differentiating against β0, we get: The above equation is responsible for ensuring that the sum of residuals is 0. Therefore, C and D are incorrect options. We now must decide between A and B. One form of regression under consideration is “Regression passing through Origin” (which is ideally not considered to be True OLS) which is a special case. Absence of intercept still means that the SSE is minimized, but it does not guarantee that SSE = 0. It is only when the intercept is included that the residuals sum up to 0. Thus, B is the correct option. One can think of the intercept as the catchall term, which provides for shifting the line of regression closer to or away from the X-axis (say the response terms are of the order 1000s, and thus the β0 value helps move the line of regression the said order, providing for finer tuned remaining betas). We understand that some ambiguity was observed regarding the forms of regression. Here, the question was designed keeping in mind the concept of the importance of the intercept term. While thetrue answer should be (B), we shall consider both (A) and (B) as the right choice. Question 2. Consider a simple linear regression model. Y ~ X. A fit for this model will be a line in the X-Y plane. Now suppose we fit a model for the opposite relationship: X ~ Y (that is, X dependent, and Y independent). This new model yields a new regression line in the X-Y plane. Which of the following statements are true about these two lines? Answer 2. (B) These lines will always intersect at the mean (Xmean, Ymean) If we have that y is a dependent variable on x, (and for their respective means ´ y and ´ x ), then the least squares regression Y ~ X line is given as: ( y−´ y)=CoV (x , y ) Var (x ) (x−x´ ) Similarly, the line for X ~ Y is given as: (x−´ x)=CoV (x , y ) Var ( y ) ( y−´ y) Clearly, these two lines meet at the means ´ y and ´ x . The above equation is obtained using the least square estimator method for estimating the values a and b while minimizing the residuals: The final line is y=a+bx and we find a and b using equations obtained by placing ∂ D(a , b) ∂ a = ∂ D(a ,b) ∂ b =0 which gives us a=´ y−b ´ x and b=CoV Var(x (x,)y ) We can also write a small piece of code to check the same: mydata = (‘EDSAL.csv') YregX - lm(Salary~Experience, mydata) summary(YregX) Call: lm(formula = Salary ~ Experience, data = mydata) Residuals: Min 1Q Median 3Q Max -73.00 -12.82 -1.18 13.32 60.85 2Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) 29.4679 2.5673 11.48 2e-16 *** Experience 3.0959 0.1113 27.81 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 24.05 on 298 degrees of freedom Multiple R-squared: 0.7218, Adjusted R-squared: 0.7209 F-statistic: 773.2 on 1 and 298 DF, p-value: 2.2e-16 XregY - lm(Experience~Salary, mydata) summary(XregY) Call: lm(formula = Experience ~ Salary, data = mydata) Residuals: Min 1Q Median 3Q Max -11.430 -4.867 -1.787 3.489 20.805 Coefficients: Estimate Std. Error t value Pr(|t|) (Intercept) -1. 0. -1.753 0.0807 . Salary 0. 0. 27.806 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 6.601 on 298 degrees of freedom Multiple R-squared: 0.7218, Adjusted R-squared: 0.7209 F-statistic: 773.2 on 1 and 298 DF, p-value: 2.2e-16 plot(mydata$Experience, mydata$Salary) abline(29.4679, 3.0959) abline(1./0., 1/0.) mean(mydata$Experience) [1] 19.39333 mean(mydata$Salary) [1] 89.50846 The graph produced is as follows (which meets at the mean of the Xs and Ys) abline(29.4679, 3.0959) abline(1./0., 1/0.) Kindly note that while plotting the two line on the same axis, the line from X ~ Y needs to be transformed to X-Y co-ordinate as shown above in the second line of code. Another point to n

Meer zien Lees minder
Instelling
Vak

Voorbeeld van de inhoud

Graded Homework 1
Solution Manual

Question 1. Choose the correct statement regarding the sum of
residuals calculated using Ordinary Least Squares (OLS).

Answer 1. (B) The sum of residuals will always be equal to zero if you include
intercept term in your model and you are using OLS to estimate the
coefficients.

When an intercept is included in multiple linear regression for a data set with
p points, the line is of the form:


In OLS (Ordinary Least Square) Regression, the objective is to minimize the
SSE (Sum of Squared Errors) to 0, which is obtained as follows:



And to find all the betas, we differentiate all the above equation against all of
betas individually including β0. We obtain ‘p+1’ equations to solve for all the
‘p+1’ betas. Differentiating against β0, we get:



The above equation is responsible for ensuring that the sum of residuals is 0.
Therefore, C and D are incorrect options.

We now must decide between A and B. One form of regression under
consideration is “Regression passing through Origin” (which is ideally not
considered to be True OLS) which is a special case. Absence of intercept still
means that the SSE is minimized, but it does not guarantee that SSE = 0. It
is only when the intercept is included that the residuals sum up to 0.

Thus, B is the correct option. One can think of the intercept as the catchall
term, which provides for shifting the line of regression closer to or away from
the X-axis (say the response terms are of the order 1000s, and thus the β0
value helps move the line of regression the said order, providing for finer
tuned remaining betas).

We understand that some ambiguity was observed regarding the
forms of regression. Here, the question was designed keeping in
mind the concept of the importance of the intercept term. While the

,true answer should be (B), we shall consider both (A) and (B) as the
right choice.


Question 2. Consider a simple linear regression model. Y ~ X. A fit
for this model will be a line in the X-Y plane. Now suppose we fit a
model for the opposite relationship: X ~ Y (that is, X dependent, and
Y independent). This new model yields a new regression line in the
X-Y plane. Which of the following statements are true about these
two lines?

Answer 2. (B) These lines will always intersect at the mean (Xmean, Ymean)

If we have that y is a dependent variable on x, (and for their respective
means ý and x́ ), then the least squares regression Y ~ X line is given
as:
CoV ( x , y )
( y− ý )= ( x− x́ )
Var ( x )
Similarly, the line for X ~ Y is given as:
CoV ( x , y )
(x−x́)= ( y− ý )
Var ( y )
Clearly, these two lines meet at the means ý and x́ .

The above equation is obtained using the least square estimator method for
estimating the values a and b while minimizing the residuals:
2



The final line is y=a+bx and we find a and b using equations obtained by
placing
∂ D(a , b) ∂ D(a ,b) CoV ( x , y )
= =0 which gives us a= ý−b x́ and b=
∂a ∂b Var ( x )

We can also write a small piece of code to check the same:

> mydata = read.csv(‘EDSAL.csv')
> YregX <- lm(Salary~Experience, mydata)
> summary(YregX)

Call:
lm(formula = Salary ~ Experience, data = mydata)

Residuals:
Min 1Q Median 3Q Max
-73.00 -12.82 -1.18 13.32 60.85

, Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 29.4679 2.5673 11.48 <2e-16 ***
Experience 3.0959 0.1113 27.81 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 24.05 on 298 degrees of freedom
Multiple R-squared: 0.7218, Adjusted R-squared: 0.7209
F-statistic: 773.2 on 1 and 298 DF, p-value: < 2.2e-16

> XregY <- lm(Experience~Salary, mydata)
> summary(XregY)

Call:
lm(formula = Experience ~ Salary, data = mydata)

Residuals:
Min 1Q Median 3Q Max
-11.430 -4.867 -1.787 3.489 20.805

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.475177 0.841711 -1.753 0.0807 .
Salary 0.233146 0.008385 27.806 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 6.601 on 298 degrees of freedom
Multiple R-squared: 0.7218, Adjusted R-squared: 0.7209
F-statistic: 773.2 on 1 and 298 DF, p-value: < 2.2e-16

> plot(mydata$Experience, mydata$Salary)
> abline(29.4679, 3.0959)
> abline(1.475177/0.233146, 1/0.233146)
>
> mean(mydata$Experience)
[1] 19.39333
> mean(mydata$Salary)
[1] 89.50846


The graph produced is as follows (which meets at the mean of the Xs and Ys)

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
21 juni 2021
Aantal pagina's
19
Geschreven in
2020/2021
Type
Tentamen (uitwerkingen)
Bevat
Vragen en antwoorden

Onderwerpen

€14,19
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF


Ook beschikbaar in voordeelbundel

Maak kennis met de verkoper

Seller avatar
De reputatie van een verkoper is gebaseerd op het aantal documenten dat iemand tegen betaling verkocht heeft en de beoordelingen die voor die items ontvangen zijn. Er zijn drie niveau’s te onderscheiden: brons, zilver en goud. Hoe beter de reputatie, hoe meer de kwaliteit van zijn of haar werk te vertrouwen is.
Examhack Stanford University
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
301
Lid sinds
4 jaar
Aantal volgers
238
Documenten
999
Laatst verkocht
1 dag geleden
EASY A GRADE!!

Here, you will find simple, articulate well-researched education material for you. .... ALL WORK HAS PASSED WITHOUT NEEDING REVISIONS AND BY THE RUBRIC.

3,8

61 beoordelingen

5
31
4
11
3
5
2
4
1
10

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen