Binomial and Poisson’s distribution using R Studio
Method Name | Documentation |
---|---|
Binomial and Poisson’s distribution using R Studio | Computes the PMF for the binomial distribution. |
Binomial and Poisson’s distribution using R Studio | Computes the CDF for the binomial distribution. |
Binomial and Poisson’s distribution using R Studio | Computes the quantile function for the binomial distribution. |
Binomial and Poisson’s distribution using R Studio | Computes the PMF for the Poisson distribution. |
Binomial and Poisson’s distribution using R Studio | Computes the CDF for the Poisson distribution. |
Binomial and Poisson’s distribution using R Studio | Computes the quantile function for the Poisson distribution. |
R Function Documentation
dbinom()
Description: Computes the probability mass function (PMF) for the binomial distribution.
Usage:
dbinom(x, size, prob, log = FALSE)
Arguments:
x
(integer): Number of successes.size
(integer): Total number of trials.prob
(numeric): Probability of success per trial.log
(logical, default = FALSE): IfTRUE
, returns the log probability.
Example:
dbinom(48, 51, 0.5)
pbinom()
Description: Computes the cumulative distribution function (CDF) for the binomial distribution.
Usage:
pbinom(q, size, prob, lower.tail = TRUE, log.p = FALSE)
Arguments:
q
(integer): Number of successes.size
(integer): Total number of trials.prob
(numeric): Probability of success per trial.lower.tail
(logical, default = TRUE): IfTRUE
, returns P(X ≤ q); ifFALSE
, returns P(X > q).log.p
(logical, default = FALSE): IfTRUE
, returns the log probability.
Example:
pbinom(40, 51, 0.5)
qbinom()
Description: Computes the quantile function (inverse CDF) for the binomial distribution.
Usage:
qbinom(p, size, prob, lower.tail = TRUE, log.p = FALSE)
Arguments:
p
(numeric): Cumulative probability.size
(integer): Total number of trials.prob
(numeric): Probability of success per trial.lower.tail
(logical, default = TRUE): IfTRUE
, returns smallest x such that P(X ≤ x) ≥ p.log.p
(logical, default = FALSE): IfTRUE
, returns log probability.
Example:
qbinom(0.25, 51, 0.5)
dpois()
Description: Computes the probability mass function (PMF) for the Poisson distribution.
Usage:
dpois(x, lambda, log = FALSE)
Example:
dpois(3, 7.6)
ppois()
Description: Computes the cumulative distribution function (CDF) for the Poisson distribution.
Usage:
ppois(q, lambda, lower.tail = TRUE, log.p = FALSE)
Example:
ppois(3, 7.6)
qpois()
Description: Computes the quantile function for the Poisson distribution.
Usage:
qpois(p, lambda, lower.tail = TRUE, log.p = FALSE)
Example:
qpois(0.25, 7.6)
References
Information
- date: 2025.02.18
- time: 16:07