One way to characterize the results of a measurement is to quote a frequentist confidence interval for a measured parameter. In many cases the parameter, call it \(\mu\), is known or expected to be positive, \(\mu\ge 0\). In a landmark article (and preprint), Feldman and Cousins proposed using a likelihood-ordering principle in order to enable the automatic transition from 1-sided upper limits to 2-sided confidence intervals for the case \(\mu\ge 0\), while maintaining the coverage properties of the specified confidence level (CL), i.e., that the published interval has a \(CL\) probability of containing the true value, independent of the true value.
In this html output of a MATLAB live-script I demonstrate how the Feldman and Cousins procedure is applied to the case of determining the confidence interval of the mean parameter of a (unit) gaussian distribution based on an observation. I reproduce some of the results in their article. The MATLAB live-script is also available.