# Correlation coefficient with noisy data

I am trying to analyse the dependencies between some variables, looking at the Pearson and Spearman correlation coefficients (for now, at least). The problem is that one variable has known errors (for each data point, there is a confidence interval).

Is there any way to propagate the confidence intervals of the data to obtain a confidence interval on the coefficient itself?

• It looks as though weighted correlation might by helpful here. Try this Q&A stats.stackexchange.com/questions/221246/… and see whether that helps. If not perhaps edit your quesiton to explain more? – mdewey Nov 9 '18 at 13:33
• @mdewey Thank you for your comment. It seems like my question was not clear enough, but since I'm not sure what was unclear, I'll just try to give you an example (I'll edit the question if this makes more sense). I have about 3000 samples of 2 variables (X,Y). For each sample, I know that the X variable has an error of +-Xerr. Thus, each sample is represented by a triplet (X,Y,Xerr), and I know that the actual values of the sample might be between (X-Xerr,Y), (X+Xerr, Y) (Xerr is given per each sample, Y has no error). How can I use Xerr in the correlation between X and Y? – Paul92 Nov 9 '18 at 13:40
• You could weight each observation by the inverse of its variance. That would admittedly ignore that $Y$ is known without error. – mdewey Nov 9 '18 at 14:31
• Is your data chronological . If so all bets are off using the correlation coefficient. – IrishStat Nov 9 '18 at 20:15
• @IrishStat No, it is not chronological. Y is a measure of some property of a group of individuals. The problem is that the number of individuals (X) cannot be determined exactly and thus has a quantifiable error associated. – Paul92 Nov 9 '18 at 21:01