Student's t-Distribution

DESCRIPTION:

Density, cumulative probability, quantiles and random generation for Student's t distribution.

USAGE:

dt(x, df, log=F) 
pt(q, df) 
qt(p, df) 
rt(n, df, bigdata=F) 

REQUIRED ARGUMENTS:

x
vector or bdVector of quantiles. Missing values ( NAs) are allowed.
q
vector or bdVector of quantiles. Missing values ( NAs) are allowed.
p
vector or bdVector of probabilities. Missing values ( NAs) are allowed.
n
sample size. If length(n) is larger than 1, then length(n) random values are returned.
df
vector or bdVector of degrees of freedom. This is replicated to be the same length as p or q or the number of deviates generated.

OPTIONAL ARGUMENTS:

bigdata
a logical value; if TRUE, an object of type bdVector is returned. Otherwise, a vector object is returned.This argument can be used only if the bigdata library section has been loaded.
log
a logical scalar; if TRUE, dt will return the log of the density, not the density itself.

VALUE:

density ( dt), probability ( pt), quantile ( qt), or random sample ( rt) for Student's t-distribution on df degrees of freedom.

SIDE EFFECTS:

The function rt causes creation of the dataset .Random.seed if it does not already exist, otherwise its value is updated.

DETAILS:

Elements of q or p that are missing cause the corresponding elements of the result to be missing.

A noncentral t is the distribution of
(Z + d) / sqrt( chi^2 / df )
where Z is standard normal, d is the noncentrality parameter, and df is the degrees of freedom of the chi^2 variable. To generate from the noncentral t, use
rnorm(n, d) / sqrt(rchisq(n, df=df) / df)
Note - with d=0 this generates a different sequence of random numbers than does rt(). If consistency is important then use this procedure instead of rt() even when d=0.

BACKGROUND:

Student's t is a real valued distribution symmetric about 0. The t approaches the Gaussian (normal) distribution as the degrees of freedom go to infinity. The major use of the t is to test hypotheses and construct confidence intervals for means of Gaussian data.

For details on the uniform random number generator implemented in S-PLUS, see the set.seed help file.

REFERENCES:

Johnson, N. L. and Kotz, S. (1970). Continuous Univariate Distributions, vol. 2. Houghton-Mifflin, Boston.

SEE ALSO:

, , .

EXAMPLES:

(1 - pt(1.96, 12))*2 # two-tailed p-value for t with 12 df