ptmean: Cumulative distribution function for t distribution

View source: R/ptmean.R

ptmeanR Documentation

Cumulative distribution function for t distribution

Description

Computes the quantile of the t distribution for n-1 degrees of freedom corresponding to the input value of the sample mean.

Usage

ptmean(q, mean, s2, n)

Arguments

q

coordinate at which the cdf is to be evaluated (named in accordance with R standards)

mean

the assumed normal mean

s2

the observed sample variance (pass this as an extra argument to cdfinv())

n

the sample size (pass this as an extra argument to cdfinv())

Details

Do not call ptmean() directly. Pass DISTR="tmean" to cdfinv() when computing intervals for the normal mean when the variance is unknown. The parameter name to be passed to cdfinv() is mean. The additional arguments s2 (sample variance) and n (sample size) are to be passed to cdfinv().

Value

The quantile of the t distribution for n-1 degrees of freedom corresponding to the input value of the sample mean.

Author(s)

Peter E. Freeman, pfreeman@cmu.edu

Examples

cdfinv("tmean","mean",14.35,s2=4.5,n=22) ## returns 13.40946 15.29054

cdfinv documentation built on April 16, 2025, 1:09 a.m.