Normal/gaussian/bell curve distributions and more to illustrate probability density functions (pdfs), sigma bands (68-95-99 rule), test statistics, critical regions (accept/reject), type-I and type-II errors (alpha, beta), null hypothesis tests, p-value, low sensitivity, bias & systematic error, S+B vs. B-only hypotheses, upper limits and the CLs method.
Inspired by Glen Cowen’s CERN lectures and this Higgs physics course by Mauro Donega at the UZH & ETHZ. Presented in this talk on the statistical method in particle physics.
Also see critical regions and these sets of critical regions.
Probability from gaussian probability density functions (pdfs):

















Edit and compile if you like:
% Author: Izaak Neutelings (August, 2017)\documentclass[border=3pt,tikz]{standalone} %[dvipsnames]\usepackage{amsmath} % for \dfrac\usepackage{tikz}\tikzset{>=latex} % for LaTeX arrow head\usepackage{pgfplots} % for the axis environment\usepackage{xcolor}\usepackage[outline]{contour} % halo around text\contourlength{1.2pt}\usetikzlibrary{positioning,calc}\usetikzlibrary{backgrounds}% required for 'inner frame sep'%\usepackage{adjustbox} % add whitespace (trim)% define gaussian pdf and cdf\pgfmathdeclarefunction{gauss}{3}{%\pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}%}\pgfmathdeclarefunction{cdf}{3}{%\pgfmathparse{1/(1+exp(-0.07056*((#1-#2)/#3)^3 - 1.5976*(#1-#2)/#3))}%}\pgfmathdeclarefunction{fq}{3}{%\pgfmathparse{1/(sqrt(2*pi*#1))*exp(-(sqrt(#1)-#2/#3)^2/2)}%}\pgfmathdeclarefunction{fq0}{1}{%\pgfmathparse{1/(sqrt(2*pi*#1))*exp(-#1/2))}%}\colorlet{mydarkblue}{blue!30!black}% to fill an area under function\usepgfplotslibrary{fillbetween}\usetikzlibrary{patterns}\pgfplotsset{compat=1.12} % TikZ coordinates <-> axes coordinates% https://tex.stackexchange.com/questions/240642/add-vertical-line-of-equation-x-2-and-shade-a-region-in-graph-by-pgfplots% plot aspect ratio%\def\axisdefaultwidth{8cm}%\def\axisdefaultheight{6cm}
Click to download: gaussians.tex • gaussians.pdf
Open in Overleaf: gaussians.tex
Hello,
Thank you very much for these very nice examples. I wanted to share the follow problem and fix for it: I downloaded the .tex file, and the figure for the 68-95-99 rule came out wrong. After some investigations I figured ou that in the lines that place the vertical dashed lines and that are of the form
\addplot[black,dashed,thick]
coordinates {({\B-3*\Bs},{20*gauss(\B-3*\Bs,\B,\Bs)}) ({\B-3*\Bs},{-\h})};
node[below=-3pt,scale=0.8] {\strut$\mu-3\sigma$};
the semi-colon on the second row should not be there… and it is not there in the editable code that one can play with directly on line. By removing the column, as follows, in all similar lines
\addplot[black,dashed,thick]
coordinates {({\B-3*\Bs},{20*gauss(\B-3*\Bs,\B,\Bs)}) ({\B-3*\Bs},{-\h})}
node[below=-3pt,scale=0.8] {\strut$\mu-3\sigma$};
the figure was again correct. The presence of the semi-colon does not produce a compilation error, but it seems that it messes up the coordinate system.