Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Bernoulli (Binomial) Trials

Image illustrating Bernoulli Trials


A Bernoulli trial is a random experiment of an independent trial with exactly two possible (yes/no) outcomes:

  • "Success", where P(success)=pP(\text{success})=p
  • "Failure", where P(failure)=1−pP(\text{failure})=1-p

Examples

  • Hit/Miss
  • Pass/Fail
  • Approve/Decline


Bernoulli formula


P(X=x)=px(1−p)1−x\displaystyle{\boxed{P(X\bm {=}x)=p^x(\bm 1\bm -p)^{1\bm -x}}}

where x=0,1x =0,1


Bernoulli Mean =p=p

Proof: E(X)=0(1−p)+1(p)=pE(X)=0(1-p)+1(p)=p



Bernoulli Variance =pq=pq

Proof:

Var(X)=(0)2(1−p)+(1)2(p)−(p)2Var(X)=\left(0\right)^2(1-p)+\left(1\right)^2(p)-(p)^2

=p−p2=p-p^2

=p(1−p)=p\left(1-p\right)

=pq=pq


Bernoulli Standard Deviation =pq=\sqrt{pq}

Proof: SD(X)=Var(X)=pqSD(X)=\sqrt{Var\left(X\right)}=\sqrt{pq}

When Ben asks a girl for her number, he gets it 20% of the time.








Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Binomial Experiment

Image illustrating Binomial Experiment


A binomial experiment has the following properties:

  1. There's a fixed number of trials. The number of trials is usually denoted by nn.
  2. Each trial is independent and repeated with the same conditions (i.e. probability doesn't change from trial to trial).
  3. Each trial is a Bernoulli trial (a.k.a. Binomial trial), which means that it has exactly two possible outcomes
  • "Success" → P(success)=pP(\text{success})=p
  • "Failure" → P(failure)=qP(\text{failure})=q where p+q=1\boxed{p+q=1} or q=1−pq=1-p


Examples

Determine if the following are binomial experiments:


1. Flipping a coin 10 times and seeing if a "Heads" or "Tails" appears → ________

There are 10 trials (flips): n=10n=10

Each flip is independent of one another.

Let "success" = flipping Heads, then P(success)=p=1/2P(success)=p=1/2.

Let "failure" = flipping Tails, then P(failure)=q=1/2P(failure)=q=1/2


2. Rolling a dice 12 times and seeing if the number is larger than 2 or less than or equal to 2 → ________

There are 12 trials (flips): n=12n=12

Each roll is independent of one another.

Let "success" = rolling a number larger than 2, then P(success)=p=4/6P(success)=p=4/6.

Let "failure" = rolling a number less than or equal to 2, then P(failure)=q=2/6P(failure)=q=2/6


3. Drawing a card 7 times from a standard 52-card deck without replacement and seeing if it's a "King" → ________

Each draw is NOT independent - as you draw cards from the deck, the total number of cards changes and the probability of drawing a "King" changes. *Note: this would be a binomial experiment if the cards are drawn with replacement.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Binomial Distribution

Let XX be a random variable that represents the number of successes in a binomial experiment where

  • there are nn total trials
  • the probability of success is pp
  • the probability of failure is q=1−pq=1-p

Then XX follows a binomial distribution (or binomial model), and we denote this by X∼Binomial(n, p)\boxed{X\sim \text{Binomial}(n,\ p)} or X∼B(n, p)\boxed{X\sim B(n,\ p)}.


The probability of obtaining exactly x\orange{x} successes is given by this formula:

P(X=x)=(nx) px qn−x\boxed{P\left(X=x\right)=\binom{n}{x}\ p^x\ q^{n-x}}

OR

P(X=x)=(nCx) px qn−x\boxed{P\left(X=x\right)=(_{n}C_{x})\ p^x\ q^{n-x}}




Probability Distribution Function (Table)

You can complete the probability distribution table using the formula for the number of successes of a binomial experiment:

xP(X=x)0(n0)p0qn−01(n1)p1qn−12(n2)p2qn−2⋮⋮n(nn)pnqn−n\begin{array}{c|c} x&P(X=x)\\ \hline 0& \displaystyle {n\choose0}p^0q^{n-0}\\ \\ 1& \displaystyle {n\choose1}p^1q^{n-1}\\ \\ 2& \displaystyle {n\choose2}p^2q^{n-2} \\ \vdots&\vdots \\ n& \displaystyle {n\choose n}p^nq^{n-n} \end{array}



Example


When Ben throws a stick to his old dog, Percy, he catches it 10% of the time.


(a) What is the probability of Percy catching a stick in one trial?


P(X=1)=(0.1)1(0.9)1−1=0.1=p →P(X=1)=(0.1)^1(0.9)^{1-1}=0.1=p\ \rightarrow probability of success


(b) What is the probability of Percy not catching a stick in one trial?


P(X=0)=(0.1)0(0.9)1−0=0.9=q →P(X=0)=(0.1)^0(0.9)^{1-0}=0.9=q\ \rightarrow probability of failure



(c) Let X=0X=0 for the value of failure (not catching the stick) and X=1X=1 for the value of success (catching the stick).


Image illustrating Binomial Distribution



Determine the probability distribution to find the mean, variance, and standard deviation of one trial (i.e. Bernoulli Trial).


Mean:

Also known as "expected value":

E(X)=μ=∑xi⋅P(xi)E(X) = \mu=\sum{x_i\cdot P(x_i)}

=0(0.9)+1(0.1)=0.1=p=0(0.9)+1(0.1)=0.1=p

Variance:


Var(X)=[∑xi2⋅P(xi)]−μ2Var(X)=[\sum x_i^2\cdot P(x_i)]-\mu^2

=02(0.9)+12(0.1)−(0.1)2=0+0.1−0.01=0.09=pq=0^2(0.9)+1^2(0.1)-(0.1)^2=0+0.1-0.01=0.09=pq


Standard deviation:


SD(X)=Var(X)=0.09=0.3=pqSD(X)=\sqrt{Var(X)}=\sqrt{0.09}=0.3=\sqrt{pq}



If you multiply the above mean and variance of one trial by nn, you get the following:

  • Binomial mean of n\orange{n} trials =np=np
  • Binomial variance n\orange{n} trials =npq=npq
  • Binomial standard deviation of n\orange{n} trials npq\sqrt{npq}


Mean, Variance, and Standard Deviation (Binomial Distribution)

If a random variable XX follows a binomial distribution, we have very short formulas for the mean, variance, and standard deviation of the random variable.

  • Mean: E(X)=μ=np\boxed{E(X)=\mu=np}
  • Variance: Var(X)=σ2=npq=np(1−p)\boxed{Var(X)=\sigma^2=npq=np(1-p)}
  • Standard deviation: SD(X)=σ=npq=np(1−p)\boxed{SD(X)=\sigma=\sqrt{npq}=\sqrt {np(1-p)}}

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Example: Binomial Probability

A fair dice is rolled 5 times. Find the probability that we get


a) exactly 3 even numbers


