---
title: Series HAR Two-Sample t-Tests
url: https://www.emergentmind.com/topics/series-har-two-sample-t-tests
type: topic
---

# Series HAR Two-Sample t-Tests

Searching arXiv for the specified paper to ground the article in the current record.
Series HAR two-sample t-tests are procedures for testing equality of means across two univariate time series when the data may exhibit heteroskedasticity and serial dependence. They are developed for the setting
$$
Y_{jt}=\mu_j+u_{jt}, \quad t=1,\ldots,T_j,\quad j=1,2,
$$
where the two series are independent of each other, while the innovations $u_{jt}$ may be heteroskedastic and serially dependent. The target hypothesis is
$$
H_0:\mu_1=\mu_2,
$$
and the central methodological feature is a heteroskedasticity-and-autocorrelation-robust standardization based on orthonormal basis projections rather than conventional sample-variance formulas. The framework is presented as accommodating structural breaks, treatment-control comparisons, and group-averaged panel data, with a Welch-type $t$ approximation and a series-based HAR wild bootstrap providing finite-sample refinements under long-run variance heterogeneity [2512.11259].

## 1. Formal setting and inferential objective

The formal setup considers two univariate time series,
$$
Y_{jt}=\mu_j+u_{jt}, \quad t=1,\ldots,T_j,\quad j=1,2,
$$
with independent series and potentially heteroskedastic, serially dependent innovations. The inferential objective is the two-sample mean comparison under the null hypothesis
$$
H_0:\mu_1=\mu_2.
$$

Under mild regularity, expressed through a functional CLT, the sample means satisfy
$$
\sqrt{T_j}(\bar Y_j-\mu_j)\Rightarrow N(0,\Omega_j),
$$
where
$$
\Omega_j=\lim \operatorname{Var}(\sqrt{T_j}\bar Y_j)
$$
is the long-run variance of series $j$ [2512.11259].

This formulation places the problem outside the scope of classical iid two-sample $t$ procedures. A plausible implication is that the relevant uncertainty is governed not by one-period innovation variance alone, but by the long-run variance induced by temporal dependence. That distinction motivates the series HAR construction.

## 2. Series-HAR standardization through orthonormal projections

The standardization step uses a mean-zero orthonormal basis on $[0,1]$, denoted $\phi_\ell(x)$ for $\ell=1,\ldots,K$, satisfying
$$
\int_0^1 \phi_\ell(x)\,dx=0,\qquad \int_0^1 \phi_\ell(x)\phi_k(x)\,dx=I\{\ell=k\}.
$$
A convenient choice is the trigonometric system
$$
\phi_{2\ell-1}(x)=\sqrt{2}\cos(2\pi \ell x),\qquad \phi_{2\ell}(x)=\sqrt{2}\sin(2\pi \ell x).
$$

For each series, the demeaned observations are projected onto the basis through
$$
z_{j,\ell}
=
\frac{1}{\sqrt{T_j}}\sum_{t=1}^{T_j}\phi_\ell(t/T_j)(Y_{jt}-\bar Y_j),
$$
and the $\ell$th partial long-run variance estimator is defined as
$$
\hat\Omega_{j,\ell}=[z_{j,\ell}]^2.
$$
The series-HAR long-run variance estimator is then the simple average
$$
\hat\Omega_j=\frac{1}{K_j}\sum_{\ell=1}^{K_j}\hat\Omega_{j,\ell}.
$$

The stated intuition is that each $\phi_\ell$ picks out a frequency-band projection of the series, and averaging over $\ell=1,\ldots,K_j$ mimics a nonparametric fixed-$b$ estimator of the long-run variance that is robust to general heteroskedasticity and autocorrelation [2512.11259]. This suggests that the method achieves robustness through basis-domain aggregation rather than direct blockwise time-domain smoothing.

## 3. Test statistic and Welch-type degrees-of-freedom adjustment

The unequal-long-run-variance statistic is defined by
$$
T_n\equiv t_{HAR}
=
\frac{\bar Y_1-\bar Y_2}{\sqrt{\hat\Omega_1/T_1+\hat\Omega_2/T_2}}.
$$
When $K_j\to\infty$ and $K_j/T_j\to 0$, the statistic satisfies
$$
T_n\Rightarrow N(0,1).
$$
However, finite-sample size distortions may arise under serial dependence.

