Description Usage Arguments Details Value Examples
View source: R/negativebinomial.R
plotNegBinom
represents the probability mass and/or the distribution function associated with a Negative Binomial
distribution with certain parameters n
and p
.
1 | plotNegBinom(n, p, type = "b", col = "grey")
|
n |
the number of successful Bernoulli trials. |
p |
the probability of success associated with the Bernoulli trial. |
type |
a character string giving the type of desired plot. The following values are possible: "b" (default) for probability mass function and distribution function representations together, "d" for distribution function representation and "p" for probability mass function representation. |
col |
a single colour associated with the probability mass function representation; default to "grey". |
Note that if n=1
, the Negative Binomial distribution is also known as Geometric distribution.
A matrix containing the probability mass and the distribution function associated with each point
of the support of a Negative Binomial distribution with parameters n
and p
.
1 2 3 4 | n=3;p=0.3
plotNegBinom(n,p,type="d")
plotNegBinom(n,p,type="p",col="pink")
plotNegBinom(n,p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.