{% extends "global/Page.html" %}
{% load otree static %}
{% block title %}
Algorithm Support
{% endblock %}
{% block content %}
An algorithm has determined a demand forecast for the {{ total_number_products }} products.
It calculates the forecast for a product by following three steps: 1 - conducting a linear regression, 2 - checking for a trend in the demand history and 3 - computing a forecast that considers a trend if applicable.
In the following, the procedure of the algorithm is explained in detail:
1 - Linear Regression
The algorithm determines a linear function with the time as the independent variable and the function value as the dependent variable that fits best to the demand history.
The parameters of the linear function, that is, the intercept and the slope, are determined, such that the sum of the squared distances between the function values and the actual historical demands is minimized.
This method is called linear regression. This estimation describes a linear relationship between time \(t\) and demand. Mathematically, it can be written as:
\[\text{Demand for Period t} = a+b*t\]
The coefficient \(a\) is the intercept at \(t=0\). The coefficient \(b\) indicates how the demand changes from period to period and is referred to as slope.
2 - Trend Check
The algorithm uses the \(p\)-value as an indication of the significance of the slope. The \(p\)-value states the probability that the slope parameter is not significant.
A non-significant slope parameter \((p\geq5\%\)) indicates that the demand data have no trend.
3 - Forecast
If the \(p\)-value is less than 5%, the estimation of Step 1 is used to calculate the forecast of Period \(t=11\):
\[\text{Demand Forecast for Period 11} = a+b*11\]
If the \(p\)-value is greater than or equal to 5%, the regression of Step 1 is repeated with a constraint on the slope of \(b=0\).
\[\text{Demand Forecast for Period 11} = c\]
Please answer all questions to continue.
{{ formfield_errors 'questions_aft_explain_answers' }} {% endblock %}