dpolya | R Documentation |
The multivariate Polya distribution, also known as the Dirichlet multinomial compound distribution, gives the probability of selecting n_k objects in each of K categories, when the probability of selecting an object from each category is given by a Dirichlet distribution with parameter α_k:
P(\mathbf{n};\boldsymbol{α}) = \frac{N!}{∏_k{n_k!}} \frac{Γ(A)}{∏_k{Γ(α_k)}} \frac{∏_k{Γ(α_k + n_k)}}{Γ(A + N)},
where N = ∑_k n_k and A = ∑_k α_k.
dpolya(x, alphas, log = TRUE)
x |
A vector of integers representing the number of times each outcome was observed. The length must match that of alphas. |
alphas |
Parameters of the Dirichlet distribution |
log |
If TRUE, return the natural logarithm |
Multivariate Polya probability mass function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.