# Binomial Distribution Animation

## Introduction

This animation demonstrates the binomial distribution for a test consisting of multiple-choice questions, with the person being tested having absolutely no information about which answer is correct when trying to answer each question. Some examples of this situation are:

- Rolling a gambling die
- Flipping a coin
- Testing for psychic ability

The number of questions (Q) and the number of wrong answers (W) for each question can be changed. Each question has one right answer, so the total number of answers (A) for each question is W+1.

Since the person being tested does not know which answer is correct, each answer has an equal chance of being right, which that probability P equal to 1/A (since there is one right answer out of A answers). Each answer also has an equal chance W/A of being wrong (since there are W wrong answers out of A answers), and W/A=(A-1)/A=1-P. When the right answer is selected for a question, the blue dot follows a green path. The blue dot follows a red path for a wrong answer.

## The Simulation

For each question, an answer is randomly picked and the blue dot follows a red path if the pick was wrong or the green path if the pick was correct. After all of the questions for each test are answered, the test score is added to the histogram plot underneath and a new test is started. The predicted test scores are plotted for comparison.

Number of questions per test: | |

Number of wrong answers per question: | |

Speed: |

## What Are The Probabilities?

The chances of getting a particular number of right answers R in a test with N questions can be calculated using:

[1]

where P=1/A is the probability of a correct guess.

The N and R in the first parentheses of equation [1] gives the number of ways of getting R right answers from N questions, in an expression called the binomial coefficient (this is a function rather than a fraction even though they may look similar). You can count the number of ways of following paths to get to a specific number of right answers, but it is often easier to compute the binomial coefficient with the following equations, with the '!' symbol representing the factorial function.

[2]

The (1-P)^{N-R} part of equation [1] represents the probability of
getting N-R wrong answers. The (P)^{R} part in equation [1] represents
the probability of getting R right answers. The sum of N-R wrong answers and R right answers is always
the total number of answers N.

Some sample probabilities are given for N=5, W=4 (these apply to the Am I Psychic? page):

[3]