nessai.utils.indices
====================

.. py:module:: nessai.utils.indices

.. autoapi-nested-parse::

   Utilities related to insertion indices.

   ..
       !! processed by numpydoc !!


Functions
---------

.. autoapisummary::

   nessai.utils.indices.compute_indices_ks_test
   nessai.utils.indices.bonferroni_correction


Module Contents
---------------

.. py:function:: compute_indices_ks_test(indices, nlive, mode='D+')

   
   Compute the two-sided KS test for discrete insertion indices for a given
   number of live points


   :Parameters:

       **indices** : array_like
           Indices of newly inserted live points

       **nlive** : int
           Number of live points

       **mode** : str
           Method for computing the KS statistic. If D+, the statistic is the
           maximum positive difference between the empirical and assumed CDF.
           If D-, the statistic is the maximum negative difference.



   :Returns:

       **D** : float
           Two-sided KS statistic

       **p** : float
           p-value











   ..
       !! processed by numpydoc !!

.. py:function:: bonferroni_correction(p_values, alpha=0.05)

   
   Apply the Bonferroni correction for multiple tests.

   Based on the implementation in ``statmodels.stats.multitest``

   :Parameters:

       **p_values** :  array_like
           Uncorrelated p-values.

       **alpha** : float, optional
           Family wise error rate.














   ..
       !! processed by numpydoc !!

