Skip to content

Commit

Permalink
update docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
jackaraz committed Mar 12, 2024
1 parent 146fdb6 commit 31b679e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/spey/hypothesis_testing/test_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down Expand Up @@ -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`.
Expand All @@ -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`.
Expand Down

0 comments on commit 31b679e

Please sign in to comment.