From 31b679eaee2a8cf5ec5307c0e33e00ac3e2aee7c Mon Sep 17 00:00:00 2001 From: "Jack Y. Araz" Date: Tue, 12 Mar 2024 10:19:32 -0400 Subject: [PATCH] update docstring --- .../hypothesis_testing/test_statistics.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/spey/hypothesis_testing/test_statistics.py b/src/spey/hypothesis_testing/test_statistics.py index 70dbd91..a728a24 100644 --- a/src/spey/hypothesis_testing/test_statistics.py +++ b/src/spey/hypothesis_testing/test_statistics.py @@ -16,6 +16,13 @@ def qmu_tilde( r""" Alternative test statistics, :math:`\tilde{q}_{\mu}`, see eq. (62) of :xref:`1007.1727`. + .. math:: + + \tilde{q}_{\mu} = \begin{cases} + 0 & \text{if}\ \hat{\mu} > \mu\ , \\ + -2\log\left( \frac{\mathcal{L}(\mu, \theta_\mu)}{\mathcal{L}(\max(\hat{\mu}, 0), \hat{\theta})} \right) & \text{otherwise} + \end{cases} + .. warning:: Note that this assumes that :math:`\hat\mu\geq0`, hence :obj:`allow_negative_signal` @@ -48,6 +55,13 @@ def qmu( ) -> float: r""" Test statistic :math:`q_{\mu}`, see eq. (54) of :xref:`1007.1727` + + .. math:: + + q_{\mu} = \begin{cases} + 0 & \text{if}\ \hat{\mu} > \mu\ ,\\ + -2\log\left( \frac{\mathcal{L}(\mu, \theta_\mu)}{\mathcal{L}(\hat{\mu}, \hat{\theta})} \right) & \text{otherwise} + \end{cases} Args: mu (``float``): parameter of interest, :math:`\mu`. @@ -68,6 +82,13 @@ def q0( r""" Discovery test statistics, :math:`q_{0}` see eq. (47) of :xref:`1007.1727`. + .. math:: + + q_0 = \begin{cases} + 0 & \text{if}\ \hat{\mu} < 0\ ,\\ + -2\log\left( \frac{\mathcal{L}(0, \theta_0)}{\mathcal{L}(\hat{\mu}, \hat{\theta})} \right) & \text{otherwise} + \end{cases} + Args: mu (``float``): parameter of interest, :math:`\mu`.