Learn R Programming

hypothesestest (version 1.0)

conint: Calculate the Confidence Interval

Description

Calcalte the confidence interval of the mean from a population or the difference between two means from two populations.

Usage

conint(TrnX = NULL, TrnY = NULL, m, n1, n2, s1, s2, side = "both", alpha = 0.95, method = "n")

Arguments

TrnX
the observed values of a random sample from a distribution
TrnY
the observed values of a random sample from another distribution
m
the mean of the observed values of the first random sample
n1
the number of the random variables of TrnX
n2
the number of the random variables of TrnY
s1
the standard variance of TrnX
s2
the standard variance of TrnY
side
whether the confidence interval is one or two sides
alpha
the significance level of the confidence level
method
Are we going to calculate the confidence interval of the mean from a population or the difference between two means from two populations? Is the population from a normal distribution, a t distribution or a chi-square distribution?

Value

a
the left end point of the confidence interval
b
the right end point of the confidence interval

Details

The confidence interval consists of some information such as the significance level and whether it is one or two sides. The random samples may come from normal distributions,t distributions or chi-square distributions.

See Also

findroot

Examples

Run this code
conint(m=67.53,n1=25,s1=10,side="both",alpha=0.95,method="n") #63.61 71.45

Run the code above in your browser using DataLab