1
$\begingroup$

The documentation of binomial functions everywhere is very unclear. Can someone please answer with examples?

$\endgroup$
2
  • 3
    $\begingroup$ Can you explain what is unclear in the documentation? You shouldn't blame documentation if you lack background knowledge. $\endgroup$ – Roland Dec 12 '16 at 7:36
  • 1
    $\begingroup$ If you don't like R documentation this is not the place to complain! $\endgroup$ – kjetil b halvorsen Dec 12 '16 at 8:26
1
$\begingroup$

From the doc:

dbinom gives the density, pbinom gives the distribution function, qbinom gives the quantile function and rbinom generates random deviates.

The quantile is defined as the smallest value x such that F(x) ≥ p, where F is the distribution function.


There exist similar functions for other distributions. E.g., dnorm, pnorm, qnorm, rnorm; or dbeta, pbeta, qbeta, rbeta.


$X \sim \text{Binom}(n, p)$

pbinom(q = x, size = n, prob = p) returns $\Pr(X \leq x)$.

qbinom(p = x, size = n, prob = p), with $x \in [0, 1]$, returns the smallest value of $q$ such that $\Pr(X \leq q) \geq x$.

$\endgroup$
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.