# Exponential Moving Average Function Notation

I'am trying to define an exponential moving average function denoted $$EMA_{\alpha}(x_{n})$$ where $$\alpha$$ is the smoothing coefficient and $$x_{n}$$ is the input signal. My first approach was to use the following notation:

$$EMA_{\alpha}(x_{n}) = y_{n} = \alpha x_{n} + (1 - \alpha)y_{n-1}$$

But i don't know if its correct to use it. I have seen somewhere the following one:

$$EMA_{n}^{\alpha}(x_{n}) = \alpha x_{n} + (1 - \alpha)EMA_{n-1}$$

But i don't know if this one is also appropriate.

• May I ask why the notation is important? Mar 20 '20 at 2:16
• Hi: As the other responder mentioned, It doesn't really matter but, to me, if you take off the $\alpha$ in the superscript on the LHS of the second equation, then it's "more correct" than the first equation because there really isn't a $y_n$ when you're doing exponential smoothing. There's the exponential smoothing estimate and the thing you're smoothing, which, in your case, I think is $x_n$. Mar 20 '20 at 3:37
• Note that there shouldn't be an $(x_{n})$ on the left hand side of the second equation either. Just leave it as $EMA_{n}$. Mar 20 '20 at 3:38

Good Gosh! Why on Earth would you be so complicated as to use that $$EMA_{\alpha}(x_{n})$$ notation? Are you trying to be clever, or maybe sophisticated? You're mixing letters and variables in the same notation. Is $$EMA_{\alpha}(x_{n})$$ supposed to be a word (or maybe a variable), or what? Adding to the confusion is: if subscripting 'n' indicates sample indexing then what the heck is meant by subscripting $$\alpha$$? Don't be clever, ...you'll just confuse your readers. For the sake of your readers I suggest you avoid using that $$EMA_{\alpha}(x_{n})$$ notation altogether.
• Thanks for your answer and recommendation. I understand what you are saying and agree with the subscript problem, i just wanted to use this notation because i have seen it on some articles, and could allow to apply an exponential moving average twice, that is $EMA_{\alpha}(EMA_{\alpha}(x_{n}))$, instead of using a longer formulation such as : $a_{n} = \alpha x_{n} + (1-\alpha)a_{n-1}$ $b_{n} = \alpha a_{n} + (1-\alpha)b_{n-1}$ But i understand that i might have been trying to hard to make things more convenient for me, i will follow your advice. I apologize. Mar 21 '20 at 17:59
• @Wolf. Hi. I was thinking. You might eliminate the word "moving" and use the notation $EA(x_{n},\alpha)$, which you could define to your readers as meaning "an exponential averaging operation performed on the $x_n$ sequence using a smoothing coefficient of $\alpha$". Mar 23 '20 at 3:27