# Can I use the delta method with a function that depends on n to approximate the distribution of a function of the sum of iid random variables?

Let $$X_1, X_2,...$$ be i.i.d. random variables with finite mean $$\mu$$ and finite variance $$\sigma^2$$. From the Central Limit Theorem, we know that $$\sqrt{n}(\bar{X_n}-\mu)$$ tends in distribution to $$N(0,\sigma^2)$$ as $$n\rightarrow\infty$$, where $$\bar{X_n}=\frac{1}{n}\sum_{i=1}^nX_i$$.

I'm interested in the distribution of $$f(X^n)$$, where $$X^n$$ is the sum $$X^n=n\bar{X_n}$$ and $$f$$ is continuous and differentiable. This question is relevant and does this for $$f(x)=\sqrt{x}$$, but I'd like a more general result. Is the following reasoning correct?

We apply the delta method with $$g(x)=f(nx)$$ to see that $$\frac{(f(X^n)-f(n\mu))}{\sqrt{n}f'(n\mu)}$$ converges in distribution to $$N(0,\sigma^2)$$. (Is $$g$$ allowed to depend on $$n$$ like this?)

For sufficiently large $$n$$ then, $$f(X^n)$$ approximately follows a normal distribution $$N(f(n\mu),nf'(n\mu)^2\sigma^2)$$.

On the one hand, I get the same result as the question linked above for $$f(x)=\sqrt{x}$$, which is promising. But something slightly weird happens for $$f(x)=\log(x)$$. Then $$g'(\mu)=\frac{n}{n\mu}=\frac{1}{\mu}$$ and so $$\sqrt{n}(\log(X^n)-\log(n\mu))$$ converges in distribution to $$N(0,\frac{\sigma^2}{\mu^2})$$. But then if I want to look at the approximation of $$\log(X^n)$$ for large $$n$$, I get $$N(\log(n\mu),\frac{\sigma^2}{n\mu^2})$$, which has variance that decreases as $$n$$ increases. That seems weird but I guess it makes sense. It definitely makes sense when $$f$$ is bounded, as $$f(X^n)$$ will just approach that bound and the variance should drop to $$0$$. For $$\log(X^n)$$, the mean is still moving up but the distribution just get more narrowly concentrated around it, since $$\log(X^n)$$ grows so slowly for large $$n$$. (I'm assuming for these examples that the $$X_i$$ are positive.)

My main question is: am I allowed to use the delta method like this?

If so, I'd also be interested to hear if my interpretation of the $$\log(X^n)$$ approximation is correct.

• Yes, this looks correct to me. Interestingly, I also get $\frac{\sigma^2}{n\mu^2}$ as the asymptotic variance for $\text{log}(\bar{X})$. I suppose the best way to double check all of this is through simulation. I'll give it a try... Aug 16 '21 at 23:31
• Thanks. Yeah, it seems surprising at first that $\log(\bar{X_n})$ and $\log(X^n)$ have the same variance, but I guess that actually makes a lot of sense, since $\log(\bar{X_n})=\log(\frac{1}{n}X^n)=\log(X^n)-\log(n)$. Aug 18 '21 at 10:58

Here is a simulation that confirms your suspicions. The variance decreases with increasing $$n$$.

data norm;
do n=20, 50, 100;
do sim=1 to 100000;
do i=1 to n;
x=rand('normal',2,3);
output;
end;
end;
end;
run;

proc means data=norm noprint;
by n sim;
var x;
output out=out sum(x)=sum;
run;

data out;
set out;
log_sum=log(sum);
run;

proc means data=out var;
class n;
var log_sum;
run;

• Thanks. I ran some more simulations to test a few different distributions for $X_i$ and functions $f$, and found approximately the right mean, variance, skew (0) and kurtosis (3) most of the time. The approximation is poor for lognormal $X_i$ unless (presumably) $n$ is larger than I'm patient enough to simulate. But that's not too surprising as it's heavy-tailed. Aug 18 '21 at 11:32