0

$\textbf{This is a self-study problem that I am interested in knowing the correct answer.}$ $\textbf{However I do not trust my computations and I need help.}$

$Y$ is Uniform(0, 2); $Z$ is Uniform(1, 3); $C$ is $\min(Y,Z)$ and $D$ is $\max(Y,Z).$ Correlation between $C$ and $D?$

I start with the cdf of the min that $$P(C > c) = 1 - F_C(c) = P(Y > c, Z > c)= \begin{cases} \left( \frac{2 - c}{2}\right), & 0 \le c \le 1 \\\\ \left( \frac{2 - c}{2}\right) \left(\frac{3-c}{2}\right), & \ 1 \le c < 2 \end{cases} $$ I then use the 1 minus cdf formula to find the expectation and variance of the min: $C$, $$E(C)= \int_0^1 (2-c)/2 \ du + \int_1^2 ((2-c)(3-c)/4)\ du = (3/4) + (5/24)= 23/24$$ $$E(C^2) = \int_0^1 2u (2-c)/(2)\ du + \int_1^2 2u((2-c)(3-c)/(4)\ du = 2/3 + (13/24) = 29/24$$

$$Var(C) = E(C^2) - (E(C))^2 = (29/24) - (23/24)^2 = 167/576$$

Next, I find the expectation and variance of max: $D$, using the the trick that $C + D = Y + Z$, so that the expectation is $$E(D)= E(Y) + E(Z)-E(C) = 1 + 2 - (23/24) = 49/24$$ (NOTE: Y and Z are uniform each with mean 1 and 2 resp.) $$ Var(D) = Var((Y + Z)-C)= Var(Y + Z) - Var(C) = 2(1/6) - (167/576) = 25/576$$ (NOTE: Y and Z are uniform each with variance 1/6).

The covariance: $$ Cov(C,D) =E(YZ) -E(C) E (D) = E(Y) E (Z) - E(C)E(D)= 2- (23/24)\cdot (49/24) = (25/576)$$

The Correlation: $$Cov(C,D)/(\sigma_C \cdot \sigma_D) = (25/576)/(0.53845*0.20833)= 0.38691$$

Thanks in advance!

holala
  • 137
  • 1
    You still have at least two typos and at least one error. In the last equation you have 22/576 as the covariance of $C$ and $D$ but earlier you have the value 25/576. For $\sigma_C$ you have 0.5427 but the square root of 167/576 is approximately 0.538452. And finally the variance of $D$ is incorrectly determined. The variance of $D$ turns out to be the same as the variance of $C$. – JimB Feb 06 '23 at 00:07
  • Simulation suggests $25/576 \approx 0.0434$ looks reasonable for the covariance but $0.36010$ looks too high for the correlation so you might want to check the standard deviations. They should be equal and $0.5427$ looks better than $0.19543$ though simulation suggests something slightly smaller. If you accept @JimB's points then a correlation of $\frac{25}{167} \approx 0.1497$ matches simulation – Henry Feb 06 '23 at 00:16
  • I appreciate all your comments. I couldn't see my own typos and mistakes. – holala Feb 06 '23 at 00:32
  • @Henry I would've loved to see your simulations :) – holala Feb 06 '23 at 00:36
  • @JimB Is the variance of $C$ correct? What formula would I use to show that variance of $C$ and $D$ are the same? I know what is destructing me is how to correctly compute the variances for $C$ and $D$, which JimB says they must be equal. – holala Feb 06 '23 at 00:41
  • Your statement $Var((Y + Z)-C)= Var(Y + Z) - Var(C)$ is incorrect. What would be correct, though perhaps not useful, is $Var((Y + Z)-C)= Var(Y + Z) + Var(C) -2 Cov((Y+Z),C)$$ – Henry Feb 06 '23 at 01:02

1 Answers1

1

JimB's comment had the essential corrections

  • the covariance is $\frac{25}{576}$
  • the variances of $C$ and $D$ are the same by the symmetry in the question and each $\frac{167}{576}$

so you should have had a correlation of $$\dfrac{25/576}{\sqrt{167/576}\sqrt{167/576}} = \dfrac{25}{167} \approx 0.1497$$

You asked to see a simulation. In R, these can all be confirmed up to the noise inherent in simulation

set.seed(2023)
cases <- 10^7
Z <- runif(cases, 1, 3)
Y <- runif(cases, 0, 2)
C <- ifelse(Y < Z, Y, Z)
D <- ifelse(Y < Z, Z, Y)

cov(C,D) # should be about 25/576 0.0434

0.04321887

sd(C) # should be about sqrt(167/576) 0.5385

0.5383821

sd(D) # should be about sqrt(167/576) 0.5385

0.5382243

cor(C,D) # should be about 25/167 0.1497

0.1491487

Henry
  • 39,459
  • What is "Symmetry" in the question and how do I even know that the question is symmetric or not? So can I always make the generalization that the variances of min and max are equal once there is the presence of symmetry? If I guess: does the symmetry means the equalness of the variances for the random variables? – holala Feb 06 '23 at 01:19
  • 1
    @holala The symmetry is about $1.5$. Subtract that from everything (location shifts do not affect variance or correlation) and you would have $Y'\sim\text{Uniform}(-1.5, 0.5)$; $Z'\sim\text{Uniform}(-0.5, 1.5)$; $C'=\min(Y,Z)$ and $D'=\max(Y,Z)$ which should make the symmetry, now about $0$, more obvious. Here the distribution of $Y'$ is the reflection of the distribution of $Z'$ and so the distribution of $C'$ is the reflection of the distribution of $D'$, meaning the variances of $C'$ and $D'$ are equal to each other and to those of $C$ and $D$. – Henry Feb 06 '23 at 01:28
  • Is the 1.5 a guess or it is systematically obtained? – holala Feb 06 '23 at 01:31
  • 1
    It is halfway between $0$ and $3$ and halfway between $2$ and $1$ in the original distributions, so it can be obtained by observation. If for example the original uniform distributions had been $U[0,3]$ and $U[2,4]$ you would not have had symmetry and instead would have to find $E[D^2]-(E[D])^2$ separately – Henry Feb 06 '23 at 08:58