MEDx Frequently Asked Questions - Statistics

Q: How does the correlation module work in MEDx?

Reference is Press WH, Teukolsky SA, Vetterling WT, Flannery BP, Numerical Recipes in C, 2nd ed., Cambridge University Press (1992), hereafter refered to as NRC2.

The r maps are calculated as Pearson's r. If Mx is the mean of a vector x[i], My is the mean of a vector y[i], a^2 means a squared, sqrt(a) means the square root of a, and sum(i, EXPRESSION[i]) is the sum of EXPRESSION evaluated over all i, then

r = sum(i,(x[i]-Mx)*(y[i]-My)) / sqrt ( sum(i, (x[i] - Mx)^2)*sum(i, (y[i]-My)^2) )

See equation 14.5.1 in NRC2.

The Z maps are generated by converting r to a probability, and then converting that probability to a Z value. Let A(Z) be the area under the normal curve from negative infinity to -Z plus the area from +Z to +infinity. The Z maps are generated by finding the value Z such that A(Z) is equal to the probability level of r; the degrees of freedom will be N-2, where N is the number of observations.

In greater detail, the r values are first converted to t-tests by the formula

t=r*sqrt(df/(1-r^2))

See equation 14.5.5 in NRC2. Then the two-tailed probability P of the t-test with the same number of degrees of freedom is calculated; see equation 6.4.9 in NRC2. Finally, the normal deviate which the same two-tailed p-level P is determined from an internal lookup table.


Other FAQ Topics

If you have a question that you would like to see addressed in our list of Frequently Asked Questions, please contact customer support.

Back to FAQ Home