

TDist {base}                                 R Documentation

_T_h_e _S_t_u_d_e_n_t _t _D_i_s_t_r_i_b_u_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n_:

     These functions provide information about the t distri-
     bution with `df' degrees of freedom (and optional non-
     centrality parameter `ncp').  `dt' gives the density,
     `pt' gives the distribution function, `qt' gives the
     quantile function and `rt' generates random deviates.

_U_s_a_g_e_:

     dt(x, df)
     pt(q, df, ncp=0)
     qt(p, df)
     rt(n, df)

_A_r_g_u_m_e_n_t_s_:

     x,q: vector of quantiles.

       p: vector of probabilities.

       n: number of observations to generate.

      df: degrees of freedom (> 0, maybe non-integer).

     ncp: non-centrality parameter delta; currently `ncp <=
          37.62'.

_D_e_t_a_i_l_s_:

     The t distribution with `df' = n degrees of freedom has
     density

          f(x) = Gamma((n+1)/2) / (sqrt(n pi) Gamma(n/2)) (1 + x^2/n)^-((n+1)/2)

     for all real x.  It has mean 0 (for n > 1) and variance
     n/(n-2) (for n > 2).

     The general non-central t with parameters (df,Del) `=
     (df, ncp)' is defined as a the distribution of
     T(df,Del) := (U + Del) / (Chi(df) / sqrt(df)) where U
     and Chi(df)  are independent random variables, U ~
     N(0,1), and Chi(df)^2 is chi-squared, see `pchisq'.

     The most used applications are power calculations for
     t-tests:
     Let T= (mX - m0) / (S/sqrt(n)) where mX is the `mean'
     and S the sample standard deviation (`sd') of
     X_1,X_2,...,X_n which are i.i.d.  N(mu,sigma^2).  Then
     T is distributed as non-centrally t with `df'= n-1
     degrees of freedom and non-centrality parameter `ncp'=
     mu - m0.

_R_e_f_e_r_e_n_c_e_s_:

     Lenth, R. V. (1989). Algorithm AS 243 - Cumulative dis-
     tribution function of the non-central t distribution,
     Appl. Statist. 38, 185-189.

_S_e_e _A_l_s_o_:

     `df' for the F distribution.

_E_x_a_m_p_l_e_s_:

     1 - pt(1:5, df = 1)
     qt(.975, df = c(1:10,20,50,100,1000))

     tt <- seq(0,10, len=21)
     ncp <- seq(0,6, len=31)
     ptn <- outer(tt,ncp, function(t,d) pt(t, df = 3, ncp=d))
     image(tt,ncp,ptn, zlim=c(0,1),main=t.tit <- "Non-central t - Probabilities")
     persp(tt,ncp,ptn, zlim=0:1, r=2, phi=20, theta=200, main=t.tit)

