Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Binomial test
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Usage== A binomial test is a [[Statistical hypothesis testing|statistical hypothesis test]] used to determine whether the proportion of successes in a sample differs from an expected proportion in a binomial distribution. It is useful for situations when there are two possible outcomes (e.g., success/failure, yes/no, heads/tails), i.e., where repeated experiments produce [[binary data]]. If one assumes an underlying probability <math>\pi_0</math> between 0 and 1, the null hypothesis is : <math>H_0\colon\pi=\pi_0</math> For a sample of size <math>n</math>, we would expect <math>n\pi_0</math> successes. The formula of the [[binomial distribution]] gives the probability of those <math>n</math> samples instead producing <math>k</math> successes: : <math>\Pr(X=k)=\binom{n}{k}\pi_0^k(1-\pi_0)^{n-k}</math> Suppose that we want to test the alternative hypothesis : <math>H_{A}\colon\pi<\pi_0</math> i.e., we suspect that the actual probability of success is lower than <math>\pi_0</math>. Then our <math>p</math>-value would be computed using a one-tailed test; specifically, we compute the probability of seeing an outcome as extreme as, or more extreme (i.e., less likely), than <math>k</math>: : <math>p = \sum_{i=0}^k\Pr(X=i)=\sum_{i=0}^k\binom{n}{i}\pi_0^i(1-\pi_0)^{n-i}</math> An analogous computation can be done if we're testing if <math>\pi>\pi_0</math> using the summation of the range from <math>k</math> to <math>n</math> instead. Calculating a <math>p</math>-value for a two-tailed test is slightly more complicated, since a binomial distribution isn't symmetric if <math>\pi_0\neq 0.5</math>. This means that we can't just double the <math>p</math>-value from the one-tailed test. Recall that we want to consider events that are as extreme, or more extreme, than the one we've seen, so we should consider the probability that we would see an event that is as, or less, likely than <math>X=k</math>. Let <math>\mathcal{I}=\{i\colon\Pr(X=i)\leq \Pr(X=k)\}</math> denote all such events. Then the two-tailed <math>p</math>-value is calculated as, : <math>p = \sum_{i\in\mathcal{I}}\Pr(X=i)=\sum_{i\in\mathcal{I}}\binom{n}{i}\pi_0^i(1-\pi_0)^{n-i}</math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)