How to determine if a given signal is time-correlated? I am trying to determine if a given noise from a compass sensor is time-correlated (it is supposed to be!) and for that I tried to compute the cross correlation between the noise signal and the time of sampling using Matlab xcorr() function. However, I am getting a random value indicating that it is not time-correlated, whereas in reality it has to be that way. 
Am I doing something wrong? I am not able to find references to determine if a signal is time-correlated, so any ideas would be greatly appreciated!
Thanks!
Imelza
 A: Despite the fact that there were a lot of discussion on the relative topics (though no any answer provided), I would like to add some ideas from my own teaching and model-building experience. It would be also very useful for you to study/read any (good) textbook in econometrics or time-series analysis first (just to speak the same language). 
Sidenote: it would be also great to switch from master-of-all-trades matlab to either $R$ or gretl, both open-source products that are just great to do time-series (regarding $R$ then not only) things.

As it follows from your description of the problem, you have a time-series process, denote it by $y(t)$, that could be very noisy (low signal/noise ratio, with high noisy part) for a researcher to see any good time-dependence by simply screening the data (though a plot of a typical sensor's output would be very appreciated to improve this answer). Note, that time is already present in the definition of the object. From here on you have a number of options of what to do next:


*

*You may go solo , first of all, trying to decompose the time-series object into trend + cycle + seasonal part (for magnetic fields both cycle and seasonal parts are very likely to present) + noise. At this stage it could happen that you do have something there close to white noise sequence. Note also that your trend could be either deterministic (fully predictable) or stochastic. The form of the trend could be tested by a number of unit-root tests. Plotting the data again could be useful to detect the deterministic behaviour.

*Alternatively you may be interested in Box-Jenkins approach and try to build best parsimonious (S)ARIMA model for $y(t)$. As a side-step in this approach is the analysis of correlogram (acf and pacf plots), anyway it is a good thing to begin from plotting this one as a first thing you do with your time series object.

*You may also find useful to move from time to frequency domain: produce periodogram, search for deterministic sinusoidal behaviour or trends (again if the latter is flat you are probably indeed dealing with white noise process)

*You may search for meaningful covariates like average temperature, solar activity, earthquakes, etc. In this case you could build the theory based regression model as opposed to a-theoretical decomposition and (S)ARIMA models.


Concluding remark: as you may see from the response time-dependence could be far more complicated than just a linear time trend. There is no short answer to your question (well the shortest could be: produce a correlogram, apply Ljung-Box test, if it is close to white noise characteristics, conclude that there is no time-dependence, else some kind of it IS present, but are you happy with that one?). Good luck.
A: When thinking about time correlation, a spectrum is a natural complement. Thus, statistical tests for white noise based on spectral analysis and/or autocorrelation function are on the list. We have recently published a paper and an R package hwwntest with wavelet-based spectral tests that do not require any lags or other tuning parameters.
A: Following DC's excellent summary of available approaches let me add:
The question "if a given noise from a compass sensor is time-correlated " raises suggestions as how to analyse it in order to make a conclusion. In the absence of user-specified possible support/explanatory series one is left with approaches that entertain Deterministic Structure , ARIMA Structure and hybrids. When faced with an unknown underlying frequency we often scan for hidden stochastic seasonalities by a search process. In the absence of user-specified suggestions like these readings are taken every 24 hours. One must reach out and via trial and error to deduce the strong (if any) hidden periodicity. Outliers , Pulses, Level Shifts m Local Time Trends can also play havoc with system identification. We use very aggressive model identification strategies ( no neural nets here ) to extract the signal be it stocahastic or deterministic or both.
