Say we begin with a series
, where
is the sample number, and
is the total number of samples.
![]() |
(3) |
“dat-ts-stats” return the values
and
. Note that these are different from the correct means (
and
) if the time-series were infinitely long. This illustrates the difference between the sample mean and the real mean.
![]() |
(4) |
The standard deviation is the square root of the variance “dat-ts-stats” return the values
and
. Note that these numbers change a little bit each time you recalculate them, because the function rand gives a new sequence of numbers each time.
For this we need to set a number of value bins,say
that covers the rage of expected values of the time series, say
octave, conveniently has the routine hist(u,p)
![]() |
(5) |
Note that the mean and variances can also be estimates s moments of the pdf:
and 
![]() |
(6) |
where
. The time when
goes to zero defines a characteristic time-scale for the time-series
. The degrees of freedom is often estimates as the length of the time series,
, divided by this characteristic time scale. The auto correlation is the co-variance normalized by the variance:
![]() |
(7) |
Note that for a single real series such as
,
is a symmetric function, so that
.
In many cases physical systems behave differently on different time series, and it is important to describe the behavior of the observation in each band of periods, or frequencies.
The Fourier transform and fft Fourier transforms are always implemented with the Fast Fourier Transform algorithm, an efficient method of computing the Fourier coefficients. For an infinitely long continuous series, the Fourier transform is defined as
![]() |
(8) |
Practically time series (
) are made up of a finite number of discrete samples, and the Fourier transform is evaluated as:
![]() |
(9) |
Each value of
represents the complex amplitude of the Fourier transform at the frequency
(in units of radians per second,or
), where
represents the sampling period. The lowest frequency resolved by the period of observations (
)corresponds to one full cycle over time
. The Nyquist frequency, half the sampling frequency of the time series (
), represents the highest frequency that can be unambiguously determined from the observations. This raises the question of the meaning of
). A typical fft routine return an output vector of
complex values when called with a similar length series. The order of frequencies is:
if N is even: WATCH OUT THE FREQUECIES ARE IN CYCLES/TIME, NOT RAD/TIME
![]() |
(10) |
if
is odd:
![]() |
(11) |
Function fftshift will reorganize the complex amplitudes in ascending order, from negative to positive frequencies. For example the real and imaginary parts of fftshift(fft(u)) are illustrated below:
. Imaginary coefficients have been offset by -500 If
is even, the mean value of the time series is in
,visible s the blue peak that extends to
at the middleofthe real spectrum. There are four otherpeaks in each of the other spectra. They are located at
and
, the two frequencies included in the defintions of
.
The inverse transform is:
![]() |
(12) |
It is important to understand that in the above relations, both
and
can be complex series. If the fourier coefficients are known
Filters: If interest is focused on a particular band of frequecies, the fft-ifft sequence can be used to produce a filtered version of the series. The cyan time series illustrated in Fig. 4...
produced by setting several values of
equal to zero before calling ifft(U)The spectrum shows the distribution of the variance as a function of frequency,
. It can be estimated in several ways. One simple way is to define it as the Fourier transform of the auto-correlation function:
and 
![]() |
(13) |
Note that
is also a symmetric function of
.
Windows
Ensemble and band averging