Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I have a set of 40 variables

{A, B, C...}

I want to count the number of possible correlations for n variables. For example, if n=2

I have

40(40-1)/2=780 correlations

How do I do it for n > 2?

share|cite|improve this question
Well, how did you do it for $n=2$? – Pedro Tamaroff Sep 6 '12 at 23:51
up vote 1 down vote accepted

What you did for $n=2$ works for $n\gt2$ (as Peter implies in a comment). For $n=3$, you get $$(40)(40-1)(40-2)/(1)(2)(3)$$ for $n=4$, $$(40)(40-1)(40-2)(40-3)/(1)(2)(3)(4)$$ and so on.

share|cite|improve this answer
I'd vote you up but I lack the rep... Thanks! :) – Nik Sep 7 '12 at 0:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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