Binomial Probabilities

Description

To use R in a Sage cell, the language must be set to R. See https://github.com/sagemath/sagecell/blob/master/doc/embedding.rst for details.

Here, we will calculate the probability of 2 successes in a binomial distribution of 10 trials with a probability of success of .05 using the dbinom command

Sage Cell

Code

dbinom(x=2, size=10, prob=0.05)

Options

Cumulative Probabilities

Using the pbinom command we can calculate the probability of any one of a set of successes. Given q successes in n trials, we may calculate the probability of q or fewer successes by setting lower.tail to TRUE or q or more successes by setting lower.tail to FALSE. The default value of lower.tail is TRUE

Code

pbinom(q=2, size=10, prob=0.30, lower.tail=TRUE)
pbinom(q=4, size=10, prob=0.30, lower.tail=FALSE)

Tags

Primary Tags:

Secondary Tags:

A list of possible tags can be found at The WeBWorK Open Problem Library. For linear algebra tags see the Curated Courses Project.

Related Cells

Any related cells go here. Provide a link to the page containing the information about the cell.

Attribute

Permalink:

Author:

Date: 16 Apr 2019 02:02

Submitted by: Zane Corbiere

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License