To address that issue, a Welch-type $t$ approximation is constructed by matching the first two moments of the denominator with a scaled $\chi^2$. Let $\rho=T_2/T_1$. Under $H_0$ and fixed $K_j$,
$$
\hat V=\sqrt{\rho\,\hat\Omega_1+\rho^{-1}\hat\Omega_2}
$$
has mean approximately
$$
\sqrt{\rho\,\Omega_1+\rho^{-1}\Omega_2}
$$
and variance approximately
$$
\rho\,\Omega_1^2/K_1+\rho^{-1}\Omega_2^2/K_2.
$$
Matching to $\chi^2_\nu/\nu$ yields the adjusted degrees of freedom
$$
\hat\nu=
\frac{[\rho^{1/2}\Omega_1+\rho^{-1/2}\Omega_2]^2}
{\rho\,\Omega_1^2/K_1+\rho^{-1}\Omega_2^2/K_2},
$$
with feasible implementation replacing $\Omega_j$ by $\hat\Omega_j$ and $\rho$ by $T_2/T_1$. The resulting rule compares $T_n$ to $t_{\hat\nu}$ critical values [2512.11259].

This correction is explicitly motivated by long-run variance heterogeneity across the two series. In contrast to classical Welch adjustments based on sample variances under independence, the present version is built around HAR long-run variance estimators.

## 4. Series-based HAR wild bootstrap

The series-based HAR wild bootstrap, denoted SHAR-WB, is designed to replicate both heteroskedasticity and serial dependence. Its algorithm proceeds as follows.

First, residuals are computed as
$$
\hat u_{jt}=Y_{jt}-\bar Y_j.
$$
Second, the null is imposed through the common mean
$$
\mu^*=\frac{T_1\bar Y_1+T_2\bar Y_2}{T_1+T_2}.
$$
Third, dependent wild multipliers $\eta_{jt}$ are generated via a second orthonormal basis $\psi_{1,\ell},\psi_{2,\ell}$, $\ell=1,\ldots,K_j^*$, for example
$$
\psi_{1,\ell}(x)=\cos(2\pi\ell x),\qquad \psi_{2,\ell}(x)=\sin(2\pi\ell x).
$$
With iid draws $v_{j,r\ell}\sim(0,1)$ for $r=1,2$, the multipliers are set to
$$
\eta_{jt}
=
\frac{1}{\sqrt{K_j^*}}
\sum_{\ell=1}^{K_j^*}
\big[
\psi_{1,\ell}(t/T_j)v_{j,1\ell}
+
\psi_{2,\ell}(t/T_j)v_{j,2\ell}
\big].
$$
These satisfy
$$
E^*(\eta_{jt})=0,\qquad \operatorname{Var}^*(\eta_{jt})=1,
$$
and
$$
\operatorname{Cov}^*(\eta_{jt},\eta_{js})
=
\frac{1}{K_j^*}\sum_{\ell=1}^{K_j^*}\cos[2\pi\ell(t-s)/T_j],
$$
which mimics a fixed-$b$ Daniell kernel.

Fourth, bootstrap errors and bootstrap data are formed as
$$
u_{jt}^*=\hat u_{jt}\cdot \eta_{jt},\qquad Y_{jt}^*=\mu^*+u_{jt}^*.
$$
Fifth, one recomputes $\bar Y_j^*$, residuals $\hat u_{jt}^*$, series-HAR long-run variances $\hat\Omega_j^*$, and
$$
t_{HAR}^*=\frac{\bar Y_1^*-\bar Y_2^*}{\sqrt{\hat\Omega_1^*/T_1+\hat\Omega_2^*/T_2}}.
$$
Finally, after $B$ repetitions, the $\alpha/2$ and $1-\alpha/2$ quantiles of the bootstrap distribution of $t_{HAR}^*$ are used, and the null is rejected when the original $t_{HAR}$ lies outside those quantiles [2512.11259].

A central feature of SHAR-WB is that it avoids resampling blocks of observations. The paper characterizes this as an extension of traditional wild bootstrap methods to the time-series setting.

## 5. Assumptions and asymptotic properties

