# What is the distribution of the difference of two iid noncentral Student t variates

Let $$X_1$$ and $$X_2$$ be iid non-central t random variables.

I'm interested in the question: what is the distribution of $$X_1 - X_2$$?

i.e. what is the distribution of the difference of two iid noncentral Student t variates?

Suppose $$d$$ is an observed estimate for either $$X1$$ or $$X2$$, in R code, the likelihood function for $$d$$ will be:

likelihood = function(x) dt(d*sqrt(N), df, ncp = x*sqrt(N))

where d = an observed estimate of X1 or X2, x = parameter range (-Inf to Inf), N = sample size, and df = N - 1.

P.S. dt(x,df,ncp) is the pdf of a noncentral t distribution with the third argument ncp being the non-centrality parameter.

• For readers who are not intimately familiar with R, it would help greatly to explain that in the command dt(x,df,ncp) the third argument ncp is the non-centrality parameter. Thus it appears your question simply is "what is the distribution of the difference of two iid noncentral Student t variates?" Would that be a fair interpretation? – whuber May 7 '19 at 15:30
• You can adapt the methods from stats.stackexchange.com/questions/152850/… – kjetil b halvorsen May 7 '19 at 18:34
• The edit doesn't make much sense. Rather than trying to communicate using unfamiliar technical terms, consider asking a question in your own (clear) language so that we can understand what you really need. – whuber May 7 '19 at 19:05
• "Standard Error of the likelihood function" is a phrase that does not make sense. – kjetil b halvorsen May 7 '19 at 19:07

Looks like I am a little late. Anyway, as per Owen (D.B. Owen, “A Survey of Properties and Applications of the Noncentral t distribution”, Technometrics 10 (1968) 445-478), if x is noncentral t distributed and $$\nu > 2$$, then $$var[x] = \frac{\nu}{\nu-2}+\delta^2[\frac{\nu}{\nu-2}-\frac{\nu}{2}\frac{\Gamma^2((\nu-1)/2)}{\Gamma^2(\nu/2)}]$$ where $$\nu = df$$ and $$\delta = NCT$$ is the noncentrality parameter. Using $$\nu = 10$$ and $$\delta = 5$$, var[x] = 3.1386 so the variance of the difference of two of these is 6.2773. I generated $$10^7$$ of these differences and binned them into a histogram, shown below. The variance of the $$10^7$$ differences was 6.2779. Unfortunately, I have no idea what function the histogram approximates. Since you use R and don't need an exact solution, you may find the distr package for R useful, at least for exploring.

For fixed degrees of freedom and non-centrality parameter you can start exploring with code like:

library(distr)

d1 <- Td(df=10, ncp=5)
d2 <- Td(df=10, ncp=5)

plot(d1)

dd <- d1 - d2
plot(dd)


I am not sure how to incorporate the non-centrality depending on x.

• The intent appears to be to estimate the non-centrality parameter using MLE. For that purpose, if approximations are used they had better be relatively very accurate. Exploration is nice for getting some understanding of the function, but it doesn't seem likely to lead to effective or efficient solutions to that underlying problem. – whuber May 7 '19 at 17:25
• @whuber, that is exactly right. While a slight bias in the case of small N is fine, an accurate distribution of the difference of two iid noncentral Student t variates is needed. – Reza May 7 '19 at 17:33
• Wait, ncp = x*sqrt(N) and df = N -1, so my ultimate interest is to be able to get the Standard Error of dd in your code? – Reza May 7 '19 at 17:38
• If your goal is to find the standard deviation of the difference of 2 RVs, you do not need to find the pdf of the difference (which can be difficult to do), in order to find the variance (or sd) of the difference. – wolfies May 7 '19 at 17:51
• @wolfies, do you have a solution in this case? – Reza May 7 '19 at 17:59