t95ci: Calculate a 95% confidence interval from the t-distribution

View source: R/np_utility.R

t95ciR Documentation

Calculate a 95% confidence interval from the t-distribution

Description

se Calculates the 95% confidence interval of the mean for a vector of data based on the t-distribution

Usage

t95ci(x)

Arguments

x

numeric vector

Details

This is a convenience function internal to NicePlots and is not exported. If x is a numeric vector, SD is the standard deviation of x, N is the length of x and TQ is the t-distrubition quantile for 0.975 with N-1 degrees for freedom then the 95% confidence interval of the mean may be caclulated as:

95\%ci = \frac{QT*SD}{\sqrt{N}}

Value

a double corresponding to the length of one arm ofthe 95% confidence interval

See Also

sd

Examples

data(iris)
#t95ci(iris$Sepal.Length)

ZachHunter/NicePlots.R documentation built on Sept. 23, 2023, 4:04 a.m.