|
39 | 39 | "metadata": {},
|
40 | 40 | "outputs": [],
|
41 | 41 | "source": [
|
42 |
| - "model = pyhf.simplemodels.hepdata_like(\n", |
43 |
| - " signal_data=[5.0, 10.0], bkg_data=[50.0, 60.0], bkg_uncerts=[5.0, 12.0]\n", |
| 42 | + "model = pyhf.simplemodels.uncorrelated_background(\n", |
| 43 | + " signal=[5.0, 10.0], bkg=[50.0, 60.0], bkg_uncertainty=[5.0, 12.0]\n", |
44 | 44 | ")\n",
|
45 | 45 | "model"
|
46 | 46 | ]
|
|
49 | 49 | "cell_type": "markdown",
|
50 | 50 | "metadata": {},
|
51 | 51 | "source": [
|
52 |
| - "What did we just make? This returns a [`pyhf.pdf.Model`](https://pyhf.readthedocs.io/en/v0.6.1/_generated/pyhf.pdf.Model.html#pyhf.pdf.Model) object. Let's check out the specification." |
| 52 | + "What did we just make? This returns a [`pyhf.pdf.Model`](https://pyhf.readthedocs.io/en/v0.6.2/_generated/pyhf.pdf.Model.html#pyhf.pdf.Model) object. Let's check out the specification." |
53 | 53 | ]
|
54 | 54 | },
|
55 | 55 | {
|
|
144 | 144 | "\n",
|
145 | 145 | "where $n = \\{n_1, n_2\\}$ for a 2-bin model (we're being slightly fast and loose with our mathematical notation here), and similarly for $s$, $b$, and $\\gamma$.\n",
|
146 | 146 | "\n",
|
147 |
| - "The 'shapesys' is defined in the [HistFactory paper](https://cds.cern.ch/record/1456844)... however, it can be a little hard to extract out the necessary information. We've provided a nice table of [Modifiers and Constraints](https://pyhf.readthedocs.io/en/v0.6.1/intro.html#id24) in the introduction of our pyhf documentation to use as reference.\n", |
| 147 | + "The 'shapesys' is defined in the [HistFactory paper](https://cds.cern.ch/record/1456844)... however, it can be a little hard to extract out the necessary information. We've provided a nice table of [Modifiers and Constraints](https://pyhf.readthedocs.io/en/v0.6.2/intro.html#id24) in the introduction of our pyhf documentation to use as reference.\n", |
148 | 148 | "\n",
|
149 | 149 | ""
|
150 | 150 | ]
|
|
515 | 515 | "cell_type": "markdown",
|
516 | 516 | "metadata": {},
|
517 | 517 | "source": [
|
518 |
| - "We're not performing inference just yet. We're simply computing the 'logpdf' of the model specified by the parameters $\\theta$ against the provided data. To perform a fit, we use the [inference API](https://pyhf.readthedocs.io/en/v0.6.1/api.html#inference) via `pyhf.infer`.\n", |
| 518 | + "We're not performing inference just yet. We're simply computing the 'logpdf' of the model specified by the parameters $\\theta$ against the provided data. To perform a fit, we use the [inference API](https://pyhf.readthedocs.io/en/v0.6.2/api.html#inference) via `pyhf.infer`.\n", |
519 | 519 | "\n",
|
520 | 520 | "When fitting a model to data, we usually want to find the $\\hat{\\theta}$ which refers to the \"Maximum Likelihood Estimate\" of the model parameters. This is often referred to mathematically by\n",
|
521 | 521 | "\n",
|
|
675 | 675 | "source": [
|
676 | 676 | "## Simple Upper Limit\n",
|
677 | 677 | "\n",
|
678 |
| - "To get upper limits, we just need to run multiple hypothesis tests for a lot of different null hypotheses of BSM with $\\mu \\in [0, \\ldots, 5.0]$ and then find the value of $\\mu$ for which the null hypothesis is rejected (a 95% $\\text{CL}_\\text{s}$). We can do all of this very easily just using the [`upperlimit` API](https://pyhf.readthedocs.io/en/v0.6.1/_generated/pyhf.infer.intervals.upperlimit.html), which also can calculate the upper limit by interpolating" |
| 678 | + "To get upper limits, we just need to run multiple hypothesis tests for a lot of different null hypotheses of BSM with $\\mu \\in [0, \\ldots, 5.0]$ and then find the value of $\\mu$ for which the null hypothesis is rejected (a 95% $\\text{CL}_\\text{s}$). We can do all of this very easily just using the [`upperlimit` API](https://pyhf.readthedocs.io/en/v0.6.2/_generated/pyhf.infer.intervals.upperlimit.html), which also can calculate the upper limit by interpolating" |
679 | 679 | ]
|
680 | 680 | },
|
681 | 681 | {
|
|
713 | 713 | "fig.set_size_inches(10.5, 7)\n",
|
714 | 714 | "ax.set_title(\"Hypothesis Tests\")\n",
|
715 | 715 | "\n",
|
716 |
| - "brazil.plot_results(ax, poi_values, results)" |
| 716 | + "artists = brazil.plot_results(poi_values, results, ax=ax)" |
717 | 717 | ]
|
718 | 718 | },
|
719 | 719 | {
|
|
0 commit comments