Description Usage Arguments Value Author(s) Examples
Calculates the percentile interval for the probability parameter underlying a binomially distributed outcome.
| 1 | binomial_pi(n_successes, n_trials, prob, prior_shape1 = 1, prior_shape2 = 1)
 | 
| n_successes | The number of successes. | 
| n_trials | The total number of trials. | 
| prob | The size of the percentile interval with 0 <= prob <= 1. | 
| prior_shape1 | The shape1 parameter of the Beta distribution defining the prior. The default values shape1=1 and shape2=1 define a flat prior assigning equal probability density to all possible parameter values. | 
| prior_shape2 | The shape2 parameter of the Beta distribution defining the prior. The default values shape1=1 and shape2=1 define a flat prior assigning equal probability density to all possible parameter values. | 
A vector containing the endpoints of the percentile interval.
Titus von der Malsburg <malsburg@uni-potsdam.de>
| 1 2 3 4 5 6 7 8 | # 6/9 successes with flat prior:
binomial_pi(6, 9, 0.8)
# 6/9 successes with prior assuming one prior success and one failure:
binomial_pi(6, 9, 0.8, 2, 2)
# Equivalently:
binomial_pi(7, 11, 0.8)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.