Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 286

8.4. Distributions

Оглавление

R is a statistical language and most of thework in R will include statistics. Therefore we introduce the reader to how statistical distributions are implemented in R and how they can be used.

The names of the functions related to statistical distributions in R are composed of two sections: the first letter refers to the function (in the following) and the remainder is the distribution name.

 d: The pdf (probability density function)

 p: The cdf (cumulative probability density function)

 q: The quantile function

 r: The random number generator.

pdf

probability density function

cdf

cumulative density function

quantile function

random

distribution – normal

distribution – exponential

distribution – log-normal

distribution – logistic

distribution – geometric

distribution – Poisson

distribution – t

distribution – f

distribution – beta

distribution – weibull

distribution – binomial

distribution – negative

binomial

distribution – chi-squared

distribution – uniform

distribution – gamma

distribution – cauchy

distribution – hypergeometric

Table 8.1: Common distributions and their names in R.

Distribution R-name Distribution R-name
Normal norm Weibull weibull
Exponential exp Binomial binom
Log-normal lnorm Negative binomial nbinom
Logistic logis χ 2 chisq
Geometric geom Uniform unif
Poisson pois Gamma gamma
t t Cauchy cauchy
f f Hypergeometric hyper
Beta beta

As all distributions work in a very similar way, we use the normal distribution to show how the logic works.

The Big R-Book

Подняться наверх