322 10 STATISTICS ON DIRECTIONAL DATA
e negative signs of the sine and cosine, however, suggest that the true
result is in the third sector (180–270°), and the correct result is therefore
180+43.2357=223.2357.
10.7 Test for the Diff erence between Two Sets of Directions
Let us consider two sets of measurements in two les directional_1.txt and
directional_2.txt. We wish to compare the two sets of directions and test the
hypothesis that these are signi cantly di erent. e test statistic for testing
the similarity between two mean directions is the F-statistic (Section 3.7)
where κ is the concentration parameter, R
A
and R
B
are the resultants of
samples A and B, respectively, and R
T
is the resultant of the combined
samples. e concentration parameter can be obtained from tables using R
T
(Batschelet 1965, Gumbel et al. 1953, Table 10.2). e calculated F is com-
pared with critical values from the standard F tables. e two mean direc-
tions are not signi cantly di erent if the measured F-value is lower than
the critical F-value, which depends on the degrees of freedom Φ
a
=1 and
Φ
b
=n–2, and also on the signi cance level α. Both samples must follow a
von Mises distribution (Section 10.4).
We use two synthetic data sets of directional data to illustrate the ap-
plication of this test. We rst load the data and convert the degrees to radi-
ans.
clear
data_degrees_1 = load('directional_1.txt');
data_degrees_2 = load('directional_2.txt');
data_radians_1 = pi*data_degrees_1/180;
data_radians_2 = pi*data_degrees_2/180;
We then compute the lengths of the resultant vectors.
x_1 = sum(sin(data_radians_1));
y_1 = sum(cos(data_radians_1));
x_2 = sum(sin(data_radians_2));
y_2 = sum(cos(data_radians_2));
mean_radians_1 = atan(x_1/y_1);
mean_degrees_1 = 180*mean_radians_1/pi;