## The ultimate confidence intervals calculator

by G. D'Agostini

### Purpose

This Javascript code calculates **frequentist confidence intervals**
that **cover** the true value with a given probability,
i.e. **the statement "the given interval encloses the true value"
is true in a given fractio of the cases and false in the remaining cases**.
In other words,
if a larger of users interrogate the calculator, it is garanteed that:
- the percentage of times in which the resulting interval
contains the true value is equal to `coverage probability';
- in the remaining percentage of times the interval does not cover
the true value.

### Use the calculator

To use the calculator, go though the following steps:
- Think at the physical quantity of your interest, expressed in a suitable unit, e.g. a
SI unit, or what is customary in your discipline.

(No! You don't need to make an experiment! **Why do you want to spend time and money
if what you neeed is just frequentist coverage?**)
- Select the desired coverage probability:

What is this madness? Ask your frequentistic statistics expert...

For me this is just an implementation of what I talked at CERN
in the Academic Training lecture of 22 February 2005 [see lecture 2, p.24 (slide 95)], see detailed
information here.

If you are not happy with it, this is perhaps because what you need is, instead, a *probability
interval*, i.e. an interval such that there is a certain chance that the true value is inside it.