# Covariance of Order Statistics from N(0,1) Distribution

#### BGM

##### TS Contributor
A mistake in the integration order: When the inner integral limit is $$\int_x^{+\infty}$$, it must be with respect to $$dy$$;
If you integrate with respect to $$dx$$ first, the corresponding inner integral limit should be $$\int_{-\infty}^y$$.

i.e. $$\int_{-\infty}^{+\infty} \int_x^{+\infty} f(x, y) dydx = \int_{-\infty}^{+\infty} \int_{-\infty}^y f(x, y) dxdy$$

Changing the integration order will also change the limits.

Also I am not sure if you can directly claim $$I_{1,1} = 0$$

#### DHB10

##### New Member
Hello, BGM,

I am going to try again as what you instructed. Because I(1,1) is the same as E(XY) when n=2, So, I directly claim I(1,1) = 0 ( it is my thinking)

Thanks a lot
DHB10

#### DHB10

##### New Member
This is page 3 of 4

Last edited:

#### DHB10

##### New Member
This is page 4 of 4

Last edited:

#### DHB10

##### New Member
Hello,

Based on the correct answer to E(R^2) when n =3 ( see the table in my first post), there must be a sqrt(3) created in the final result of E(XY), it seems that there is nowhere to create a sqrt(3) for the result of E(XY). So, I am wondering if the whole approach is correct.

Thanks
DHB10

#### BGM

##### TS Contributor
When you are computing $$I_{1,2}$$, the integration domain should be $$- \infty < x < y < t < +\infty$$

So when you try to change to the polar coordinate, the inner double integral should become the following:

When $$x < 0$$,
$$\int_x^{+\infty} \int_y^{+\infty} f(y, t) dtdy$$ $$= \int_{\frac {\pi} {4}}^{\frac {\pi} {2}}\int_0^{+\infty} f(r\cos\theta, r\sin\theta) rdrd\theta + \int_{\frac {\pi} {2}}^{\frac {5\pi} {4}} \int_0^{\frac {x} {\cos\theta}}f(r\cos\theta, r\sin\theta) rdrd\theta$$

When $$x > 0$$,
$$\int_x^{+\infty} \int_y^{+\infty} f(y, t) dtdy$$ $$= \int_{\frac {\pi} {4}}^{\frac {\pi} {2}}\int_{\frac {x} {\cos\theta}}^{+\infty} f(r\cos\theta, r\sin\theta) rdrd\theta$$

Also whenever you get $$\int_{-\infty}^{+\infty} xf_X(x)dx = E[X]$$, it should be correspond to the original, unordered sample, so in your case it should be 0.

#### DHB10

##### New Member
Hello, BGM,

Yes, your conclusion in the post upstairs is correct, because I checked my integration again, there was a minus sign (-) missing on page 3 of 4 in my previous post. So, the final result E(XY) = 0 , when n=3 according to this approach. Please see the attachment below ( the other pages are totally the same as previously posted) So, I only post the last part this time).

So, if E(XY) = 0, when n=3 , in this case, then the computed E(R^2) is incorrect compared with the one in the Table 2 in my first post for this topic. In fact, the result in the said table is correct except the one E(R^2) when n=4. you can simulate it to verify it.

So, what is the whole logical mistake located for this approach ?

Thanks a lot
DHB10

Last edited:

#### DHB10

##### New Member
Hello,

I have updated the page 3 and 4 in previous post upstairs to add the missing minus sign(-). The outcome is now E(XY) = 0 when n =3 based on this approach accordingly. However, the correct answer should not be E(XY) =0 in this case. So, where is the generally logical mistake located ? or where is the conceptually logical mistake located in this case?

Thanks
DHB10

#### DHB10

##### New Member
Hello,

I attach the orginal page here again for reviewing purpose.

#### DHB10

##### New Member
Hello,

The unknown author said in the page upstairs that: "The moments of the range R can be derived from either the pdf above or from the moments of the minimum and maximum order statistics X(1) and X(n)....."

If we derive E(R^2) directly from the given pdf of the R in the page shown upstairs, the evaulation of the integrals would be extremely very hard . I believe that the author used the moments of X(1) and X(n) to indirectly compute the second moment of R , E(R^2).

This is why I am trying to find out a way to compute the second moment of R, E(R^2). Unfortunately, I get depressed my several trials have been a failure even my final computation is correct using the approach being disscussed , which I guss that there must be a conceptually logical mistake somewhere. To find out a logical mistake is not easy especially for the one who created the logical mistake initially. Please help with this issue.

Thanks a lot
DHB10

Last edited:

#### DHB10

##### New Member
Hello, BGM,

