May 23, 2016 / by James Balamuta / In computing /

### Process to Haar Wavelet Variance Formulae

The following equations are derivations used within the package as they relate to the Haar Wavelet Variance (WV) theoretical quantities. The initial WV formula, , are used to calculate process to wavelet variance. The later are used within the asymptotic model selection calculations.

The initial equations, marked by , come from *Allan variance of time series models for measurement data* by Nien Fan Zhang published in Metrologia and *Analysis and Modeling of Inertial Sensors Using Allan Variance* by El-Sheimy, et. al. in IEEE Transactions on Instrumentation and Measurement. That is, these equations are derived using the Allan Variance (AV). The relationship between the Allan Variance to the Wavelet Variance is . Note, the $n$ used in the Allan Variance is equivalent to .

The derivations below were done using Mathematica. The derivation file is available at: http://smac-group.com/assets/supporting_docs/haar_analytical_derivatives_complete.nb

If you notice one of the derivations as being incorrected, please let us know via an issue at https://github.com/smac-group/gmwm/issues.

## White Noise

## Random Walk

## Drift Process

## Quantization Noise (QN)

## AR 1 Process

**Derivatives w.r.t. $\phi$**

**Derivatives w.r.t. $\sigma ^2$**

**Derivative w.r.t both $\sigma ^2$ and $\phi$**

Here we opted to take the derivative w.r.t to $\sigma^2$ first and then $\phi$. The order of derivatives do not matter due to Clairaut’s Theorem.

## MA 1 Process

*>* **NOTE** For the MA(1) process listed in Zhang on Page 552, there is a sign error between equations (21) and (22). This has been corrected here.

**Derivatives w.r.t $\theta$**

**Derivatives w.r.t. $\sigma ^2$**

**Derivative w.r.t both $\sigma ^2$ and $\theta$**

## ARMA(1,1)

*>* **NOTE** For the ARMA(1,1) process listed in Zhang on Page 553, he references Time Series Analysis:
Forecasting and Control by Box G E P and Jenkins G M 1976 that contains an error when describing both the process variance and autocorrelation function (ACF).

In this case, the ARMA(1,1) process variance, $\gamma \left( 0 \right)$, and first autocovariance,$\gamma \left( 1 \right)$, is given by:

[\begin{aligned}
Var\left( {X\left( t \right)} \right) &= \gamma \left( 0 \right)

&= {\sigma ^2}\frac{ {\left( {1 + 2\theta \phi + {\theta ^2} } \right)} }{ {\left( {1 - {\phi ^2} } \right)} }

\gamma \left( 1 \right) &= {\sigma ^2}\frac{ {\left( {1 + \theta \phi } \right)\left( {\phi + \theta } \right)} }{ {\left( {1 - {\phi ^2} } \right)} }
\end{aligned} ]

And the ARMA(1,1)’s autocorrelation function (ACF) is given by:

[\begin{aligned}
\rho \left( 1 \right) &= \frac{ {\gamma \left( 1 \right)} }{ {\gamma \left( 0 \right)} }

& = \frac{ {\left( {\phi + \theta } \right)\left( {1 + \phi \theta } \right)} }{ {1 + 2\phi \theta + {\theta ^2} } }

\rho \left( k \right) &= {\phi ^{k - 1} }\rho \left( 1 \right)
\end{aligned} ]

for $k \ge 1$.

With this in mind, we rederive the Allan Variance for an ARMA(1,1) using Equation 11 on page 551.

### ARMA(1,1) Derivation

We begin by stating Equation 11 on page 551:

**Aside:** To continue, we need to solve the series formulation using the recursive properties of ARMA(1,1)’s ACF.

**Returning:** We substitute in to the first equation to obtain the Allan Variance for the ARMA(1,1) process.

### ARMA(1,1) Process

**Derivative w.r.t $\phi$**:

**Derivative w.r.t $\theta$:**

**Derivative w.r.t. $\sigma^2$:**

**Derivative w.r.t. $\phi$ and $\sigma^2$:**

**Derivative w.r.t. $\theta$ and $\sigma^2$:**

**Derivative w.r.t. $\theta$ and $\phi$:**