StatsCorrelation
StatsCorrelation (waveA [, waveB])
The StatsCorrelation function computes Pearson's correlation coefficient between two real valued arrays of data of the same length. Pearson r is give by:
Here A is the average of the elements in waveA, B is the average of the elements of waveB and the sum is over all wave elements.
Details
If you use both waveA and waveB then the two waves must have the same number of points but they could be of different number type. If you use only the waveA parameter then waveA must be a 2D wave. In this case StatsCorrelation will return 0 and create a 2D wave M_Pearson where the (i,j ) element is Pearson's r corresponding to columns i and j.
Fisher's z transformation converts Person's r to a normally distributed variable z:
with a standard error
You can convert between the two representations using the following functions:
Function pearsonToFisher(inr)
Variable inr
return 0.5*(ln(1+inr)-ln(1-inr))
End
Function fisherToPearson(inz)
Variable inz
return tanh(inz)
End
See Also
Correlate, StatsLinearCorrelationTest, StatsCircularCorrelationTest