Skip to content

Instantly share code, notes, and snippets.

@lundquist-ecology-lab
Created December 27, 2022 01:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lundquist-ecology-lab/da7468115497e56a609c92afbb001e45 to your computer and use it in GitHub Desktop.
Save lundquist-ecology-lab/da7468115497e56a609c92afbb001e45 to your computer and use it in GitHub Desktop.
Running a binomial test in R
# Six-sided die flipped 24 times and lands on three exactly 6 times
binom.test(x = 6, n = 24, p = 1 / 6, alternative = "greater")
# Flip coin 30 times and it lands on heads exactly 19 times
binom.test(x = 19, n = 30, p = 1 / 2, alternative = "greater")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment