19.1 Fitting a Line to Data

Consider two questions about the cost of diamonds:

  1. What’s the average cost of diamonds that weigh 0.4 carat?

  2. How much more do diamonds that weigh 0.5 carat cost?

One way to answer these questions would be to get two samples of diamonds. The diamonds in one sample weigh 0.4 carat, and those in the other weigh 0.5 carat. The average cost in the sample at 0.4 carat answers the first question. The difference in average costs between the two samples answers the second. Going further, we could build confidence intervals or test hypotheses about the means.

These two average costs answer the posed questions but are very specific to these questions. Suppose the questions were to change slightly:

  • 1′. What’s the average cost ...

Get Statistics for Business: Decision Making and Analysis, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.