Angular-Angular Correlation Tests

This example contains parametric and non-parametric tests with correlated and uncorrelated inputs.

Angle-Angle Correlation

The following data sets contain angle measurements in radians:

data1data2
00.558505
0.1745330.296706
0.2617990.959931
0.3490662.23402
0.4363326.00393

The first test is the parametric angle-angle correlation. To run the test execute the command:

StatsCircularCorrelationTest/T=1/Q/PAA data1,data2

The results appear in the table "Circular Correlation Test":

raa0.0145224
avg0.00473055
variance0.00391019
L1-0.00112052
L20.1085

Here raa is the computed correlation coefficient, avg is the average correlation coefficient and variance is the variance of the correlation coefficient computed for all N combinations when eliminating a single pair of data. L1 and L2 provide the confidence interval at the specified significance (which in this case is the default 0.05). If the confidence interval includes zero, as is the case above then H0: there is no relationship between the two waves can't be rejected.

Nonparametric Test with uncorrelated inputs

To run the test execute the following command:

StatsCircularCorrelationTest/T=1/Q/NAA data1,data2

The results appear in the table "Circular Correlation Test":

N5
rp0.523607
rpp0.0763932
Statistic1.78885
alpha11.796
alpha24.004

Here rp and rpp are r' and r'' respectively of the Fisher and Lee formulation. The statistic is (n-1)(rp-rpp) which is compared to one of the two critical values: alpha1 for one tail hypothesis and alpha2 for a two tail hypothesis. In this case the test agrees with the results of the parametric test above since the statistic is smaller than the critical value so the hypothesis of zero correlation can't be rejected.

Parameteric Test with correlated input

This example illustrates the result of a parametric test when there exists correlation between the input waves. To run the test execute the following commands:

Duplicate/O data2,data3
data3=data2+gnoise(0.2)
StatsCircularCorrelationTest/T=1/Q/PAA data2,data3

The results of the parametric test are:

raa0.887882
avg0.88599
variance0.00199459
L10.856304
L20.934596

It is clear from these values that there exists correlation between the two waves and since the values of L1 and L2 are not on both sides of zero, H0 of zero correlation must be rejected.

Nonparametric Test with Correlated Inputs

The fourth example consists of nonparametric test and correlated inputs (larger number of samples). To run the test execute the commands:

Make/O/D data4={0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55}
Duplicate/O data4,data5
data5+=enoise(0.05)
StatsCircularCorrelationTest/T=1/Q/NAA data4,data5

The results are:

N10
rp0.925066
rpp0.00145898
Statistic8.31246
alpha12.5
alpha23.19336

Here the test statistic is greater than the critical value (alpha2) so H0: of zero correlation must be rejected.