Finding number of independent samples using autocorrelation I have a pressure signal (y) with 512000 samples and with a sampling frequency 5000 sample/sec. I am trying to find the number of statistically independent samples using autocorrelation. I used

autocorr(y)


I do not know if this is correct or how to get the number of independent samples

I found this question, but there is no valid answer

https://stats.stackexchange.com/questions/149517/autocorrelation-and-statistically-independent-samples 



Thanks
The autocorrelation you obtained shows that the signal becomes decorrelated with itself for specific time delays, which are the zero-crossings of the autocorrelation. The autocorrelation is not zero except at these time instants.

You can also define a threshold $\tau$ and say that, if the autocorrelation is less than $\tau$, then for your purposes the signal is decorrelated for any time shift $\Delta$ for which the autocorrelation is less than $\tau$.

When calculating the autocorrelation in Matlab (or similar), the lag is calculated in number of samples. For example, in your case it seems like the autocorrelation is zero for a lag of 200. Since your sampling interval is $T_s = 1/5000 = 200\,\mu$s, then your signal becomes decorrelated for a shift of 200 samples, or a time shift $\Delta = 200 T_s = 40\,$ms.