# Standard Error Bands

This study calculates and displays Standard Error bands for the data specified by the Input Data Input. This study is similar in appearance to Bollinger Bands, however they are calculated and interpreted differently. Where Bollinger Bands are plotted at a multiple of Standard Deviation levels above and below a Simple Moving Average, Standard Error Bands are plotted at a multiple of Standard Error levels above and below a Linear Regression Moving Average.

Let $$X$$ be a random variable denoting the Input Data, and let $$X_t$$ be the value of the Input Data at Index $$t$$. Let the Inputes Length and Standard Deviations be denoted as $$n$$ and $$v$$, respectively. The Standard Error for the given Inputs at Index $$t$$ is denoted as $$SE_t(X,n)$$, and we calculate it for $$t \geq n - 1$$ as follows.

$$\displaystyle{SE_t(X,n) = \sqrt{\frac{\sum_{k = 0}^{n - 1}\left(X_{k + t - n + 1} - SMA_t(X,n)\right)^2 - \left(\sum_{k = 0}^{n - 1}\left(k - \frac{n - 1}{2}\right)\left(X_{k + t - n + 1} - SMA_t(X,n)\right)\right)^2}{(n - 2)\sum_{k = 0}^{n - 1}\left(k - \frac{n - 1}{2}\right)^2}}}$$

There are three Standard Error Bands. The middle band is just the Linear Regression Indicator $$LRMA_t(X,n)$$. The Top and Bottom Bands for the given Inputs at Index $$t$$ are denoted as $$TB^{(SE)}_t(X,n)$$ and $$BB^{(SE)}_t(X,n)$$, respectively, and we compute them for $$t \geq n - 1$$ as follows.

$$TB^{(SE)}_t(X,n) = LRMA_t(X,n) + v\cdot SE_t(X,n)$$
$$BB^{(SE)}_t(X,n) = LRMA_t(X,n) - v\cdot SE_t(X,n)$$