binom: Binomial Distribution Calculations

View source: R/binom.R

binomR Documentation

Binomial Distribution Calculations

Description

This function allows to compute quantities relating to binomial distributions and visualize the results clearly.

Usage

binom()

Examples


> binom()
How many trials are there in your binomial experiment? 13
What is the chance of success on one trial of your binomial experiment? 0.3
How many successes are you interested in? 4
Are you looking for the probability of getting more than this value, less than this value, exactly this value, or between this value and another value? Possible answers are 'less', 'more', 'exactly', and 'between'. less
The probability of getting less than 4 successes in 13 trials with probability of success 0.3 each time is 0.420605645761.

You can get this result by typing:
  pbinom(4-1,13,0.3)


> binom()
How many trials are there in your binomial experiment? 15
What is the chance of success on one trial of your binomial experiment? .4
How many successes are you interested in? 8
Are you looking for the probability of getting more than this value, less than this value, exactly this value, or between this value and another value? Possible answers are 'less', 'more', 'exactly', and 'between'. more
The probability of getting more than 8 successes in 15 trials with probability of success 0.4 each time is 0.0950474081566721.

You can get this result by typing:
  1-pbinom(8,15,0.4)


> binom()
How many trials are there in your binomial experiment? 12
What is the chance of success on one trial of your binomial experiment? 0.8
How many successes are you interested in? 9
Are you looking for the probability of getting more than this value, less than this value, exactly this value, or between this value and another value? Possible answers are 'less', 'more', 'exactly', and 'between'. exactly
The probability of getting exactly 9 successes in 12 trials with probability of success 0.8 each time is 0.23622320128.

You can get this result by typing:
  dbinom(9,12,0.8)


> binom()
How many trials are there in your binomial experiment? 16
What is the chance of success on one trial of your binomial experiment? 0.6
How many successes are you interested in? 10
Are you looking for the probability of getting more than this value, less than this value, exactly this value, or between this value and another value? Possible answers are 'less', 'more', 'exactly', and 'between'. between
What is the other number of successes you are interested in? 14
The probability of getting between 10 and 14 successes in 16 trials with probability of success 0.6 each time is 0.523882818699263.

You can get this result by typing:
  pbinom(14,16,0.6)-pbinom(10-1,16,0.6)

jrpriceUPS/Math160UPS documentation built on April 28, 2024, 12:41 p.m.