Here’s a concise overview of long‑range correlations (LRC) in symbolic sequences—what they are, how you detect them, and where they show up.
1. What Are Long‑Range Correlations?
Given a sequence of symbols (S = (s_1, s_2, \dots, s_N)) drawn from an alphabet (\mathcal{A}), a long‑range correlation means that symbol occurrences remain statistically dependent even for large separations (ℓ). In particular, the two‑point correlation function decays as a power law rather than exponentially:
Long‑range:
(C(ℓ)\sim ℓ^{-\gamma}), with (0<\gamma<1)
Here
[
C(ℓ);=;\langle x_i,x_{i+ℓ}\rangle;-;\langle x\rangle^2
]
where (x_i) is some numeric encoding of (s_i) (or an indicator for a particular symbol).
2. Encoding a Symbolic Sequence
Indicator mapping for each symbol (a\in\mathcal{A}):
[
x_i^{(a)}=\begin{cases}1,&s_i=a\0,&s_i\neq a\end{cases}
]
Scalar mapping (e.g. ASCII codes, or +1/–1 for a binary alphabet).
Once mapped, you compute
[
C^{(a)}(ℓ)=\frac1{N-ℓ}\sum_{i=1}^{N-ℓ}x_i^{(a)},x_{i+ℓ}^{(a)} ;-; \bigl\langle x^{(a)}\bigr\rangle^2.
]
Fit: on a log–log plot, estimate the exponent ((\gamma,\beta,\alpha,\mu)).
Test: compare against surrogate data (shuffled sequence) to rule out spurious effects.
Example (Python‑style pseudocode)
python
def indicator_corr(seq, symbol, max_lag):
N = len(seq)
x = [1 if ch==symbol else 0 for ch in seq]
C = []
mean_x = sum(x)/N
for ℓ in range(1, max_lag+1):
num = sum(x[i]*x[i+ℓ] for i in range(N-ℓ))
C.append(num/(N-ℓ) - mean_x**2)
return C
# Then plot C vs. lag on log–log and fit slope = -γ
Feel free to let me know if you’d like details on any specific method (DFA, mutual information), code snippets, or real‑world data examples!