rst {lazy.stat}R Documentation

t Random Numbers

Description

t Random Numbers

Usage

rst(n, df, m = 0, c = NULL, sd = 1)

Arguments

n

# of random numbers to be generated

df

The degrees of freedom

m

The mean

c

The scale parameter or NULL

sd

The standard deviation

Details

#' X ~ t( df, c ) means that
X / sqrt(c) ~ t( df )

If Y ~ t( df ) then Y * sqrt(c) ~ t( df, c )

variance of t( df ) = df/(df-2)
variance of t( df, c ) = c * df/(df-2)

Value

vector of length n

Examples

x <- rst( 10000, 9, sd=1 )
Print( mean(x), var(x), sqrt(var(x)) )

[Package lazy.stat version 0.1.4 Index]