binomci: Binomial distribution Confidence Interval

Description Usage Arguments Value References Examples

Description

This function iteratively solves for the upper and lower confidence interval bounds for the probaility of success for a binomial sample.

Usage

1
binomci(s, n, theta1, theta2, value, maxstp = 100, eps = 1e-05)

Arguments

s

an integer the number of successes

n

an integer the the number of trials (zero or more)

theta1

a number, the lower bracket probability of success for each trial

theta2

a floading point number, the upper bracket probability of success for each trial, must be larger than theta1

value

a number, the target distribution function

maxstp

an integer default is 100, the amount of times the solution is narrowed down

eps

a number default is .00001, the smallest difference in theta1 and theta2

Value

a list with solution and valatsol (value at solution)

solution a number, the actual confidence interval

valatsol a number, the actual distribution function the solution is found at

References

Hogg, R. McKean, J. Craig, A. (2018) Introduction to Mathematical Statistics, 8th Ed. Boston: Pearson.

Examples

1
2
3
4
5
6
s <- 17
n <- 30
theta1 <- .4
theta2 <- .45
value <- .95
binomci(s, n, theta1, theta2, value)

austinragotzy/mathstat documentation built on May 13, 2019, 11:30 a.m.