Binomial Distribution
Data Science and A.I. Lecture Series
By Bindeshwar Singh Kushwaha | PostNetwork Academy
Binomial Probability Function
The binomial probability function is given by:
\[ P(X = k) = \binom{n}{k} p^k (1 – p)^{n – k} \]
where:
- \( n \) = total number of trials
- \( k \) = number of successes
- \( p \) = probability of success in each trial
- \( \binom{n}{k} = \frac{n!}{k!(n-k)!} \) is the binomial coefficient
Example Calculation
Suppose we have a fair coin (\( p = 0.5 \)) and flip it 3 times. What is the probability of getting exactly 2 heads?
-
- \( n = 3 \), \( k = 2 \), \( p = 0.5 \)
- Compute binomial coefficient:
\[ \binom{3}{2} = \frac{3!}{2!(3-2)!} = 3 \]
\[ P(X = 2) = 3 \times (0.5)^2 \times (0.5)^1 \]
\[ P(X = 2) = 3 \times 0.25 \times 0.5 = 0.375 \]
Example: Probability of Heads in Coin Tosses
An unbiased coin is tossed six times. Find the probability of:
- Exactly 3 heads
- Less than 3 heads
- More than 3 heads
- At most 3 heads
- At least 3 heads
- More than 6 heads
Solution
Given:
- Number of trials: \( n = 6 \)
- Probability of success (head): \( p = \frac{1}{2} \)
- Probability of failure: \( q = 1 – p = \frac{1}{2} \)
By binomial distribution:
\[ P(X = x) = \binom{6}{x} p^x q^{6-x} \]
Reach PostNetwork Academy
Thank You!