.. _book_fig_chapter5_fig_likelihood_gausslin: Log-likelihood for Gaussian plus linear background -------------------------------------------------- Figure 5.13 An illustration of the logarithm of the posterior probability density function :math:`L(\sigma,A)` (see eq. 5.85) for data generated using N = 200, :math:`\mu=5`, :math:`\sigma = 1`, and A = 0.5, with the background strength (1 - A)/W = 0.05 in the interval 0 < x < W, W = 10. The maximum of :math:`L(\sigma, A)` is renormalized to 0, and color coded on a scale -5 to 0, as shown in the legend. The contours enclose the regions that contain 0.683, 0.955, and 0.997 of the cumulative (integrated) posterior probability. Note the covariance between A and :math:`\sigma`. The histogram in the bottom panel shows the distribution of data values used to construct the posterior pdf in the top panel, and the probability density function from which the data were drawn as the solid line. .. image:: ../images/chapter5/fig_likelihood_gausslin_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_likelihood_gausslin.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_likelihood_gausslin.py :lines: 18- .. raw:: html
:download:`[download source: fig_likelihood_gausslin.py] ` .. raw:: html