1
$\begingroup$

Should the sample size n be equal when we are looking for simple correlation? I mean is it OK if variable 1 has a little more or fewer observations than variable 2? I am computing correlation between two variables...the n of one is a little higher than the n of other!

I am looking for correlation between 2 scales (psy tests). The n of one is a little higher than the n of another. I mean not ALL the respondents who filled up one form (scale) have filled up the other. There are some (very few though) missing.

$\endgroup$
11
  • $\begingroup$ Correlation only makes sense if values are paired. If one or more of your values in sample 1 is not paired with a value in sample 2, then those values can't be used in a correlation. Most of all, if no values are paired, correlation does not apply. $\endgroup$
    – Nick Cox
    Oct 18, 2013 at 11:11
  • $\begingroup$ @Tania, you have one sample, two variables. $\endgroup$
    – ttnphns
    Oct 18, 2013 at 11:14
  • 1
    $\begingroup$ Yes Nick! I am looking for correlation between 2 scales (psy tests). The n of one is a little higher than the n of another. I mean not ALL the respondents who filled up one form (scale) have filled up the other. There are some (very few though) missing... $\endgroup$
    – Tania
    Oct 18, 2013 at 11:23
  • 2
    $\begingroup$ So, you can't use any cases (observations, records) with missing values. Your software should take care of that somehow. (Depending on quite what your scale is, correlation might not be best, but that's another story.) $\endgroup$
    – Nick Cox
    Oct 18, 2013 at 11:29
  • 2
    $\begingroup$ Sorry, but I am at a loss to know what you did that needs correcting. No statistical software worthy of the name will calculate a correlation from differing numbers of values for the two variables. Perhaps you should show us what commands you used and what output you got. $\endgroup$
    – Nick Cox
    Oct 18, 2013 at 12:23

1 Answer 1

4
$\begingroup$

Yes, kind of...

Yes, it is "fine." See this 10-case example, where case 5 and case 7 both have a missing:

enter image description here

Now, look at their correlation outcome, there are only 8 cases participating.

enter image description here

The reason is that Pearson's correlation requires the covariance between $x1$ and $x2$ to be calculated. If either one has a missing, there will be no covariance resulted, and the case is thrown out.

Now, to further illustrate, let us use select case to filter out the two cases:

enter image description here

And rerun the correlation again, the results are identical. This exclusion does not just happen to system missing, if you have assigned a user-defined missing, the case with that user-defined missing will also be excluded.

enter image description here

But wait...!

I said that it's "fine" because it's true that SPSS does screen out incomplete cases for you. But it is in no way solving the missing phenomenon for you. If there is any systematic reason that causes your participants to not answer a certain question, you correlation coefficient can be wrong. However, if you feel that they missed the answer in a random manner, then your correlation shouldn't be heavily affected, though you may lose some sample size and consequently power.


Q: But - I ask you - please tell Tania about pairwise and listwise deletion of missings and under what button it is found in SPSS -- ttnphns

A: Certainly. It would be necessary to illustrate with another example in which we have a new candidate, $x3$:

enter image description here

SPSS correlation analysis uses pairwise deletion by default, which means it'd always maximize the number of case in each of the pairwise comparisons. We have learned from above that the correlation between $x1$ and $x2$ has a sample size of 8 pairs. What about $x1$ and $x3$?

enter image description here

Turned out, it's 9 because maximally there are 9 pairs of data. Now, this can get inconvenient if you'd like to screen off the whole case and prevent it from being analyzed. In that case, you'll use list-wise deletion.

To call the option up, in the Correlation menu, press Option and then check Exclude cases listwise, then press Continute and OK to submit the test again:

enter image description here

Now let's run the correlation matrix again, you'll notice that all sample sizes are unified to 8; only cases that provide data to all the three variables are retained. Visit this IBM FAQ if you'd like to learn more about the two types of deletion.

enter image description here

$\endgroup$
5
  • $\begingroup$ Very nice snapshots, gladden the eye! And the explanation. But - I ask you - please tell @Tania about pairwise and listwise deletion of missings and under what button it is found in SPSS. $\endgroup$
    – ttnphns
    Oct 18, 2013 at 14:29
  • $\begingroup$ @ttnphns, no problem. Revised. $\endgroup$ Oct 18, 2013 at 14:50
  • $\begingroup$ Excellent (yes, really). Those shades, too... I feel like dragging it all to Flickr photostream. $\endgroup$
    – ttnphns
    Oct 18, 2013 at 14:56
  • $\begingroup$ @ttnphns, you're too kind. I use a screen capture software called Snagit to do capture and post-capture touch up (like adding circles and arrows.) It also makes screen video, too. Pretty handy. (Disclaimer: I am not affiliate with this software's maker.) $\endgroup$ Oct 18, 2013 at 15:02
  • $\begingroup$ A THOUSAND thanks @Penguin_Knight!!! You are just amazing...you have saved my life:-) I wish ALL teachers/ mentors are like you! And look at these beautiful & amazing snapshots. Awesome... $\endgroup$
    – Tania
    Oct 18, 2013 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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