070 Bernoulli Binomial
070 Bernoulli Binomial
070 Bernoulli Binomial
There are some classic random variable abstractions that show up in many problems. At this point
in the class you will learn about several of the most significant discrete distributions. When solving
problems, if you are able to recognize that a random variable fits one of these formats, then you can
use its precalculated probability mass function (PMF), expectation, variance, and other properties.
Random variables of this sort are called “parametric” random variables. If you can argue that
a random variable falls under one of the studied parametric types, you simply need to provide
parameters. A good analogy is a class in programming. Creating a parametric random variable is
very similar to calling a constructor with input parameters.
Expectation: E[X] = p
Bernoulli random variables and indicator variables are two aspects of the same concept. As a
review, a random variable I is called an indicator variable for an event A if I = 1 when A occurs
and I = 0 if A does not occur. P(I = 1) = P( A) and E[I] = P( A). Indicator random variables are
Bernoulli random variables, with p = P( A).
Example 2
Let X = number of heads after a coin is flipped three times. X ∼ Bin(3, 0.5). What is the probability
of each of the different values of X?
!
3 0 1
P(X = 0) = p (1 − p) 3 =
0 8
!
3 1 3
P(X = 1) = p (1 − p) 2 =
1 8
!
3 2 3
P(X = 2) = p (1 − p) 1 =
2 8
!
3 3 1
P(X = 3) = p (1 − p) 0 =
3 8
Example 3
When sending messages over a network, there is a chance that the bits will be corrupted. A Hamming
code allows for a 4 bit code to be encoded as 7 bits, with the advantage that if 0 or 1 bit(s) are
corrupted, then the message can be perfectly reconstructed. You are working on the Voyager space
mission and the probability of any bit being lost in space is 0.1. How does reliability change when
using a Hamming code?
Image we use error correcting codes. Let X ∼ Bin(7, 0.1).
!
7
P(X = 0) = (0.1) 0 (0.9) 7 ≈ 0.468
0
!
7
P(X = 1) = (0.1) 1 (0.9) 6 = 0.372
1
P(X = 0) + P(X = 1) = 0.850