There are 5 trial: n=5n=5.

Let "success" = the outcome of rolling an even number → P(success)=12\displaystyle P(\text{success})=\frac{1}{2}.

Let "failure" = the outcome of rolling an odd number → P(failure)=12\displaystyle P(\text{failure})=\frac{1}{2}.


Using our formula:

P(X=3)=(53)(12)3(12)5−2=(10)(18)(14)=516\displaystyle P\left(X=3\right)=\binom{5}{3}\left(\frac{1}{2}\right)^3\left(\frac{1}{2}\right)^{5-2}=(10)\left(\frac{1}{8}\right)\left(\frac{1}{4}\right)=\frac{5}{16}


Therefore, the probability of getting exactly 3 even numbers is 516\frac{5}{16}


b) more than 3 even numbers


"More than 3 even numbers" means getting "4 or 5 even numbers".

P(X≥4)P(X\ge4)

=P(X=4)+P(X=5)=P(X=4)+P(X=5)

=(54)(12)4(12)5−4+(55)(12)5(12)5−5\displaystyle =\binom{5}{4}\left(\frac{1}{2}\right)^4\left(\frac{1}{2}\right)^{5-4}+\binom{5}{5}\left(\frac{1}{2}\right)^5\left(\frac{1}{2}\right)^{5-5}

=(5)(116)(12)+(1)(132)(1)\displaystyle =\left(5\right)\left(\frac{1}{16}\right)\left(\frac{1}{2}\right)+\left(1\right)\left(\frac{1}{32}\right)\left(1\right)

=532+132\displaystyle =\frac{5}{32}+\frac{1}{32}

=632 or 316\displaystyle =\frac{6}{32}\ \text{or}\ \frac{3}{16}


Therefore, the probability of getting more than 3 even numbers is 316\frac{3}{16}.


c) at least 1 even number


"At least 1 even number" means getting "1, 2, 3, 4, or 5 even numbers". Using the complement, this means "the opposite of getting zero even numbers"

P(X≥1)=1−P(X=0)=1−(50)(12)0(12)5−0\displaystyle P\left(X\ge1\right)=1-P\left(X=0\right)=1-\binom{5}{0}\left(\frac{1}{2}\right)^{0}\left(\frac{1}{2}\right)^{{5-0}}

=1−(1)(1)(132)=1−132=3132=1-\left(1\right)\left(1\right)\left(\frac{1}{32}\right)=1-\frac{1}{32}=\frac{31}{32}

Therefore, the probability of getting at least 1 even number is 3132\frac{31}{32}.


Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Example: Binomial Distribution

You are given a scratch-and-win ticket with 12 boxes to scratch. Each box will either say “Win $100” or “SORRY”. The probability of winning is 1/100 for each box. Let XX be the random variable representing the number of boxes that say "Win". Find the mean and standard deviation of this random variable.


Check if XX follows a binomial distribution:

  • The number of trials is n=12n=12
  • Each box is independent of one another with constant probability
  • P(win)=1/100=0.01P(win)=1/100=0.01 and P(lose)=99/100=0.99P(lose)=99/100=0.99

So, this is a binomial experiment and X∼B(12, 0.01)X\sim B(12,\ 0.01).


Binomial mean=E(X)=μ=12(0.01)=0.12Binomial variance=Var(X)=σ2=npq=12(0.01)(0.99)=0.1188Binomial standard deviation=SD(X)=σ=npq=0.1188=0.3435\begin{array}{lllllll}\text{Binomial mean}&&= E(X) =\mu = 12(0.01) = 0.12\\\text{Binomial variance}&&= Var(X) =\sigma^2= npq= 12(0.01)(0.99) = 0.1188\\\text{Binomial standard deviation}&&= SD(X) =\sigma= \sqrt{npq}=\sqrt{0.1188} = 0.3435\end{array}


Therefore, the mean is 0.120.12 and the standard deviation is approximately 0.34350.3435.

Leo can shoot a bull’s eye 60% of the time. He has 10 bullets.


a) What’s the probability that he will shoot a bull’s eye exactly 8 of the 10 times?


b) What’s the probability that he will shoot a bull’s eye at most 8 times?


Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Practice: Binomial Distribution

A member of the parliament knows that the probability that any one of her bills will be made into a law is 0.4 . During a sitting of parliament, she submits 200 different bills. Compute the mean and standard deviation for the random variable, XX , which represents the number of bills that will be made into laws.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors