astro py:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- Astropy v5.2.1 »
- Astrostatistics Tools (`astropy.stats`) »
- Circular Statistics »
- vtest

# vtest

astropy.stats.circstats.vtest(data, mu=0.0, axis=None, weights=None)

  Performs the Rayleigh test of uniformity where the alternative hypothesis H1 is assumed to have a known mean angle `mu`.

  Parameters:
    data `ndarray` or `Quantity`

      Array of circular (directional) data, which is assumed to be in radians whenever `data` is `numpy.ndarray`.

    mu `python:float` or `Quantity` [:ref: ‘angle’], optional

      Mean angle. Assumed to be known.

    axis `python:int`, optional

      Axis along which the V 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 `sum(weights, axis)` equals the number of observations. See [1], remark 1.4, page 22, for detailed explanation.

  Returns:
    p-value `python:float` or `Quantity` [:ref: ‘dimensionless’]

  References

  [1]

  S. R. Jammalamadaka, A. SenGupta. “Topics in Circular Statistics”. Series on Multivariate Analysis, Vol. 5, 2001.

  [2]

  C. Agostinelli, U. Lund. “Circular Statistics from ‘Topics in Circular Statistics (2001)’”. 2015. <https://cran.r-project.org/web/packages/CircStats/CircStats.pdf>

  [3]

  M. Chirstman., C. Miller. “Testing a Sample of Directions for Uniformity.” Lecture Notes, STA 6934/5805. University of Florida, 2007.

  Examples

      >>> import numpy as np
      >>> from astropy.stats import vtest
      >>> from astropy import units as u
      >>> data = np.array([130, 90, 0, 145])*u.deg
      >>> vtest(data)
      <Quantity 0.6223678199713766>