Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Sheet1 Price (X) Quantity demanded (Y) 56 637 23 967 43 908 56 797 76 728 76 891 92 884 91 615 32 876 85 824 74 678 32 925 50 878 96 612 55 905 85 710 32 891 86 734 96 894 69 922 11 908 82 644 65 798...

1 answer below »
Sheet1
    Price (X)    Quantity demanded (Y)
    56    637
    23    967
    43    908
    56    797
    76    728
    76    891
    92    884
    91    615
    32    876
    85    824
    74    678
    32    925
    50    878
    96    612
    55    905
    85    710
    32    891
    86    734
    96    894
    69    922
    11    908
    82    644
    65    798
    94    940
    94    741
    54    828
    82    560
    91    660
    59    766
    89    730
    63    903
    59    506
    90    618
    50    847
    86    816
    85    805
    12    659
    12    777
    77    777
    73    899
    65    553
    85    553
    75    767
    76    720
    74    849
    71    551
    90    627
    63    967
    65    528
    89    829
    86    553
    74    774
    96    655
    54    602
    84    756
    91    720
    60    725
    87    532
    63    932
    65    591

OpenIntro
Here is OpenIntro’s RLab for Chapter 8:
http:
htmlpreview.github.io/?https:
github.com/andrewp
ay/oiLabs-base-R
lo
maste
simple_regression/simple_regression.html
Record and turn in your answers for the On Your Own section.
· In questions that ask for a number, give the numerical answer along with what that number describes. Be specific.
· In questions that ask for your code input, give the code and also describe what R returns.
· In questions that ask for explanation or analysis, provide a reasonably detailed response with evidence supporting your claims.
Supplemental Questions
The idea of these supplemental questions is for you to run through the mechanics of the above lab with the data sets you chose for WH08. Repeat these steps for each data set.
To import your data set into R, save your data sets as .csv files on your desktop or documents folder. Use the file
owser in the bottom right corner to locate your file and import it. If you are in RStudio Cloud, you can upload the csv file. Once it is imported you can give a short-hand name to your data set if it has a long name. ::Click here for pictures of these steps::
1. Create a scatterplot of your two variables with plot(y~x).
2. Generate the line of best fit with model
3. Add a this line to your scatterplot with abline(model).
4. Create a new data set that measures the residuals with residuals
5. Investigate the linearity of your data set:
e. Create a scatterplot of your residuals with plot(model$residuals ~ data$x).
e. Create a histogram of your residuals with hist(model$residuals).
e. Create a qqplot of your residuals with qqnorm(model$residuals).
e. Comment on what these graphics tell you about the linearity of your data.
1. Compute the co
elation of your data with cor(data$y$, data$x).
1. How do these computations relate to your estimates from WH08?
Answered Same Day Apr 07, 2021

Solution

Shruti answered on Jul 30 2021
163 Votes
Q1. Scatter Plots
Model 1:- X= Hours Per Week Y= Yearly Income

Model 2:- X= Price Y= Quantity demanded
Q2. Model 1
Call:
lm(formula = D1$Y ~ D1$X)
Residuals:
Min 1Q Median 3Q Max
-9.967 -4.402 -1.281 3.123 17.155
Coefficients:
Estimate Std. E
or t value Pr(>|t|)
(Intercept) 36.88465 2.98635 12.351 < 2e-16 ***
D1$X 0.68431 0.09658 7.086 1.42e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard e
or: 6.216 on 63 degrees of freedom
Multiple R-squared: 0.4435,    Adjusted R-squared: 0.4347
F-statistic: 50.21 on 1 and 63 DF, p-value: 1.417e-09
Model 2
Call:
lm(formula = D2$Y ~ D2$X)
Residuals:
Min 1Q Median ...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here