Skip to content

Commit 13e7c88

Browse files
Fix mathematical notation in conditional_logprob docstrings (#6821)
* Fix mathematical notation in conditional_logprob docstrings * Update pymc/logprob/basic.py Accepting change in s. It becomes sigma Co-authored-by: larryshamalama <[email protected]> * Update pymc/logprob/basic.py Accepting change in s. It becomes sigma part 2 Co-authored-by: larryshamalama <[email protected]> * Apply suggestions from code review Co-authored-by: larryshamalama <[email protected]> * s_vv to s2_vv --------- Co-authored-by: larryshamalama <[email protected]>
1 parent 8e89828 commit 13e7c88

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pymc/logprob/basic.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -430,23 +430,23 @@ def conditional_logp(
430430
431431
.. math::
432432
433-
\Sigma^2 \sim& \operatorname{InvGamma}(0.5, 0.5) \\
434-
Y \sim& \operatorname{N}(0, \Sigma)
433+
\sigma^2 \sim& \operatorname{InvGamma}(0.5, 0.5) \\
434+
Y \sim& \operatorname{N}(0, \sigma^2)
435435
436436
If we create a value variable for ``Y_rv``, i.e. ``y_vv = pt.scalar("y")``,
437437
the graph of ``conditional_logp({Y_rv: y_vv})`` is equivalent to the
438-
conditional log-probability :math:`\log p(Y = y \mid \Sigma^2)`, with a stochastic
438+
conditional log-probability :math:`\log p_{Y \mid \sigma^2}(y \mid s^2)`, with a stochastic
439439
``sigma2_rv``.
440440
441441
If we specify a value variable for ``sigma2_rv``, i.e.
442-
``s_vv = pt.scalar("s2")``, then ``conditional_logp({Y_rv: y_vv, sigma2_rv: s_vv})``
442+
``s2_vv = pt.scalar("s2")``, then ``conditional_logp({Y_rv: y_vv, sigma2_rv: s2_vv})``
443443
yields the conditional log-probabilities of the two variables.
444444
The sum of the two terms gives their joint log-probability.
445445
446446
.. math::
447447
448-
\log p(Y = y, \Sigma^2 = \sigma^2) =
449-
\log p(Y = y \mid \Sigma^2 = \sigma^2) + \log p(\Sigma^2 = \sigma^2)
448+
\log p_{Y, \sigma^2}(y, s^2) =
449+
\log p_{Y \mid \sigma^2}(y \mid s^2) + \log p_{\sigma^2}(s^2)
450450
451451
452452
Parameters

0 commit comments

Comments
 (0)