Using asymptotic confidence intervals in practice I would like to know the correct way of using the following result in practice: Let $G_n$ be some function of $n$ i.i.d. samples $X_1,\dots,X_n$, and say we have that
$$
\sqrt{n} (G_n - \theta) \implies N(0, \gamma)
$$
where $\implies$ denotes convergence in distribution. Now we have a $(1-\alpha)$ confidence interval for $\theta$:
$$
\theta \in G_n \pm z_{\alpha} \frac{\gamma}{\sqrt{n}}.
$$
Let's say $\gamma = \text{Cov}(X_1,X_2^2)$, or really any function of the sample whose true value is unkown. My question is, what is the correct way to use this information to build CIs for the quantity of interest $\theta$ in practice?
The straight forward thing to do would be to simply estimate $\gamma$ from the data, and plug it in to the above CI, but is this valid for any function $\gamma$?
 A: $\newcommand{\convp}{\stackrel{\text p}{\to}}$By assumption we have $\sqrt n(G_n - \theta) \implies Y$ for some random variable $Y$. If $\gamma \neq 0$ and we have a consistent estimator $\hat\gamma_n$ of $\gamma$, so $\hat\gamma_n \convp \gamma$, then
$$
\frac{\sqrt n (G_n - \theta)}{\sqrt{\hat\gamma_n}} \implies \frac{Y}{ \sqrt \gamma}
$$
by a combination of the continuous mapping theorem (for $\sqrt {\hat\gamma_n} \convp \sqrt \gamma$) and Slutsky's theorem (for the ratio's limit). In your case this means
$$
\frac{\sqrt n (G_n - \theta)}{\sqrt{\hat\gamma_n}} \implies \mathcal N(0, 1)
$$
so asymptotically $\hat\gamma_n$ can be used in place of $\gamma$.
An example of this is how in the case of $X_i \stackrel{\text{iid}}\sim \mathcal N(\mu, \sigma^2)$ we have
$$
\frac{\sqrt n(\bar X - \mu)}{\hat\sigma} \sim t_{n-1}
$$
but asymptotically we have a Gaussian limiting distribution and we can use $\hat\sigma$ as the standard deviation estimate in our confidence intervals with a Gaussian quantile if our sample is big enough.
