# pingouin.circ_vtest

pingouin.circ_vtest(alpha, dir=0.0, w=None, d=None)[source]

V test for non-uniformity of circular data with a specified mean direction.

Parameters
alphanp.array

dirfloat

Suspected mean direction (angle in radians).

wnp.array

Number of incidences in case of binned angle data.

dfloat

Spacing (in radians) of bin centers for binned data. If supplied, a correction factor is used to correct for bias in the estimation of r.

Returns
Vfloat

V-statistic

pvalfloat

P-value

Notes

H0: the population is uniformly distributed around the circle. HA: the population is not distributed uniformly around the circle but has a mean of dir.

Note: Not rejecting H0 may mean that the population is uniformly distributed around the circle OR that it has a mode but that this mode is not centered at dir.

The V test has more power than the Rayleigh test and is preferred if there is reason to believe in a specific mean direction.

Adapted from the Matlab Circular Statistics Toolbox.

Examples

1. V-test for non-uniformity of circular data.

>>> from pingouin import circ_vtest
>>> x = [0.785, 1.570, 3.141, 0.839, 5.934]
>>> v, pval = circ_vtest(x, dir=1)
>>> print(v, pval)
2.486 0.05794648732225438

1. Specifying w and d

>>> circ_vtest(x, dir=0.5, w=[.1, .2, .3, .4, .5], d=0.2)
(0.637, 0.23086492929174185)