qbinom function

This function returns the value of the inverse cumulative density function (cdf) of the binomial distribution given a certain random variable q, number of trials (size), and probability of success on each trial (prob). And with the use of this function, we can find out the pth quantile of the binomial distribution.

Syntax: qbinom(q, size, prob)

Parameters:

  • x: a vector of numbers.
  • size: the number of trials.
  • prob: the probability of success of each trial.

Example 1:

Under this example, we are using the qbinorm function to get the 19th quantile of a binomial distribution with 30 trials with the prob of success to 0.6.

R




qbinom(.19, size=30, prob=.6)


Output:

[1] 16

A Guide to dbinom, pbinom, qbinom, and rbinom in R

In this article, we will be looking at a guide to the dbinom, pbinom, qbinom, and rbinom methods of the binomial distribution in the R programming language.

Similar Reads

dbinom function

This function returns the value of the probability density function (pdf) of the binomial distribution given a certain random variable x, number of trials (size), and probability of success on each trial (prob)....

pbinom function

...

qbinom function

...

rbinom function

This function returns the value of the cumulative density function (cdf) of the binomial distribution given a certain random variable q, number of trials (size), and probability of success on each trial (prob)....