rinterface

rinterface

  1. Write out the linear model
    1. Pre-conditions for using the Linear Regression Model . . .

      • Linearity. The data should show a linear trend, which it does.
      • Nearly normal residuals. Generally the residuals must be nearly normal, which they are.
      • Constant variability. The variability of points around the least squares line remains roughly constant. Ok.
      • Independent observations. Data is randomly sampled and the presumption is that one person’s poverty and propensity for murder is independent of anothers.
    2. General form of the linear regression model \[y = \beta{_0} + \beta{_1}x\] \[\widehat{Murders_{PerMillion}} = b{_0} + b{_1} \times{Poverty_\%}\]

    3. Assign the value of the least squares slope and the intercept. The entries in the first column of table 7.29 represent the least squares estimates, \(b{_0}\) and \(b{_1}\) \[Estimated\:Intercept\: b{_0} = {-29.901};\:Estimated\:Slope\:{b{_1} = 2.559}\] \[\widehat{Murders_{PerMillion}} = -29.901 + 2.559 \times{Poverty_\%}\]

  2. Interpret the intercept \(b{_0}\).

    1. The intercept is the estimated murder rate when the percentage of poverty is 0.

    2. When the percentage of poverty is zero, the predicted murder rate is -29.901 which extrapolated and outside the range of reasonable predictions for two reasons:

      • A negative absolute murder rate makes no sense.
      • The metropolitan area on the scatterplot shows no poverty rates near 0.
  3. Interpret the slope \(b{_1}\).

    1. The slope indicates that, on average, for each rise in the poverty rate of 1%, we observe a corresponding rise in the murder rate of 2.559 persons per million annually.
  4. Interpret \(R{^2}\).

    1. The R2 of a linear model describes the amount of variation in the response that is explained by the least squares line. The textbook description for this was the strength of the least squares fit between the two variables which describes how closely the data cluster around the linear fit.

      In this case, poverty% explains 70.52% of the variability of murder rates in metropolitan areas.

\[{R{^2} = \frac{{{s_{murder}}{^2}} - {{s_{res}}{^2}}}{{s_{murder}}{^2}}}\]

  1. Calculate the Correlation Coefficient

    1. \(R = \sqrt{0.7052} = 0.8398\)