3

I've stumbled on an interesting problem that I hope someone can help with. First, declarations: (a) this is not (cruel) homework, but arose in behavioral modeling; (b) I've spent a lot of time searching this forum and found nothing that I can recognize as a solution; and (c) this is my first post, so be forgiving. :)

Let X ~ N(0,1), and let $(X_1, ..., X_n)$ denote a random sample drawn on X of size n (n = 5 in my application). Further, let Y ~ N(0,1), where X and Y are independent.

Problem: find the pdf of

$$Z = Min_i [ Abs(X_i - Y) ]$$

In other words, given a single draw of Y, and five $X_i$ drawings, what is the distribution of the nearest $X_i$ neighbor to Y?

Note that the value y, once generated, is fixed for this set of five differences, so $\{x_1-y, \;x_2-y, ...\}$ are not independent of each other, even though the $X_i$ are independent.

It is easy to simulate this with a Monte Carlo:
(a) Generate a sample of size 5 from N(0,1).
(b) Generate one Y ~ N(0,1) value, say Y = y.
(c) Let absDiffs = $Abs[\{ x_1 - y,\; x_2 - y, \;x_3 - y, \;x_4 - y, \;x_5 - y \}]$.
(d) Find: Min[absDiffs].

Interestingly, I have confirmed that the distribution of the absolute differences in (c) is half-normal, from a normal parent N(0,2), which is the same as one would get if the differences were independent. So, my first thought was that the minimum absolute differences in (d) might just be the 1st order statistic for that half-normal. But that turns out not to be correct because of the dependency.

Any help would be appreciated.

Kirbs
  • 31

1 Answers1

0

I can get an exact answer, but it involves an integral of the error function against Gaussians. In Mathematica:

f[x_] := (1/Sqrt[2 Pi]) Exp[-x^2/2]
F[x_] := (1/2) Erf[x /Sqrt[2]] + 1/2
temp[m_, t_] := 
 2 NIntegrate[
   m (1 - F[y + t] + F[y - t])^(m - 1) (f[y + t] + f[y - t]) f[y], {y,
     0, 5}]
list = {};
m = 5;
area = 0;
length = 2;
step = 1/100;
num = length / step;
For[n = 0, n <= num, n++, 
  {
   newvalue = temp[m, n * step];
   area = area + newvalue * step;
   list = AppendTo[list, {n * step, newvalue}]
   }];
ListPlot[list]

This is coming from the following: Draw a $y$ from $N(0,1)$, then the probability all $m$ choices of $X_i$ are at least $t$ units from $y$ is $1 - (1 - (F[y+t]-F[y-t]))^m$; this is the CDF (we are assuming by symmetry $y >= 0$). If we take the derivative with respect to $t$ we get the density, which is our expression above.

user642796
  • 52,188