6

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.

Reza
  • 876
  • 7
  • 10
  • 1
    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 07 '19 at 15:30
  • You can adapt the methods from https://stats.stackexchange.com/questions/152850/difference-of-two-i-i-d-lognormal-random-variables/176374#176374 – kjetil b halvorsen May 07 '19 at 18:34
  • 2
    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 07 '19 at 19:05
  • 1
    "Standard Error of the likelihood function" is a phrase that does not make sense. – kjetil b halvorsen May 07 '19 at 19:07

2 Answers2

2

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. Diffs of NCTs histogram

Ed V
  • 356
  • 1
  • 4
  • 8
0

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.

Greg Snow
  • 46,563
  • 2
  • 90
  • 159
  • 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 07 '19 at 17:25
  • 1
    @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 07 '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 07 '19 at 17:38
  • 1
    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 07 '19 at 17:51
  • @wolfies, do you have a solution in this case? – Reza May 07 '19 at 17:59
  • @wolfies, the OP is looking for the Standard Error of the difference ($X1 -X2$). If you have a general solution or strategy please share it. – rnorouzian May 09 '19 at 17:10
  • @morouzian For independent random variables, $$\text{Var}(X_1 - X_2) = \text{Var}(X_1) + \text{Var}(X_2) = 2 \text{Var}(X_1)$$ ... since they are iid. The standard error or standard deviation is just the square root of that. And the variance of a noncentral t is known and given on the wiki page. – wolfies May 09 '19 at 17:51