Let $$(X,Y)\sim N\left(\begin{pmatrix}0\\0\end{pmatrix},\begin{pmatrix}1&\rho\\\rho&1\end{pmatrix}\right)$$ and let we are observing $(|X_1|,|Y_1|),\dots,(|X_n|,|Y_n|)$ independently. I wish to estimate $\rho$ given this observation. Is it possible? I worry I can't because what we observe are the absolute value.
-
2$\begingroup$ Given additional information (such as a prior distribution for $\rho$ or a restriction of the sign of $\rho$) estimation would be possible, but otherwise $\rho$ is not identifiable because (since $\pm (X,-Y)\sim N\left(\pmatrix{0\\0},\pmatrix{1&-\rho\\-\rho&1}\right)$) the likelihood for $-\rho$ is exactly the likelihood for $\rho$. What sort of information do you have of this nature? $\endgroup$– whuber ♦Oct 5, 2014 at 16:33
-
$\begingroup$ You could, however, estimate $|\rho|$ - while it's not what you asked for, it might serve for some purposes. $\endgroup$– Glen_bOct 6, 2014 at 0:01
-
$\begingroup$ @Glen_b: OK Thanks. So, if I assume $\rho>0$ or negative then I can. Is it like estimation $\rho$ on usual normal distribution? $\endgroup$– JlamprongOct 6, 2014 at 5:30
-
$\begingroup$ @whuber: Thank a lot for your helps. I think, I can assume $\rho>0$. $\endgroup$– JlamprongOct 6, 2014 at 5:31
-
1$\begingroup$ No, it's not the same; I'll see if I can construct an answer. $\endgroup$– Glen_bOct 6, 2014 at 7:10
2 Answers
Because taking the absolute values is an area-preserving transformation of the plane that maps four quadrants onto one, the likelihood of $\rho$ for data $(x,y)$ is the sum of the likelihoods under a Normal$\left((0,0), \pmatrix{1&\rho\\\rho&1}\right)$ distribution of the four data values $(\pm x, \pm y)$:
$$\lambda(\rho;x,y)=\frac{1}{2 \pi \sqrt{1-\rho ^2}} \left(2\exp\left(\frac{x^2-2 \rho x y+y^2}{2 \left(\rho ^2-1\right)}\right) + 2\exp\left(\frac{x^2+2 \rho x y+y^2}{2 \left(\rho ^2-1\right)}\right)\right).$$
The maximum likelihood estimator works well for extreme values of $\rho$ but is highly uncertain for small to moderate values, as attested by these simulations (of $1000$ iterations of a sample of $100$ values). Even visually the plot of $100$ points with $\rho=1/4$ is not readily distinguishable from the plot with $\rho=2/3$:
Each row depicts the situation with a different value of $\rho$. The vertical lines in the "Likelihood" plots show the locations of the maxima in the samples depicted at left; these are the maximum likelihood estimates (MLEs). The vertical lines in the "Estimation Distribution" plots of the MLEs for $1000$ additional simulated data sets are located at the true value of $\rho$ held constant throughout each simulation. Any value of $\rho$ for which the likelihood is larger than the dotted gray line can be considered within a two-sided $95\%$ confidence interval.
The R
code that produced these results can readily be adapted for further study of the Maximum Likelihood estimator. In particular, the estimation distribution for small values of $\rho$ is bimodal and the MLE appears to be biased a little low: this is worth understanding well before relying on the MLE.
library(mvtnorm) # exports rmvnorm()
likelihood.log <- function(rho, xy) {
const <- (dim(xy)[1]/2) * log((2*pi)^2 * (1-rho^2))
sum(log(2*exp((xy[,1]^2 + xy[,2]^2 - 2*xy[,1]*xy[,2]*rho) / (2*(-1 + rho^2))) +
2*exp((xy[,1]^2 + xy[,2]^2 + 2*xy[,1]*xy[,2]*rho) / (2*(-1 + rho^2))))) - const
}
half.normal <- function(rho.0=0, n=100, alpha=0.05, n.iter=1000) {
# rho.0: True value of rho
# n : Sample size
# alpha: Determines gray line (for the confidence interval)
# n.iter: Number of simulation iterations
#
# Simulate a dataset and plot it.
#
xy <- abs(rmvnorm(n, mean=c(0,0), sigma=matrix(c(1,rho.0,rho.0,1),2)))
plot(xy, main=paste("Data (rho=", round(rho.0,2), ")", sep=""))
#
# Plot the log likelihood function for this dataset.
#
rho.min <- tanh(atanh(rho.0)-1/2)
rho.max <- tanh(atanh(rho.0)+1/2)
rho <- seq(rho.min, rho.max,length.out=511)
l <- sapply(rho, function(rho) likelihood.log(rho, xy))
i <- l >= max(l) - 8
plot(rho[i], l[i],
type="l", xlab="rho", ylab="Log likelihood",
main="Likelihood")
fit.ml <- optimize(function(rho) likelihood.log(rho, xy), interval=c(0,1),
maximum=TRUE)
abline(v = fit.ml$maximum, col="Red")
abline(h = fit.ml$objective - qchisq(1-alpha, 1), lty=3, col="Gray")
#
# Simulate additional data to study the estimation distribution.
#
sim <- replicate(n.iter, {
xy <- abs(rmvnorm(n, mean=c(0,0), sigma=matrix(c(1,rho.0,rho.0,1),2)))
fit.ml <- optimize(function(rho) likelihood.log(rho, xy), interval=c(0,1),
maximum=TRUE)
fit.ml$maximum
})
abline(v = fit.ml$maximum, col="Red")
hist(sim, main="Estimation Distribution")
abline(v = abs(rho.0), col="Red")
#
# Return the average estimate (to assess bias).
#
mean(sim)
}
set.seed(17)
par(mfrow=c(3,3))
half.normal(1/4)
half.normal(2/3)
half.normal(0.99)
-
$\begingroup$ Very nice answer and explanation. But, how de we know if the MLE works well for extreeme $\rho$ nad doesn't work well for small to moderate $\rho$? $\endgroup$ Dec 4, 2014 at 20:14
-
$\begingroup$ @Jlamprong Look at the spreads of the estimates in the plots: the range is only $0.008$ for $\rho=0.99$ and $0.7$ for $\rho=0.25$. $\endgroup$– whuber ♦Dec 4, 2014 at 20:45
-
$\begingroup$ I see. Do you have an advice or suggestion to handle small to moderate $\rho$? By the way, if the sample size goes to infinity then this MLE will work well for every $\rho$, won't it? $\endgroup$ Dec 4, 2014 at 20:50
-
2$\begingroup$ As you can see from the data plots, even a human being may have a hard time estimating $\rho$ with small sample sizes. The uncertainty is inherent in the problem, not in the estimation procedure. Indeed, as the sample size increases the estimates of $\rho$ will become more certain. $\endgroup$– whuber ♦Dec 4, 2014 at 20:52
Here's a relatively simple* approach I've been thinking about.
You can work out that (in this particular instance) $\text{corr}(X^2,Y^2)=\rho^2$.
(I can give the derivation if needed).
So one quick and easy way to estimate $\rho$ would be to square your absolute values, and take the square root of the correlation: $\hat{\rho}=\sqrt{\text{corr}(X^2,Y^2)}$.
Note that this estimator won't be unbiased. Indeed, in with small correlations (as noted below), it has a problem, in that the correlation might be negative. In large samples, (at least with large correlation) it does moderately well.
Here's an example simulation:
With 10000 samples of size 100 with $\rho=0.8$, the mean correlation estimate was 0.79, and the distribution of correlation estimates looked like this:
This seems to perform adequately*, at least with reasonably large correlations.
* if not very efficiently compared to ML estimation.
As whuber notes in comments, there's a problem with smaller $\rho$ of negative sample correlation between the squares; indeed that becomes fairly likely. Since we have specified that $\rho$ will be non-negative, his suggestion of replacing negatives with 0 is a pretty good one, but if the correlations aren't reasonably large I wouldn't recommend this approach.
-
1$\begingroup$ That is an interesting approach. The variance of the estimate is larger than the variance of the MLE estimate, though, making it inefficient. (For $\rho=0.8,n=100$ the MLE is 3.5 times more efficient; the inefficiency grows worse with larger $|\rho|$.) There are problems when $|\rho|\lt 1/2$, because then the correlation coefficient of $(X^2, Y^2)$ has a good chance of being negative: how will you take its square root? (Replacing a negative value with $0$ works well.) With large $n$ and moderate $|\rho|$, perhaps it could be recommended as a quick-and-dirty alternative to the (fussier) MLE. $\endgroup$– whuber ♦Oct 7, 2014 at 16:25
-
1$\begingroup$ Indeed, there are a number of potential issues with small $\rho$, as you note; since we know the value we want will not be negative, the idea of replacing negative values with 0 is a good one. My use of the word 'adequate' was intended to convey that it wasn't especially efficient. I'll be more explicit. $\endgroup$– Glen_bOct 7, 2014 at 16:30
-
1$\begingroup$ I find the issue with negative correlations enlightening (+1), because when one replaces negative sample $\rho$ with $0$, the sampling distribution of your estimate of course gains a spike near zero and becomes bimodal, exactly as in the case of the MLE. I suspect, though, that this estimator based on $X^2$ and $Y^2$ is inadmissible because it appears to be less efficient than another one (the MLE) for every possible $\rho$. $\endgroup$– whuber ♦Oct 7, 2014 at 16:37
-
$\begingroup$ @whuber: Thank you very much for your helps. I could derive why $\rho^2=corr(X^2,Y^2)$ $\endgroup$ Oct 8, 2014 at 10:12
-
$\begingroup$ Jlamprong -- While my approach is pretty simple, and somewhat instructive, it's actually not nearly as useful as whuber's. I urge you to reconsider accepting his answer -- it's a substantially better one in my opinion. $\endgroup$– Glen_bOct 8, 2014 at 11:19