rbt | R Documentation |
In short, an RBT rejects borderline cases with \gamma probability. Whereas tests on binomial data as performed with Clopper-Pearson intervals or Wilson Score intervals usually have test size < nominal significance \alpha level, an RBT will be guaranteed to always have theoretical size == \alpha.
rbt(x, n, p_h0, alpha = 0.05, requirement_type = "gt")
x |
observed count |
n |
total count |
p_h0 |
probability under the null hypothesis |
alpha |
defaults to .05 |
requirement_type |
form of alternative hypothesis, defaults to "gt" |
Further detail can be found on: http://nicksun.fun/statistics/2020/11/16/sawtooth-power-curves.html
The purpose of the rbt() function is to provide a comparison against Wilson and Clopper-Pearson based testing.
list containing rejection bound, rejection region, gamma probability, and outcome of RBT
output <- vector(length=100, mode="numeric") for (i in 1:100) { output[i] <- rbt(x=7, n=100, alpha=.05, requirement_type="gt") } mean(output) # should be about .526
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.