What is the difference between qbinom and pbinom in R? [closed]

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

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

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$.