WOLFRAM|DEMONSTRATIONS PROJECT

Rank Transform in Harmonic Regression Time Series

​
error,
ξ
t
normal
exponential
Cauchy
scale, σ
3.
frequency, ω
0.25
random seed
2142
Let
z
t
=sin(2πωt)+
e
t
,
t=1,…,n
, where
ω
is the frequency and
e
t
is a mean-zero error term with variance
2
σ
. The rank is
r
t
=1+
∑
s≠t
ℐ(
z
t
>
z
s
)
. The expected rank is given by
{
r
t
}=1+
∑
s≠t
F(sin(2πωt)-A)
where
A=sin(2πωs)
. In this Demonstration,
n=100
. In the top panel, the dots show the simulated values
z
t
when the normal distribution is used with
ω=0.1
and
σ=1
. The bottom panel shows the average empirical rank (points) based on 1000 simulations and expected rank (curve). The bottom panel demonstrates that the frequency in the original data can be determined using the ranks, provided that enough data is available.