Description Usage Arguments Value Examples
View source: R/bin_probability.R
calculates probability of getting a certain number successes in the number of desired trials
1 | bin_probability(success, trials, prob)
|
success |
number of successes |
trials |
number of trials |
prob |
probability of success |
probability of getting the number of successes specified in the number of desired trials
1 2 3 4 5 6 7 8 | # probability of getting 2 successes in 5 trials
bin_probability(success = 2, trials = 5, prob = 0.5)
# probabilities of getting 2 or less successes in 5 trials
bin_probability(success = 0:2, trials = 5, prob = 0.5)
# 55 heads in 100 tosses of a loaded coin with 45% chance of heads
bin_probability(success = 55, trials = 100, prob = 0.45)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.