Statistics, Data Science, R Programming, Programming, Machine Learning.
k = 2 and n > 1, it is the binomial distribution. When k > 2 and n = 1, it is the categorical distribution. When k > 2 and n > 1, it is termed as multinomial distribution. Code: We use dmultinom(x, size, prob, log = FALSE) x= vector of length K of integers in 0:size size= total number of trials.