dt(x, df, log=F) pt(q, df) qt(p, df) rt(n, df, bigdata=F)
bdVector
of quantiles.
Missing values (
NA
s) are allowed.
bdVector
of quantiles.
Missing values (
NA
s) are allowed.
bdVector
of probabilities.
Missing values (
NA
s) are allowed.
length(n)
is larger than 1, then
length(n)
random values are returned.
bdVector
of degrees of freedom.
This is replicated to be the same length as
p
or
q
or the number of
deviates generated.
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.
TRUE
,
dt
will return
the log of the density, not the density itself.
dt
),
probability (
pt
),
quantile (
qt
), or
random sample (
rt
)
for Student's
t-distribution on
df
degrees of freedom.
rt
causes creation of the dataset
.Random.seed
if it does
not already exist, otherwise its value is updated.
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
.
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.
Johnson, N. L. and Kotz, S. (1970). Continuous Univariate Distributions, vol. 2. Houghton-Mifflin, Boston.
(1 - pt(1.96, 12))*2 # two-tailed p-value for t with 12 df