Ruby commands Flashcards
ddist(x, pars)
density function
gives the z-score for x
pdist(u, pars)
cumulative distribution/probability function
gives the area under the curve and thus a probability
qdist(alpha, pars)
alpha-quantile
also:
gives the value q such that pdist(q, par) = alpha
rdist(size, pars)
Gives random samples from the dist with parameter par
Distributions in Ruby
norm
binom
pois
unif
mean(x)
Calculate the mean of X
var(x)
Calculate the variance of X
med(x)
Calculate the median of X
sd(x)
Calculate the standard deviation of X
quantile(x,a)
Calculate the a’th quantile of X
summary(x)
Gives several summarizing calculations of X
range(x)
Returns the min and max value of X
edcf(x)
Returns the empirical/cumulative distribution function of X