Binomial Distribution
Binomial Distribution is a probability distribution used to model the number of
successes in a fixed number of independent trials, where each trial has only two
possible outcomes: success or failure. This distribution is useful for calculating
the probability of a specific number of successes in scenarios like flipping coins,
quality control, or survey predictions.
Example: Imagine we toss a coin 5 times. Each toss can only give us a head or a
tail, and the chance of getting a head stays the same every time. Also, what
happens in one toss doesn’t affect the next one. Now, if we want to know the
chance of getting exactly 3 heads out of these 5 tosses, this is a situation where we
use the binomial distribution.
Binomial Distribution is based on Bernoulli trials, where each trial has an
independent and identical chance of success.
Binomial Distribution Formula
The Binomial Distribution Formula, which is used to calculate the probability,
for a random variable X = 0, 1, 2, 3,....,n is given as
P(X = r) = nCr pr (1-p) n-r, r = 0, 1, 2, 3....
Where,
n = Total number of trials
r = Number of successes
p = Probability of success
Example : A fair coin is tossed 3 times. Find the probability of getting exactly
2 heads.
Solution :
Number of trials, n = 3
Probability of getting head (success), p = 0.5 ; Probability of getting tail (failure),
q = 1 − p = 0.5
Required number of successes, r = 2
P(X = r) = nCr pr (1-p) n-r
P(X = 2) = 3C2 (0.5) 2 (0.5) 1 = 3 x 0.25 x 0.5 = 0.375 or 37.5 %
Multinomial Distribution
The multinomial distribution in R describes the probability of obtaining a specific
combination of outcomes when conducting multiple trials with more than two
possible outcomes. Each trial results in exactly one of several outcomes, and the
number of outcomes is fixed.
Let us consider an example where the random variable Y has a multinomial
distribution. Then, we can calculate the probability that outcome 1 occurs exactly
y1 times, outcome 2 occurs exactly y2 times, the outcome 3 occurs exactly y3 times
can be found with the help of the below formula.
Probability = n! * (p1 y1 * p2y2 * … * pkyk) / (y1! * y2! … * yk!)
Here,
n: It represents the total number of events
y1: It signifies that the number of times the outcome 1 will take place
y2: It signifies that the number of times the outcome 2 will take place
yk: It signifies that the number of times the outcome k will take place
p1: It represents the probability of the outcome 1 occurs for a given trial
p2: It represents the probability of the outcome 1 occurs for a given trial
pk: It represents the probability of the outcome k occurs for a given trial
Bernoulli Trials in Binomial Distribution
Bernoulli Trial are a sequence of independent experiments, where each experiment
(or trial) results in exactly two possible outcomes:
Success (with probability p)
Failure (with probability 1−p)
A random experiment is called Bernoulli Trial if it satisfies the following
conditions:
Trials are finite in number
Trials are independent of each other
Each trial has only two possible outcomes
The probability of success and failure in each trial is the same.
The binomial distribution models the number of successes in a fixed number of
Bernoulli trials.
Binomial Mean and Standard Deviation
Consider the case of tossing a coin n times, the probability of getting exactly x no.
of heads /tails can be calculated using the binomial distribution. If in the same case
tossing of a coin is performed only once it is the same as Bernoulli distribution.
A random variable X which takes values 1,2,.....n is said to follow binomial
distribution if its probability distribution function is given by
P(X = r) = nCr pr qn-r
Where,
r = 0, 1,2......, n, where p, q>0 such that p+q=1
p = probability of success of an event
q = probability of failure of an event
Mean or Expected value of binomial distribution
The mean of the binomial distribution is the same as the average of anything else
which is equal to the submission of the product of no. of success and probability at
each success.
Mean = ∑r r. P(r)
= ∑r r nCr pr qn-r
= ∑r r n/r n-1Cr-1 [Link]-1 qn-r [as nCr= n/r n-1Cr-1]
= np ∑r n-1Cr-1 pr-1 q(n-1)-(r-1)
= np(q+p)n-1 [by binomial theorem i.e. (a+b)n = ∑k=0 nCk an bn-k
]
=np [as p+q=1]
Therefore, Mean=np
Mode of binomial distribution
For a binomial distribution X∼B(n,p)X \sim B(n, p)X∼B(n,p), the mode (the
value of XXX with the highest probability) is given by:
Mode=[(n+1)p]
More precisely:
If (n+1)p is not an integer, then the mode is:
Mode=⌊(n+1)p⌋
If (n+1)p is an integer, then there are two modes:
Mode=(n+1)p and (n+1)p−1
Where:
n = number of trials
p = probability of success
⌊⋅⌋ = greatest integer (floor function)
Example:
If n=10, p =0.5:
(n+1)p=11×0.5=5.5
Mode = ⌊5.5⌋=5