CI.t.test {jmuOutlier}R Documentation

Student's t-Confidence Interval with Finite Population Correction

Description

Performs two-sided confidence interval on population mean, allowing for a finite population correction.

Usage

CI.t.test(x, conf.level = 0.95, fpc = 1)

Arguments

x

A nonempty numeric vector of data values.

conf.level

Confidence level of the interval, and should be between 0 and 1.

fpc

The finite population correction, and should be between 0 and 1.

Details

The fpc is typically defined as 1-n/N, where n is the sample size, and N is the population size, for simple random sampling without replacement. When sampling with replacement, set fpc=1 (default).

Value

A confidence interval for the population mean.

Note

The definition of fpc is based on the textbook by Scheaffer, Mendenhall, Ott, Gerow (2012), chapter 4.

Author(s)

Steven T. Garren, James Madison University, Harrisonburg, Virginia, USA

References

Scheaffer, R. L., Mendenhall, W., Ott, R. L., Gerow, K. G. (2012) Elementary Survey Sampling, 7th edition.

See Also

t.test and plotCI.

Examples

# Sample 43 observations from a population of 200 numbers, and compute the 95% confidence interval.
pop = sqrt(1:200) ; x1 = sample( pop, 43 ) ; print(sort(x1))

CI.t.test( x1, fpc = 1-length(x1)/length(pop) )

# Sample 14 observations from a Normal(mean=50, sd=5) distribution,
#    and compute the 90% confidence interval.
x2 = rnorm( 14, 50, 5 ) ; print(sort(x2)) 

CI.t.test( x2, 0.9 )

[Package jmuOutlier version 2.2 Index]