Wolfram Research

Function Repository Resource:

MeanCI

Source Notebook

Estimate the confidence interval for the population mean

Contributed by: Wolfram Research

ResourceFunction["MeanCI"][list]

gives a confidence interval for the population mean estimated from list.

Details and Options

ResourceFunction["MeanCI"][list] gives a confidence interval {min,max} centered at Mean[list].
If the variance is assumed to be known, ResourceFunction["MeanCI"] is based on the normal distribution.
If the variance is not assumed to be known, ResourceFunction["MeanCI"] is based on the Student t distribution with Length[list]-1 degrees of freedom.
The following options can be given:
ConfidenceLevel 0.95 probability associated with a confidence interval
KnownVariance None variance of population

Examples

Basic Examples

A 95% confidence interval for the population mean:

In[1]:=
ResourceFunction["MeanCI"][{1, 2, 4, 6, 3}]
Out[1]=

Options

ConfidenceLevel

A 99% confidence interval:

In[2]:=
ResourceFunction["MeanCI"][{1, 2, 4, 6, 3}, ConfidenceLevel -> .99]
Out[2]=

KnownVariance

A 95% confidence interval assuming the population variance is 1:

In[3]:=
ResourceFunction["MeanCI"][{1, 2, 4, 6, 3}, "KnownVariance" -> 1]
Out[3]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

See Also

License Information