The StatsCircularTwoSampleTest operation peforms a number of tests for two samples of circular data. Using the appropriate flags you can choose between parametric or nonparametric, unordered or paired tests. The input consists of two waves that contain one or two columns. The first column contains angle data expressed in radians and an optional second column contains associated vector lengths. The waves must be either single or double precision floating point. Results are stored in the W_StatsCircularCorrelationTest wave in the current data folder and optionally displayed in a table. Some flags generate additional outputs, described below.
The nonparametric test (/NAA) follows Fisher and Lee's modification of Mardia's statistic, which is an analogue of Spearman's rank correlation. The test ranks the angles of each sample and computes the quantities r' and r'' as follows:
Here n is the number of data pairs and rai and rbi are the ranks of the ith member in the first and second samples respectively.
The test statistic is (n-1)(r'-r''), which is compared with the critical value (for one and two tails). The CDF of the statistic is a highly irregular function. The critical value is computed by a different methods according to n. For 3 <= n <= 8, a built-in table of CDF transitions gives a "conservative" estimate of the critical value. For 9 <= n <= 30, the CDF is approximated by a 7th order polynomial in the region x > 0. For n >= 30, the CDF is from the asymptotic expression. For 3 <= n <= 30, CDF values are obtained by Monte-Carlo simulations using 1e6 random samples for each n.
The parametric test for angular-angular correlation (/PAA) involves computation of a correlation coefficient raa and then evaluating the mean
raa
and variance
Sraa2
of equivalent correlation coefficients computed from the same data but by deleting a different pair of angles each time. The mean and variance are then used to compute confidence limits L1 and L2:
is the normal distribution two-tail critical value at the a level of significance. H0 (corresponding to no correlation) is rejected if zero is not contained in the interval [L1,L2].
The parametric test for angular-linear correlation (/PAL) involves computation of the correlation coefficient ral which is then compared with a critical value from
χ2
for alpha significance and two degrees of freedom.