Jump to content

Talk:Moving average/Archives/2021

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


Changes made by other editors do not make mathematical sense.

The following changes were made to the moving average formula by user 218.214.175.194:

This is not accurate. If you take a set of values and try to compute the 'traditional' average, and then use those same values to compute the moving average using this formula, you will get two different values.

Furthermore, please explain what is meant by "Current notation used in this section is ambiguous (overloaded variable "n) and should be changed.".

The following changes were made by user Balam Shreshta:

This is also inaccurate: the moving average of all values in a dataset obtained by using this formula will not equal the 'traditional' average of those same values.

Please check the validity of the math before making any changes.

Thank you.—AbhimanyuVS (talk) 18:31, 14 February 2021 (UTC)

AbhimanyuVS The formula you gave is for the "Cumulative Moving Average" not the "Simple Moving Average". The simple moving average isn't the same as the average of all the data points in a series, it's the average of, for example, the last 5 data points in the series (for a SMA with a period of 5). So for the series {1,2,3,4,5,6,7,8,9,10}: SMA5_1 = (1+2+3+4+5)/5, SMA5_2 = (2+3+4+5+6)/5, SMA5_3 = (3+4+5+6+7)/5, etcetera.
In your formula you are using the variable "n" for both the total number of data points in the series and for the period of the moving average, this is what I meant when I said the notation is ambiguous. The previous notation used (https://en.wikipedia.org/w/index.php?title=Moving_average&oldid=997624265) was correct, as it used different variables for the total number of data points in the series (M) and the period of the moving average (n). However I agree with you that part of this section could be rewritten to make it easier to understand.
218.214.175.194 (talk) 05:25, 15 February 2021 (UTC)
218.214.175.194, thank you for this clarification. I now see what was happening. The terminology in this page has undergone several changes in the past few months. This section could benefit from a complete revision.
Please feel free to make the necessary changes. Or, if you would prefer, I can revise this section. Let me know how you would like to proceed.
Thank you.—AbhimanyuVS (talk) 05:41, 15 February 2021 (UTC)
User:FeLUX42, thank you for your revision of this page. I had been meaning to make a similar revision, but my IRL workload has been keeping me too busy. In any case, I think your revision is exactly what this page needed.
Thank you.—AbhimanyuVS (talk) 18:34, 16 March 2021 (UTC)