Distribution of test statistic under null and alternative I am currently reading my econometrics notes and there is an example that has really stumped me. The example has an answer with it but I do not understand a few things:

Now what I do not understand is if we take the test statistics, $\tau_n=\sqrt{n}\bar{Z_n}$, how did they come up with the distribution of the test statistics under the null and alternative? 
Does it have something to do with the $\sqrt{n}$? 
I have seen on some examples online that when one multiplies a normal RV by $\sqrt{n}$, then one gets a standard normal random variable...is that right?
If anyone could explain this in laymen's terms I would be GREATLY thankful! 
 A: First, review some basic properties of expectation and variance:


*

*Expectation (in particular, linearity, so $E(\Sigma_i X_i)=\sum_i E(X_i)$ and $E(aX)=aE(X)$)

*Variance (in particular, that $\text{Var}(aX)=a^2\text{Var}(X)$), and

*Variance of a sum of uncorrelated variables so $\text{Var}(\Sigma_i X_i)=\sum_i \text{Var}(X_i)$
(keeping in mind that independent implies uncorrelated)
So that I don't keep taking differences, let $D_i = Y_i-X_i$.
Under $H_0$: 
Once you're clear what region(s) of values of the test statistic are consistent with the alternative (identifying what are the 'extreme' values under the null), it's only the distribution under the null that matters for finding the critical value.
If $D_i\sim N(0,1)$, then $\sum_i D_i\sim N(0,n)$ (variance of a sum of independent r.v.s), and so $\bar{D}\sim N(0,\frac{1}{n})$ ($\text{Var}(aX)=a^2\text{Var}(X)$).
Hence $\sqrt{n}\bar{D}\sim N(0,1)$ (again, $\text{Var}(aX)=a^2\text{Var}(X)$).
Under $H_1$: 
$D_i\sim N(a,1)$, so 
$\sum_i D_i\sim N(na,n)$ (as above plus linearity of expectation*), and so $\bar{D}\sim N(a,\frac{1}{n})$ (ditto).
* though strictly I used it for the $H_0$ case as well, but I imagine that it wasn't presenting a problem for you there.
Hence $\sqrt{n}\bar{D}\sim N(\sqrt{n}a,1)$ (ditto).
