Two-Sided Binomial Test

An Online Binomial Test Calculator

Posted by Daniel Schmidtke on Sunday, October 11, 2020

About the Binomial Test and this blog

The Binomial Test is used in statistics to test for deviations of your observed results from a theoretically expected distribution of observations. It can be used if an experiment has only two possible outcomes (i.e. success/failure) and if there is a reasonable expectation for the probability of success. In summary, the Binomial Test has the following assumptions:

  • nominal, dichotomous, independent items
  • sample size << population size
  • sample = representation of the population

With the Shiny app below, you can calculate two-sided Binomial Test statistics and the results are summarized in a short text output. As a small bonus, the app also visualizes your observed success rate within the probability distribution.


Please note that access to the Shiny server is limited to 25 hours per month. If the Binomial Test calculator does not display, please run it locally on your computer using R and following the instructions below.

Running the calculator locally in R

Make sure that you have R and the following R packages installed on your computer and loaded in your R session:

shiny, shinyWidgets, shinyjs

You can install and load the R packages from the R console using the following lines of code:

# Install packages from the R console via:
install.packages("shiny")
install.packages("shinyWidgets")
install.packages("shinyjs")

# Load packages from the R console via:
library(shiny)
library(shinyWidgets)
library(shinyjs)

Once you have installed and loaded all the packages, you can start the app from the R console using:

runGitHub("BinomialTest", "DaSchmidtke")

Downloading the source code from GitHub

Alternatively, you can download the simulation/Shiny app directly from my GitHub repository.