Answer the question
In order to leave comments, you need to log in
How to develop and prove the correctness of the simple moving average algorithm?
How to implement it? Help me !
/////////////////////////////////////////////////// //////////
Moving Averages
Develop and prove the correct operation of the Simple Moving Average (SMA) algorithm.
Requirements:
1. Input data comes in one value.
2. The size of the window is set by the user.
3. Graphs of values before and after processing build in any available way.
4. The number of initial values is at least 25.
5. Input methods: download from the Internet.
/////////////////////////////////////////////////// ////////////////////////
I found one formula, but I don't understand how to build a graph using this formula.
https://en.wikipedia.org/wiki/%D0%A1%D0%BA%D0%BE%D...
What input data?
What will be the schedule before and after?
How to make an input from the Internet?
etc. please explain !
Answer the question
In order to leave comments, you need to log in
The moving average is simply the arithmetic average of the last n values. Those. you have a queue of size n, you gradually add a value to it, removing the oldest one, then recalculate the average. To prove this, you need to compare your schedule with a known correct one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question