在R中各种概率函数都有统一的形式,即一套统一的 前缀+分布函数名(参数):
d:密度函数(density)
p:分布函数(生成相应分布的累积概率密度函数)
q:分位数函数,能够返回特定分布的分位数(quantile)
r:随机函数,生成特定分布的随机数(random)
连续型
| 名称 | 英文名 | R对应的函数 | 参数 |
| 高斯分布 | gaussian | norm | n, mean=0, sd=1 |
| 指数分布 | exponential | exp | n, rate=1 |
| 伽玛分布(γ) | gamma | gamma | n, shape, scale=1 |
| 韦氏分布 | Weibull | weibull | n, shape, scale=1 |
| 柯西分布 | Cauchy | cauchy | n, location=0, scale=1 |
| β分布 | beta | beta | n, shape1, shape2 |
| t分布 | Student‘s t | t | n, df |
| F分布 | F | f | n, df1, df2 |
| 卡方分布 | chi-squared | chisq | n, df |
| Logistic 分布 | Logistic | logis | n, location=0, scale=1 |
| 对数正态分布 | log-normal | lnorm | n, meanlog=0, sdlog=1 |
| 均匀分布 | uniform | unif | n, min=0, max=1 |
离散型
| 名称 | 英文名 | R对应的函数 | 参数 |
| 泊松分布 | Poisson | pois | n, lambda |
| 二项分布 | binomail | binom | n, size, prob |
| 多项分布 | multinomial | multinom | n, size, prob |
| 几何分布 | geometric | geom | n, prob |
| 超几何分布 | hypergeometric | hyper | nn, m, n, k |
| 负二项分布 | negative binomial | nbinom | n, size, prob |
原文:https://www.cnblogs.com/ykit/p/12496285.html