umpu.binom: UMPU Test for the Binomial Distribution In ump: Uniformly Most Powerful Tests

Description

Calculate the uniformly most powerful unbiased (UMPU) two-tailed test for the binomial distribution.

Usage

 `1` ```umpu.binom(x, n, p, alpha, maxiter = 10, tol = 1e-9) ```

Arguments

 `x` binomial observations. `n` number of observations. `p` the success probability under the null hypothesis. `alpha` the significance level. `maxiter` the maximum number of iterations allowed. `tol` tolerance used in testing floating point numbers.

Details

At most one of `x`, `p`, and `alpha` is allowed to be a vector. Evaluates the critical function for the UMPU two-tailed test for the binomial distribution, which satisfies the following

 ```1 2 3 4 5 6``` ``` x <- seq(0, n) phix <- umpu.binom(x, n, p, alpha) px <- dbinom(x, n, p) sum(phix * px) == alpha sum(x * phix * px) == n * p * alpha ```

when `p` is strictly between zero and one.

Value

a vector of values of the critical function.

Examples

 ```1 2``` ```library(ump) umpu.binom(0:10, 10, 0.6, 0.1) ```

Example output

``` [1] 1.00000000 1.00000000 1.00000000 0.83289497 0.00000000 0.00000000
[7] 0.00000000 0.00000000 0.04942615 1.00000000 1.00000000
```

ump documentation built on May 1, 2019, 11:10 p.m.