Circular Statistics#

Circular Statistics Module

This module contains functions performing circular statistics. As a general reference see:

https://www.cambridge.org/core/books/statistical-analysis-of-circular-data/324A46F3941A5CD641ED0B0910B2C33F

solardatatools.circular_statistics.rayleightest(data, axis=None, weights=None)#

Performs the Rayleigh test of uniformity.

From https://docs.astropy.org/en/stable/_modules/astropy/stats/circstats.html#rayleightest (distributed under BSD-3 open-source license)

This test is used to identify a non-uniform distribution, i.e. it is designed for detecting an unimodal deviation from uniformity. More precisely, it assumes the following hypotheses: - H0 (null hypothesis): The population is distributed uniformly around the circle. - H1 (alternative hypothesis): The population is not distributed uniformly around the circle. Small p-values suggest to reject the null hypothesis.

Parameters:
  • data (numpy.ndarray or Quantity) – Array of circular (directional) data, which is assumed to be in radians whenever data is numpy.ndarray.

  • axis (int, optional) – Axis along which the Rayleigh test will be performed.

  • weights (numpy.ndarray, optional) – In case of grouped data, the i-th element of weights represents a weighting factor for each group such that np.sum(weights, axis) equals the number of observations. See [1], remark 1.4, page 22, for detailed explanation. See [2], [3] and [4] for more information.

Returns:

p-value – p-value.

Return type:

float or dimensionless Quantity

References