# binomTestMSE: RMSE-Minimizing Confidence Intervals for Binomial Proportions In conf: Visualization and Analysis of Statistical Measures of Confidence

## Description

Generates lower and upper confidence interval limits for a binomial proportion that minimizes the root mean square error (RMSE) of the actual coverage function.

## Usage

 ```1 2 3 4 5``` ``` binomTestMSE(n, x, alpha = 0.05, smooth = 1, showRMSE = TRUE, showAll = FALSE) ```

## Arguments

 `n` sample size `x` number of successes `alpha` significance level for confidence interval `smooth` smoothness index `showRMSE` a logical variable indicating whether to show the value of RSME `showAll` a logical variable indicating whether to show confidence intervals of all possible number of successes

## Details

Generates lower and upper confidence interval limits for a binomial proportion for

• various sample sizes,

• various numbers of successes.

When the `binomTestMSE` function is called, it returns a two-element vector in which

• the first element is the lower bound of the RMSE-minimizing confidence interval, and

• the second element is the upper bound of the RMSE-minimizing confidence interval.

An RMSE-minimizing two-sided 100 * (1 - alpha) percent confidence interval for p is constructed from a random sample of size n from a Bernoulli(p) population. The parameter `x` gives the number of successes in the n mutually independent Bernoulli trials. For n <= 15, all possible jumps between acceptance curves associated with the actual coverage function are enumerated based on their one-to-one relationship with the symmetric Dyck paths. For each sequence of jumps between acceptance curves, the confidence interval bounds that are returned are associated with discontinuities in the actual coverage function that together result in the lowest possible RMSE. A set of smoothness constraints that build on four existing non-conservative confidence intervals (Wilson-score, Jeffreys, Arcsine, and Agresti-Coull) is used if the smoothness index `smooth` is set to one. These constraints ensure that the RMSE-confidence interval achieves smoothness, a preferable property of the binomial confidence interval that is related to lower bound differences for adjacent values of `x`. There is a trade-off between the RMSE and the smoothness. For n > 100, smoothness is required. The RMSE usually increases if the smoothness constraints are used. For n > 15, only the symmetric Dyck paths associated with the Wilsonâ€“score, Jeffreys, Arcsine, and Agrestiâ€“Coull confidence interval procedures are used instead of enumerating because the computation time increases in a factorial fashion in n. The minimal RMSE is not guaranteed for n > 15 because another symmetric Dyck path other than those associated with the four existing confidence interval procedures might prove to be optimal. However, this procedure does ensure a lower RMSE than any of the four existing confidence intervals for all n.

## Author(s)

Kexin Feng (kfeng01@email.wm.edu), Larry Leemis (leemis@math.wm.edu), Heather Sasinowska (hdsasinowska@wm.edu)

## Examples

 `1` ``` binomTestMSE(10, 3) ```

conf documentation built on Aug. 24, 2020, 5:08 p.m.