dst {lazy.stat} R Documentation

## t distribution

t distribution

### Usage

```dst(x, df, m = 0, c2 = 1, sd = 0)

pst(x, df, m = 0, c2 = 1, sd = 0)

qst(p, df, m = 0, c2 = 1, sd = 0)
```

### Arguments

 `x, ` q vector of quantiles. `df` The degrees of freedom `m` The mean `c2` The scale parameter or NULL `sd` The standard deviation: This has priority over c2. `p` vector of probabilities. `n` # of random numbers to be generated.

### Details

X ~ t( df, m, c2 ) means that
(X-m) / sqrt(c2) ~ t( df, m=0, c2=1 )

If Y ~ t( df ) then Y * sqrt(c2) + m ~ t( df, m, c2 )

variance of t( df, m=0, c2=1 ) = df/(df-2)
variance of t( df, m, c2 ) = c2 * df/(df-2)

### Value

rst returns the vector of length n.
Other functions return the vector of length length(x) or length(p)

### Examples

```df <- 10
m <- 1
c2 <- 4
var <- df/(df-2)*c2
x <- seq(-4,6,length.out=31)

pdft <- dst( x, df, m, c2 )
pdfn <- dnorm( x, m, sqrt(var) )
matplot(x, cbind(pdft,pdfn), type <- "l")

pn <- pnorm( x, m, sqrt(var) )
p <- pst( x, df, m, c2 )
q <- qst( p, df, m, c2 )
Print( x, pn, p, q )

```

[Package lazy.stat version 0.1.3 Index]