# Can this be considered wide sense stationary?

I was discussing this problem with one of my classmates. The picture shows a recording of the heart rate during before and after sleep.

1. Can the whole process be considered wide sense stationary? (I say yes because the mean is approximately constant, but how can I estimate the autocorrelation?)
2. Can the whole process be considered ergodic in autocorrelation and mean? (I'm not sure at all about this)
• For it to be WSS other measures also need to be constant, such as the variance. The variance of the samples are clearly different between the awake and sleeping intervals. – AnonSubmitter85 Dec 29 '17 at 19:11

for 1, a random process is WSS if its autocovariance and mean ensemble average don't vary as a function of specific time instance, just lag. As mentioned before, it's hard to conclude this from simply one realization of the process about the ensemble average.

However for 2, you can at least estimate what the autocovariance and mean are if the process is ergodic (which, unfortunately, you can't conclude with just a single realization). If the process is indeed ergodic, the ensemble average is equal to the time average in the limit as your interval of average approaches infinity, which is kind of nice with regards to computability.

• Hi: Just to emphasize what Philip M said. If one assumes ergodicity, then one realization is quite enough to do statistical analysis ( so the checked answer should be modified. ) The problem is that testing for ergodicity is complex and requires more than one realization. Therefore, in practice, most people assume ergodicity and then this allows one to test for things like A) stationarity of mean and variance or B) strict stationarity ( i.e: mean and covariance independent of t ) etc. – mark leeds Dec 30 '17 at 7:52
• @markleeds you can convert this to an answer, as it gives a better explanation. – Fat32 Dec 30 '17 at 12:54
• Fat32: I put it as an answer but I don't know how to take it out of the comments. IMHO, Philip M's answer should be checked but whatever happens is fine with me. – mark leeds Dec 31 '17 at 0:38
• Maybe this is a stupid question, buw what is the difference between the ensemble average is equal to the time average ? – XRaycat Dec 31 '17 at 14:44
• Not a stupid question. I think of the ensemble average as the true overall mean of the process and the time average as the mean at at a specific time t. but a more developed answer is below. math.stackexchange.com/questions/1339012/… – mark leeds Dec 31 '17 at 18:41

Re 2.: ergodicity is always just an assumption, a modeling approach. You logically can't test for it, since that would require knowledge about all realizations over all if eternity.

Re 1.: stationarity is a property of a stochastic process, not of one realization. You simply might have had "bad luck" with this realization. But, if you asked me, assuming this realization somehow represents all realizations:

The sample variance of short intervals is definitely time-dependent. If that statement is true, it contradicts wide-sense stationarity. You don't need the autocorrelation to disprove wss.

Because you asked how to calculate the autocorrelation: again, autocorrelation is a property of a process, not of one of its realizations. Ergodicity changes that, but if you want to make a statement about the autocorrelation function of an ergodic process, you'd still need an infinite realization, not just a finite observation.

• Marcus: I'm not familiar with it but this document talks about testing for ergodicity by breaking up the series into smaller series and then using simulation. So, it does seem possible to test for ergodicity without an infinite number of realizations. But don't quote me on that !!!!!! google.com/… – mark leeds Dec 31 '17 at 18:29
• My fault: One can google for "Appendix: Stationarity and ergodicity tests". – mark leeds Dec 31 '17 at 18:35

Hi: Just to emphasize what Philip M said. If one assumes ergodicity, then one realization is quite enough to do statistical analysis ( so the checked answer should be modified. ) The problem is that testing for ergodicity is complex and requires more than one realization. Therefore, in practice, most people assume ergodicity and then this allows one to test for things like A) stationarity of mean and variance or B) strict stationarity ( i.e: mean and covariance independent of t ) etc.

What you presented in your image corresponds to a deterministic signal. Namely, a realization of a stochastic process.

To make any inference about the process being stationary or not, one would need multiple realizations so that some statistical analysis could be performed. I don't think there's much to do with just one of them.

Suppose that you have some random variable $X$ and you want to estimate its mean. If the first experiment throws a value of $x=3$, then you can't say that $\mathbb{E}[X]=3$ - you need more experiments. The same happens with stochastic processes.

• Why does it correspond to a deterministic signal? I thought that a deterministic process is for example when you're given the starting point, you know with 100 % certainty the entire trajectory?. And can i ask how can i see on a signal if it ergodic in autocorrelation and mean ? – XRaycat Dec 29 '17 at 17:26
• But it looks like there are hundreds if not thousands of samples, no? – AnonSubmitter85 Dec 29 '17 at 19:12
• It is not stated how many samples there are. But it seems like there are few hundreds – XRaycat Dec 29 '17 at 19:50