Say, you have a timeseries such as a historical stock price. Is there a single statement that can compute the average "time" that a continuous sequence is over its median? Imagine, this sequence where the 1st 25 days it's over the median, then the next 15 days it's below, then the next 35 days is above. So, the average would be 30.
↧