I have two variables X and Y. Variable X can vary between 1 and 10 and variable Y can 1 and 100. Also, I have 1000 observations, each observation is a pair of X and Y.

What is the difference between:

  1. correlation of the average of Y values grouped by X values (correlation of average(Y)~X)

  2. correlation of Y values with X values (correlation of Y ~ X)

Doesn't feel right right to do a correlation of averages...

Thanks in advance. BR


Generally, correlation will become stronger when you aggregate the observations, because you reduce scatter/noise. Remember that correlation is simply a measure of the linear fit of a set of points. If there is a lot of individual variability, reducing the variability with aggregation will usually tighten the fit (strengthen correlation).

The choice of which correlation to run (aggregate vs individual) often depends on the inferences you are trying to make.

If X is year (year 1, year 2, year 3, ..., year 10) and you want to describe the yearly correlation with some dependent variable Y, then it might make sense to aggregate.

If you are interested in the correlation at the individual level, then it doesn't make sense to aggregate.

This Wikipedia article on ecological fallacy contains a good description of Individual vs Aggregate Correlations, if you'd like to explore some examples.

  • $\begingroup$ Thanks @underminer. That seems to be exactly the case. BR $\endgroup$ – sys0p Jun 8 '18 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.