<a href="https://colab.research.google.com/github/YenLinWu/Time_Series_Model/blob/main/Materials/Box_Cox_Transformation.ipynb" target="_parent"></a>

# Box-Cox Transformation  

Normality is an important assumption for many statistical techniques. <font color="#dddd00">A</font> <font color="#00dd00">**Box-Cox transformation**</font> <font color="#dddd00">is a transformation of non-normal dependent variables into a normal shape</font>, which depends on the parameter $\lambda$ and is defined as follow : 

\begin{equation}
w_t=
\begin{cases}
      \displaystyle \ln(y_t) \text{ if } \lambda=0 \text{ , } \\
      \displaystyle \frac{(y_t^\lambda-1)}{\lambda} \text{ otherwise.}
\end{cases}
\end{equation}

* For all $\lambda \neq 1$, the time series will change shape.

* If $\lambda=0$, natural logarithms are used.  

* If $\lambda=1$, then $w_t=y_t-1$, so the transformed data is shifted downwards but there is no change in the shape of the time series.   

* Having chosen a transformation, we need to forecast the transformed data. <font color="#dddd00">Then, we need to reverse the transformation (or back-transform) to obtain forecasts on the original scale.</font>

* Features of power transformations  
  * <font color="#dddd00">Often no transformation is needed.</font>
  * The forecasting results are relatively insensitive(感覺遲鈍的) to the value of $\lambda$.  
  * <font color="#dddd00">Transformations sometimes make little difference to the forecasts but **have a large effect on prediction intervals**.</font>  

Reference : [Mathematical transformations](https://otexts.com/fpp2/transformations.html#mathematical-transformations)



c258138925409a2b80ffc2ba62845d89af9b1e2f
ipynb
Jupyter Notebook
Materials/Box_Cox_Transformation.ipynb
YenLinWu/Time_Series_Model
c8bbbc2e5121be4f646b29742ebd525683ab90ff
MIT
Materials/Box_Cox_Transformation.ipynb
YenLinWu/Time_Series_Model
c8bbbc2e5121be4f646b29742ebd525683ab90ff
MIT
Materials/Box_Cox_Transformation.ipynb
YenLinWu/Time_Series_Model
c8bbbc2e5121be4f646b29742ebd525683ab90ff
MIT
Qwen/Qwen-72B
1. YES
2. YES