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's t-distribution with (Length[list]-1) degrees of freedom.
The following options can be given:
ConfidenceLevel0.95probability associated with a confidence interval
KnownVarianceNonevariance of population

Examples

Basic Examples (1) 

A 95% confidence interval for the population mean:

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

Options (2) 

ConfidenceLevel (1) 

A 99% confidence interval:

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

KnownVariance (1) 

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

Version History

  • 1.0.0 – 13 February 2019

Related Resources

License Information