My interest is to develop a relation of the correlation coefficient when the data (both the dependent and independent variables) have measurement errors.
Intro
The measured values are related to the true / actual values by: \begin{align} \newcommand{\Var}{{\rm Var}}\newcommand{\cov}{{\rm Cov}} x_i &= x_{t,i} + \varepsilon_{x,i} \\ y_i &= y_{t,i} + \varepsilon_{y,i} \end{align} where $\varepsilon_{x,i}$ and $\varepsilon_{y,i}$ are the random measurement errors on $x_i$ and $y_i$, respectively. $x_t$ and $y_t$ are the true values, $\varepsilon_{x,i} \sim N(0, \sigma_x^2)$ and $\varepsilon_{y,i} \sim N(0, \sigma_y^2)$. Finally, $\sigma_x$ and $\sigma_y$ are known.
When the data are measured without error, the correlation coefficient is:
$$ r = \frac{\cov(x_t,y_t)}{\sqrt{\Var(x_t)\Var(y_t)}} $$
Case 1: Measurement errors are the same for each data point
I was able to derive the formula for the correlation coefficient in case of measurement errors. In this case $\sigma_x^2$, $\sigma_y^2$ and $\sigma_{x,y}$ are the same for each data point. Using the properties of variance and covariance, the correlation coefficient is \begin{align} r &= \frac{\cov(x_t,y_t)}{\sqrt{\Var(x_t)\Var(y_t)}} \tag{1} \\[10pt] &= \frac{\cov(x,y) - \sigma_{x,y}}{\sqrt{(\Var(x) - \sigma_x^2) (\Var(y) - \sigma_y^2)} } \end{align}
where $\sigma_{x,y}$ is the covariance.
Case 2: Measurement errors are NOT the same for each data point
assuming $\sigma_{x,y} = 0$, then the numerator in equation $(1)$ simplifies to: $\cov(x_t,y_t) = \cov(x, y)$
In this case $\sigma_{x,i}$ are not identical. Hence I cannot use the property of the variance which says that:
\begin{align} \Var(x) &= \Var(x_t + \varepsilon_x) \\ &= \Var(x_t) + \Var(\varepsilon_x) \\ &= \Var(x_t) + \sigma_x^2 \end{align} So how can I derive a formula for the correlation coefficient in case the measurement errors are not identical?