# Distribution of student $t$ ratio under the wrong mean

Suppose that we have an i.i.d. sample of size $n$: $X_1,\ldots,X_n\sim N(\mu_0,\sigma_0^2)$. Define: $$t_n(\mu)\equiv\frac{\sqrt{n}(\bar{X_n}-\mu)}{s_X}\quad\text{where}\quad\bar{X_n}=\frac{1}{n}\sum_{i=1}^nX_i,\quad s_X^2=\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X}_n)^2.$$ It is well known that $t_n(\mu_0)$ follows a $t$-distribution with $n-1$ degrees of freedom. But what is the distribution of $t_n(\mu)$ for a general $\mu$?

If I understand you question correctly, I believe you are looking for the non-central t distribution. It is used, for example, to find the power of a t test. That is, $P\{Reject H_0 | \mu = \mu_a\}$, where $\mu_a \neq \mu_0$. Almost any math stat book will have a section on it. Wikipedia gives technical info without examples for use.