The assumptions are organized around basis regularity, weak convergence, higher-order dependence control, and properties of the external wild variables. The basis functions $\phi_\ell(x)$ and $\psi_{r,\ell}(x)$ are assumed to be piecewise-smooth, mean-zero for $\ell\geq 1$, orthonormal, and uniformly bounded. The functional CLT is stated as
$$
\frac{1}{\sqrt{T}}\sum_{t\leq \lfloor rT\rfloor}u_{jt}\Rightarrow \sqrt{\Omega_j}\,W_j(r),\qquad 0\leq r\leq 1.
$$
For each series, fourth-order cumulant summability is imposed:
$$
\sum_h |h|^3|\gamma_j(h)|<\infty,
$$
and
$$
\sum_{h_1,h_2,h_3}\left|\operatorname{cum}(u_{jt},u_{j,t+h_1},u_{j,t+h_2},u_{j,t+h_3})\right|<\infty.
$$
The external wild variables satisfy the previously stated conditional moment and covariance conditions [2512.11259].

Under these assumptions, several asymptotic results are reported. In the equal-long-run-variance case with fixed $K_j$, under $H_0$ and $\Omega_1=\Omega_2$,
$$
t_{0,HAR}
=
\frac{\bar Y_1-\bar Y_2}{s_{p,HAR}\sqrt{1/T_1+1/T_2}}
\Rightarrow t_{K_1+K_2}.
$$
In the unequal-long-run-variance case with $K_j\to\infty$ and $K_j/T_j\to 0$,
$$
t_{HAR}\Rightarrow N(0,1).
$$
For the bootstrap, large-$K$ validity is expressed as
$$
\sup_x\left|P^*(t_{HAR}^*<x)-P(t_{HAR}<x)\right|\to 0
$$
in probability. The Welch-approximation $t_{\hat\nu}$ is stated to have asymptotically correct size to a higher order than the plain normal approximation [2512.11259].

These results separate the equal- and unequal-long-run-variance cases in a way analogous to classical pooled and Welch testing, but with long-run variance playing the role ordinarily occupied by one-sample variance.

## 6. Finite-sample behavior and empirical use

The reported finite-sample evidence is based on Monte Carlo designs with AR(1) errors, $\rho=0,.5,.8$, normal or $\chi^2(1)$ innovations, equal versus unequal $\Omega_j$, and $T_j\in\{30,50,100,\ldots\}$. Within these experiments, classical $t_0$ and Welch $t_1$ massively overreject when $\rho>0$. The series HAR normal test, meaning $t_{HAR}$ with a normal cutoff, improves performance but remains slightly oversized in small samples under strong dependence. The series HAR $t$ approximation using $\hat\nu$ is reported to have much better size control. SHAR-WB delivers the best size control across all settings, including strong dependence and unequal $\Omega_j$, with power only moderately below the infeasible oracle [2512.11259].

Empirical illustrations include WFH productivity and pre/post structural breaks in U.S. macro series. In those examples, classical $t$-tests reject differences that fail to survive the serial-dependence-robust series HAR and bootstrap tests. A plausible implication is that methods ignoring serial dependence can attribute significance to mean differences that are better interpreted as consequences of underestimated uncertainty.

## 7. Scope, implementation, and relation to conventional practice

The framework is described as accommodating a wide range of applications, including structural breaks, treatment-control comparisons, and group-averaged panel data [2512.11259]. In all such settings, the unifying issue is inference on mean differences when serial dependence and heteroskedasticity make classical two-sample variance formulas unreliable.

Implementation is summarized as straightforward in the sense that one specifies two integers, $K_j$ and $K_j^*$. The first controls the number of orthonormal projections entering the series-HAR long-run variance estimator, and the second governs the multiplier construction in SHAR-WB. This suggests a modular architecture: basis-projection standardization for the statistic itself, and basis-driven multiplier dependence for bootstrap calibration.

A common misconception is that robustness to serial dependence in two-sample problems necessarily requires block bootstrap resampling or explicit parametric modeling of the autocovariance structure. The series HAR approach provides a different route: the long-run variance is estimated through orthonormal series projections, and the bootstrap analogue reproduces dependence through dependent wild multipliers rather than blocks. Within the reported evidence, this combination is associated with valid inference under heterogeneity and nonparametric dependence structures, together with superior finite-sample performance for the bootstrap variant [2512.11259].

Source: https://www.emergentmind.com/topics/series-har-two-sample-t-tests