Session Ready
Exercise

Testing The Regression Model III

Our output provided us with a p-value for our model (enter summary(mod1) in your console), however we still need to have a look at the confidence interval for our slope coefficient. If the confidence interval does not include the value 0, then we say that the relationship we found here in the sample also exists in the population.

The calculation for the confidence interval is $$test statistic \pm margin of error$$ Where the margin of error is $$t_{\alpha/2, df = n-2 } * se_{slope}$$

Let's try this out. In our money experiment we had a sample size of 10, so our t-value (where df = 8, and p = 0.025) is 2.306.

Instructions
100 XP
  • In your script, assign the upper limit of the confidence interval to upper.
  • In your script, assign the lower limit of the confidence interval to lower.
  • Use the provided t-value, and obtain standard error and the slope value from the summary of the regression (see console). You can write summary(mod1) into your console if you need to retreive the summary again!
  • In your script, print both upper and lower.