13Simple Linear Regression

13.1 Introduction

There is an immense amount of situations where one variable depends on another. For a given amount of money, the new balance in a bank account after a year is a function of the bank's interest rate. Similarly, the revenue of selling shirts at $12 a shirt is a function of the amount of shirts sold. Suppose the cost of a service is a linear function of usage of the service. For example, the monthly electricity bill may be


where images is the amount to be paid, images is the kilowatt‐hour for the month. 0.15 ¢ represents the cost per kilowatt‐hour. The equation tells us there is a basic monthly charge of $5. Hence, if a client is on vacation (and has unplugged everything) and consumed a total of 0 kWh, they must still pay $5 to the power company. If a client uses 100 kWh, their bill for the month should be images. Figure 13.1 presents the association between power bill amount and kilowatt‐hour usage.

This example shows us that it is very convenient to express a variable as a function of another. If we know the kilowatt‐hours, cost per kilowatt‐hour and basic ...

Get Principles of Managerial Statistics and Data Science now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.