For your post dated on Yesterday 11:07 AM (#35), in my opinion, we don't need to split the integration when computing I(1,2). Please see the following derivation for the reason.

Thanks
DHB10

Last edited:

#### BGM

##### TS Contributor
Of course I know why $$\frac {\pi} {4} < \theta < \frac {5\pi} {4}$$

It is correspond to the inequality $$t > y$$ only

So you missed the inequality $$y > x$$ here.

Please see the depicted image for the reasoning. It is hard for me to describe the picture by word.

#### DHB10

##### New Member
Hello, BGM,

Let me study your graphs and then I am going to reply to your latest post. Many thanks for your patience & help to take care of this thread.

Thanks
DHB10

Last edited:

#### DHB10

##### New Member
Hello, BGM,

Another question, up to now, according to both your conclusion based on the probablity theory and my final computation with your help, when n = 3, E(XY) = 0 in this case. However, in this case, E(XY) should not be equal to zero , but be sqrt(3)/PI. Where is the conceptually logical mistake located in this case ?

Based on my several times computation, by my common sense, this is no place to creat any sqrt(3) from the beginning to the end using this approach.

Thanks a lot.
DHB10

Last edited:

#### BGM

##### TS Contributor
Now given that $$E[X_{(1)}^2] = E[X_{(n)}^2] = 1 + \frac {\sqrt{3}} {2\pi}$$, $$E[R^2] = 2 + \frac {3\sqrt{3}} {\pi}$$ (verified by simulation)

So we expect

$$E[R^2] = E[(X_{(n)} - X_{(1)})^2] = E[X_{(n)}^2 + X_{(1)}^2 - 2X_{(n)}X_{(1)}]$$ $$= E[X_{(n)}^2] + E[X_{(n)}^2] -2E[X_{(n)}X_{(1)}]$$

$$\Rightarrow E[X_{(n)}X_{(1)}] = \frac {1} {2} (E[X_{(n)}^2] + E[X_{(1)}^2] - E[R^2]) = \frac {1} {2} \left(1 + \frac {\sqrt{3}} {2\pi} + 1 + \frac {\sqrt{3}} {2\pi} - 2 -\frac {3\sqrt{3}} {\pi}\right)$$ $$= -\frac {\sqrt{3}} {\pi}$$

This result should be ok as we expect that they are negatively correlated.

So you can check against this number to see if you can get $$-\frac {\sqrt{3}} {\pi}$$

From the previous discussion, at least I think your integration limits is incorrect after changing to polar coordinates. So I have not conclude it is 0 yet.

#### DHB10

##### New Member
Hello, BGM,

Yes, E(R^2) = minus sqrt(3)/PI is the correct result. but it seems that there is no place to create a sqrt(3) in the computation. I am going to check my integration again to see if there is any calculus computation mistake, focusing on the the integration limitation check, especially when changing to polar coordinates.

Thanks a lot.
DHB10 from China, PRC

#### BGM

##### TS Contributor
I think you have get my point as you can draw the picture by yourself.

Maybe I further elaborate my idea:

Consider the $$y-t$$ plane:

When $$x < 0$$, and when $$\frac {\pi} {2} < \theta < \frac {5\pi} {4}$$, we require that $$x < y < 0$$. By changing to polar coordinates
$$y = r\cos\theta$$, we have $$x < r\cos\theta < 0 \Rightarrow 0 < r < \frac {x} {\cos\theta}$$ as $$\cos\theta < 0$$ when $$\frac {\pi} {2} < \theta < \frac {5\pi} {4}$$

As what you have said above, it seems that it cannot help to evaluate the triple integral. Maybe the spherical coordinates can help, but I am not sure. I have not try yet.

#### DHB10

##### New Member
Hello, BGM,

Thanks for your help and your elaborate idea upstairs. I am going to try it. Because I don't think that there is a conceptuallly logical mistake for this approach to compute the E(XY). Even if there is some pure computation mistakes, we can detect it after double checking.

Thanks a lot.
DHB10

#### BGM

##### TS Contributor
I think integrating with respect to $$t$$ first is difficult because you need to deal with the integral like $$t^n e^{-\frac {1} {2}t^2}$$ where $$n$$ is even - which involves the CDF of normal and has no closed form solution for you to continue to integrate. However when $$n$$ is odd you just reduced to a gamma integral. So you may try to change the integration order:

Recall $$-\infty < x < t < y < +\infty$$

$$E[XY] = \frac {6} {(2\pi)^{\frac {3} {2}}} \int_{-\infty}^{+\infty} \int_x^{+\infty} \int_x^y xye^{-\frac {1} {2}(x^2+y^2+t^2)}dtdydx$$

$$= \frac {6} {(2\pi)^{\frac {3} {2}}} \int_{-\infty}^{+\infty} e^{-\frac {t^2}{2}}\int_t^{+\infty} ye^{-\frac {y^2} {2}}\int_{-\infty}^t xe^{-\frac {1} {2} x^2}dxdydt$$

$$= -\frac {6} {(2\pi)^{\frac {3} {2}}} \int_{-\infty}^{+\infty} e^{-\frac {t^2}{2}-\frac {t^2}{2}} \int_t^{+\infty} ye^{-\frac {y^2} {2}} dydt$$

$$= -\frac {6} {(2\pi)^{\frac {3} {2}}} \int_{-\infty}^{+\infty} e^{-\frac {3t^2}{2}} dt$$

$$= -\frac {6} {(2\pi)^{\frac {3} {2}}} \sqrt{\frac {2\pi} {3}}$$

$$= - \frac {\sqrt{3}} {\pi}$$

Previously I am too busy and overlook these stuffs, so actually for $$n = 3$$ case it is pretty straight forward.

#### BGM

##### TS Contributor
Following the similar idea, for $$n = 4$$, let $$X < T < W < Y$$ be the order statistics and $$-\infty < x < t < w < y < +\infty$$ be the support.

The joint pdf is $$\frac {4!} {4\pi^2} e^{-\frac {1} {2} (x^2 + y^2 +t^2 +w^2)}$$

So $$E[XY] = \frac {6} {\pi^2} \int_{-\infty}^{+\infty} \int_t^{+\infty} e^{-\frac {1} {2} (t^2 + w^2)} \int_w^{+\infty} ye^{-\frac {y^2} {2}} \int_{-\infty}^t xe^{-\frac {x^2} {2}} dxdydwdt$$

$$= - \frac {6} {\pi^2} \int_{-\infty}^{+\infty} \int_t^{+\infty} e^{-(t^2 + w^2)} dwdt$$

$$= - \frac {6} {\pi^2} \times \frac {2\pi} {2} \times \frac {1} {2}$$

$$= - \frac {3} {\pi}$$

And this is verified by simulation.

Combining together we have $$E[R^2] = 2 + \frac {6 + 2\sqrt{3}} {\pi}$$ for $$n = 4$$