Multiple regression in a spreadsheet

This illustration shows a typical set of data collected over successive weeks and tabulated in a spreadsheet. Column A contains the kWh consumption figures, and columns B,C, and D contain the corresponding driving-factor quantities:

In the spreadsheet program's regression analysis tool, the column of consumption figures (shown in red) are the 'dependent variable' or 'y range'. The block of figures in blue represents the 'independent variables' or 'x range'. The x range may span several columns, as shown here, but it would be a single column if there were only one driving factor.

If a particular value in column A were not known, it could be estimated by substituting that row's known values for D1, D2 and D3 in the equation

Column A estimate = k0 + k1.D1 + k2.D2 + k3.D3

The purpose of the regression analysis tool is to find values for k0, k1, k2, and so on, which give the least error when estimating the column-A values.