EDA Lesson 4
EDA Lesson 4
Lesson 4: Bernoulli
Random Variable
Bernoulli Random Variable For example, we toss a coin until 5 heads appeared,
the probability that it will occur after 8 tosses is:
A random variable is said to be in a Bernoulli
Random Variable if it has 2 choices, by which 35
𝑃(𝑁 = 8) = ( 𝐶 )(0.5 )(0.5 ) =
choosing one does not reduce its probability. The 256
event involving this is called Bernoulli Process. It is We can also use this when a given nth trial is given.
usually indicated using 1 and 0, where 1 is the For example, the probability that the 5th head will
Random Variable being observed. appear on the 8th toss will be:
Positive Binomial Distribution 35
𝑃(𝑁 = 8) = ( 𝐶 )(0.5 )(0.5 ) =
Bernoulli Random variables follow its count 256
through pascals triangle. Thus, its probability will Geometric Binomial Distribution
be:
In our formula for negative binomial distribution, r
𝑃(𝑋 = 𝑥) = 𝐶𝑜𝑢𝑛𝑡 × 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 should not be equal to 1 or else we will get an error
𝑃(𝑋 = 𝑥) = ( 𝐶 )(𝑝 )(𝑞 ) to this result. Thus, we just use another method for
obtaining such terms:
Where p is the probability of success of the
Bernoulli random variable. This formula is called 𝑃(𝑁 = 1) = 𝑝𝑞
the binomial distribution formula For example, a coin is tossed until it gets a head.
For example, we toss a coin 8 times. If we find the The probability that it will occur after 5 tosses is:
probability of getting 2 heads: 1
𝑃(𝑁 = 1) = 0.5(0.5 )=
7 32
𝑃(𝑋 = 5) = ( 𝐶 )(0.5 )(0.5 ) =
32 Mean and Variance of Bernoulli Random Variable
Negative Binomial Distribution The Mean and Variance of a Bernoulli Random
In some cases, we repeatedly run each event until Variable with positive binomial distribution will
the desired outcome is obtained. This case is called follow the formula (unless stated with condition):
the Pascal Distribution, or Negative Binomial 𝜇 = 𝑛𝑝, 𝜎 = 𝑛𝑝𝑞
Distribution. This case uses the formula:
Multiple Distribution
𝑃(𝑁 = 𝑛) = ( 𝐶 )(𝑝 )(𝑞 )
For multiple distributions, we use:
This where p is the probability of success of the
Bernoulli random variable. This formula is called 𝑛!
𝑃(𝑋 = 𝑥) = 𝑝 𝑞 𝑟 …
the negative binomial distribution formula. 𝑎! 𝑏! 𝑐! …
𝑤ℎ𝑒𝑟𝑒 𝑝 + 𝑞 + 𝑟 + ⋯ = 1
Examples
2. It is conjectured that an impurity exists in 30% of all drinking wells in a certain rural community. In order
to gain some insight into the true extent of the problem, it is determined that some testing is necessary.
It is too expensive to test all of the wells in the area, so 10 are randomly selected for testing.
a. What is the probability that exactly 3 wells have the impurity, assuming that the conjecture is correct
3. Twelve people are given two identical speakers, which they are asked to listen to for differences, if any.
Suppose that these people answer simply by guessing. Find the probability that three people claim to have
heard a difference between the two speakers.
4. A coin is tossed repeatedly. What is the probability that two heads will appear after 5 tosses
5. Bob is a high school basketball player. He is a 70% free throw shooter. That means his probability of
making a free throw is 0.70. During the season;
a. What is the probability that Bob makes his third free throw on his fifth shot?
b. What is the probability that Bob makes his first free throw on his fifth shot?
6. In a certain city district, the need for money to buy drugs is stated as the reason for 75% of all thefts.
Find the probability that among the next 5 theft cases reported in this district:
b. the last report will be the first case of having a different reason other than the need for money
7. A man gets really drunk, and is at the verge of falling from a cliff. One step forward and he will fall down
to the depths. His action is either to go forward, or backward, both of equal chances. Find his chances of
survival
8. A national study that examined attitudes about antidepressants revealed that approximately 70% of
respondents believe “antidepressants do not really cure anything, they just cover up the real trouble.”
According to this study, what is the expected number of people to believe in this scenario out of 25
respondents randomly selected? Determine also the variance of this scenario
9. The complexity of arrivals and departures of planes at an airport is such that computer simulation is
often used to model the “ideal” conditions. For a certain airport with three runways, it is known that in
the ideal setting the following are the probabilities that the individual runways are accessed by a
randomly arriving commercial jet:
What is the probability that 6 randomly arriving airplanes are distributed in the following fashion?