Created
February 15, 2012 16:18
-
-
Save hexgnu/1837002 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0*x_1 + x_2 + x_3 + ... + x_29 = S_29 | |
- x_1 + x_2 + x_3 + ... + x_28 = S_28 | |
------------------------------------- | |
x_29 - x_1 = S_29 - S_28 | |
x_29 = S_29 - S_28 + x_1 |
Say you have
Feb 6 = 120
Feb 7 = 130
Let's assume the data is somewhat tight (meaning lower stdev).
Feb 7 add would be 130 - 120 + (120 / 28)
120/28 is the average over the last 28 days
14 would be the answer
Why is it higher?
Well remember this is a rolling window and we just increased a bunch
I'll roll your window
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
so given
28_day_total_feb_5 = 120
28_day_total_feb_6 = 100
28_day_total_feb_7 = 100
28_day_total_feb_8 = 30
we can infer that feb 7th 6th and 5ths daily value was 0
that january 8ths daily value was 120
and that january 10ths daily value was 70
I guess I'm struggling to see how to apply this algorithm to that data..