Forecasting using linear regression

This recipe illustrates the method of estimating the future values based on a linear trend. The linear trend is calculated using the least-square distance, a statistical method of determining the line that fits the best through the set of values in the chart, as displayed in the following figure:

Forecasting using linear regression

Mathematically, linear regression can be represented by a regression line, y = ax + b, where y is the value of the y-intercept for a value of x.

Linear regression is often used in a way that x is a period and y is the value in a particular time, for example, a month.

Most importantly, the regression line is used to forecast ...

Get MDX with Microsoft SQL Server 2016 Analysis Services Cookbook - Third Edition now with O’Reilly online learning.

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