EXAMPLE 8 Least-Squares Regression of BAC on Number of Beers

Go back to the BAC-beer data in Table 6.1 (page 243). Use your calculator or spreadsheet software to verify the following:

  • The mean and standard deviation of , number of beers consumed, are and .
  • The mean and standard deviation of , BAC, are and .
  • The correlation between the number of beers and BAC is .

The least-squares regression line of BAC () on number of beers () has slope

and -intercept

The equation of the least-squares line is therefore

just as we claimed earlier.

When doing calculations like this by hand, you should carry extra decimal places in the intermediate calculations to get accurate values of the slope and intercept and not round until your final answer. Using software or a calculator with a regression function eliminates this worry.