# Estimating non-centrality parameter from some obtained sample of t variates

Suppose I have a sample of 10 $t$ variates which I think has come from a non-central $t-distribution$.

I was wondering how I can estimate the non-centrality parameter $(ncp)$ of the mother non-central t-distribution from which my sample of 10 t variates has come?

Is there a formula for this?

There is no analytical solution to this problem, so you will need to use iterative or approximate methods. That means using either maximum likelihood or method of moments. You can use numerical methods for ML which is default in most software. R uses BFGS via the nlm function.

An example:

set.seed(123)
sim.t <- rt(n=1000, df=10, ncp = 3)
negloglik <- function(parm) -sum(dt(sim.t, parm, parm, log=T))
nlm(negloglik, c(1,1))


gives

 > nlm(negloglik, c(1,1))
$minimum  1672.896$estimate
 10.65885  3.05055

$gradient  2.026531e-06 5.694497e-05$code
 1

\$iterations
 14


The expected value of a non-central $$t$$ with non-centrality $$\delta$$ and d.f. $$\nu$$ is $$E\left[t\right] = \delta \sqrt{\nu/2} \frac{\Gamma\left((\nu-1)/2\right)}{\Gamma\left(\nu/2\right)}.$$ Thus it is trivial to find an unbiased estimator of $$\delta$$: $$\hat{\delta} = t \sqrt{2/\nu} \frac{\Gamma\left(\nu/2\right)}{\Gamma\left((\nu-1)/2\right)}$$ In R:

delta <- 3
nu <- 10
set.seed(123)
sim.t <- rt(n=10000, df=nu, ncp = delta)
delhat <- sim.t * sqrt(2/nu) * gamma(nu/2) / gamma((nu-1)/2)
mean(delhat)

 2.998