I am trying to calculate the standard deviation and mean over a few days (user inputs how many days he/she wants to use to calculate the standard deviation/mean).
The window_stdev and windown_median calculates the standard deviation/mean per day; it, then, calculates the stddev or mean.
That is not what I want. For the past two days, I want to use all the data to calculate the stddev and mean.
For example,
day 1: 0.81, 1, 0.67, 0.01, 7
day2: 5, 0.04, 5, 0.7, 0.9
Day 1 standard of deviation: 2.88
Day 2 standard of deviation: 2.46
using window_stdev (stdev (resultvalue), 1, 0) = 0.294
standard deviation of all values: 2.53
Is there a way to obtain 2.53?
17 answers