ci.mean: Confidence interval for a mean

View source: R/statpsych1.R

ci.meanR Documentation

Confidence interval for a mean

Description

Computes a confidence interval for a population mean using the estimated mean, estimated standard deviation, and sample size. Use the t.test function for raw data input.

ci.mean1 is deprecated and will soon be removed from statpsych; please switch to ci.mean

Usage

ci.mean(alpha, m, sd, n)

ci.mean1(alpha, m, sd, n)

Arguments

alpha

alpha level for 1-alpha confidence

m

estimated mean

sd

estimated standard deviation

n

sample size

Value

Returns a 1-row matrix. The columns are:

  • Estimate - estimated mean

  • SE - standard error

  • LL - lower limit of the confidence interval

  • UL - upper limit of the confidence interval

References

\insertRef

Snedecor1980statpsych

Examples

ci.mean(.05, 24.5, 3.65, 40)

# Should return:
# Estimate        SE       LL       UL
#     24.5 0.5771157 23.33267 25.66733
 


statpsych documentation built on Sept. 11, 2024, 7:42 p.m.