I want to calculate it within a given interval. I want to calculate for three years rolling window, because I am using three years to calculate for one standard deviation point at the same normalizing it so that the value will be between 0 to 100.
Ok. Find the mean of all values.
Subtract that number from your data point. You should have a measurement for each MOMENT IN TIME. Do you understand so far?
Now, take those .new measurements, and square each one. Find the mean of the new squared values. Take that new mean, and find the square root. That is the deviation.
Please is there any code I can use because the data is a large sample size.
Subtract that number from your data point. You should have a measurement for each MOMENT IN TIME. Do you understand so far?
Now, take those .new measurements, and square each one. Find the mean of the new squared values. Take that new mean, and find the square root. That is the deviation.