Math 105, Topics in Mathematics

 

Lesson 5 :Binomial Random Variable

Satya Mandal

Due Date: See the Lecture Notes Site.

5.1 Binomial Trials and Number of Success back to top

Perhaps, the simplest statistical experiment is a Bernoulli trial. Examples of Bernoulli trials begin with tossing a coin, because it has exactly two possible outcomes - Head or Tail. Any statistical experiment that has exactly two outcomes (to be called "success" and "failure") is called a Bernoulli Trial. The experiment of tossing a coin is synonymous to any real life Bernoulli TRIAL. Other examples include testing an item for defectiveness, asking a voter whether he/she will vote for a particular candidate, a pregnancy test, testing a patient for a particular ailment and others.

For an unbiased coin, the probability of "success" and "failure" are equal. In real life Bernoulli trials, such as the above examples, probability of success and failure would not be equal. Real life Bernoulli trials are synonymous to tossing a loaded coin. Such a trial is called a Bernoulli trial, which has the sample space

S = {s, f}

where s denotes the outcome "success" and f denotes the outcome "failure." Given a Bernoulli trial, we can define a random variable Y as follows:

Y = 1 if success
Y = 0 if failure

Let us also have the notations

P(success) = p
Then P(failure) = 1-p.

So,
P(Y=1) = p
P(Y=0) = 1-p.

This random variable Y is called the Bernoulli(p) random variable and the corresponding statistical experiment is called Bernoulli(p)-trial.

Bernoulli trials are too simple to be of any serious interest. Things become interesting when we perform a series identical and independent Bernoulli(p) trials.

Definition. Let n be a positive integer and 0 ≤ p ≤ 1. A Binomial(n,p)-experiment (or B(n,p)-experiment) is defined to be a combination of n "identical and independent" Bernoulli(p) trials. More formally, B(n,p) experiment is characterized as follows:

  1. A binomial experiment consists of n identical and independent Bernoulli trials.
  2. The probability of success in each trial remains fixed and is equal to p.
Definition. Given a B(n,p)-experiment, let

X = total number of successes in these n trials.

Then X is called a binomial (n,p)-random (or B(n,p)-random) variable.

Following facts about a B(n,p)-random variable X will be useful subsequently:

  1. X can assume values 0,1,…,n. The probability distribution is given by

    p(r) = P(X = r) = P(r success) = nCr pr(1-p)n-r


    where r runs through 0,1,2,…,n.


  2. The mean of X is

    μ = np.


    Note, the

    mean =μ = (number of trial)*(probability of success in each trial).

  3. The standard deviation of X is

    σ =np(1-p)


    Note, the

    Standard Deviation =σ = (number of trials)*(probability of success in each trial)*(probability of failure in each trial).

  4. Like most random variables in nature, Binomial(n,p)-random variables also behave approximately like Normal random variables, when n is large and p is not too close to 0 or 1. The following animation demonstrates the same.

    Animation 5.1.1
    1. The graph maintains a bell-shape.
    2. The graph also peaks at (or near) the mean μ = np.

Probability Computations

For conceptual reasons, in classrooms we exhibit the above formulas, to compute probability for binomial random variables. However, in real life statistical situations this is not worthwhile. In statistics, approximation and usage of computational tools is the name of the game.
We will discuss two methods of computing probability for B(n,p)-random variable. First one is to use the Binomialcdf function of TI-84.

Use of Calculators (TI-84):
Computing Binomial Probability:
binomilacdf function in TI-84:

Suppose X is a B(60, .6) random variable. To compute P(X is at most 8) = P(0 ≤ X ≤ 8) do the following:

a) Press 2nd and then Distr (VARS)
b) Scroll down to binomialcdf and ENTER
c) type in "12, .6, 8)" and ENTER. TI will give the answer. So,

P(0 ≤ X ≤ 8) = Binomialcdf(60, .6, 8)

Similarly,

P(20 ≤ X ≤ 30) = P(0 ≤ X ≤ 30) - P(0 ≤ X ≤ 19)

= binomialcdf(60, .6, 30) - binomialcdf(60, .6, 19)



In "binomilacdf", cdf stands for cummulative density function.



5.2 Normal Approximation to Binomial back to top

Before computers and others computational tools (like TI-84) invaded the work places and classrooms, Normal Distribution was used almost universally to approximate probability for any random variable. Even now, for huge probability computations smaller computers (say TI-84) may not be adequate. However, Normal distribution provides much more conceptual ideas and is more accurate. The Animation 5.1.1 demonstrates and justifies the same.

For this course, Normal probability distribution will be used as an alternative method to approximate binomial probability, as in the next theorem.


Theorem. Suppose X is a B(n,p) random variable. Assume n is large and p is not very close to 0 or 1. Then X behaves, approximately, like a N(μ, σ) random variable, with mean

μ = np and standard deviation σ = np(1-p).

For r=0,1,…,n   probability is approximated as follows:

P(X = r) = P(r-0.5 < X < r + .5) ≈ P(L < Z < R)

where L=(r-0.5-μ)/σ and R=(r+0.5-μ)/σ. ( As before, Z denotes the standard normal random variable. )

More generally, for r,s=0,1,…,n

P(r ≤ X ≤ s) = P(r-0.5 < X < s + .5) ≈ P(L < Z < R)

where L=(r-0.5-μ)/σ and R=(s+0.5-μ)/σ.


Remark. This adjustment by .5 on two sides is called continuity correction. Recall P(Y=r) =0 for any continuous random variable Y. Because of this, we could not have treated, naively, X as Normal, without continuity "correction". On the other hand, when n is very large, it would not make any noticeable difference.


Problems on 5.2:TI-84 and Normal Approximation

Exercise 5.2.1. A Lawrence bank knows that 35 percent of its customers will visit the drive-through window. If 400 customers visit the bank, what is the approximate probability that more than 120 will visit the drive-through window?

Solution by TI-84:
Here p=.35 and n=400.

Now "X is more than 120" means "X > 120", which is "X ≥121".
P(121 ≤ X) = 1 - P(X ≤ 120) = 1 - binomialcdf(400, .35, 120) = 1 - .0196 = .9804

Alternative Normal Approximation:
Here p=.35 and n=400.
First step is to compute the mean μ and the standard deviation σ :
μ = np= 400*.35 = 140 and σ = np(1-p) = 400*.35*(1-.35) = 9.5394
Let X = number of customers who will visit the drive-through window. Then X is B(400, .35) random variable and we will use N(140, 9.5394) to approximate.

Now "X is more than 120" means "X > 120", which is "X ≥121".
P(121 ≤ X) = P(120.5 ≤ X)         [This is continuity correction.]
= P([120.5 - μ]/σ < [X - μ]/σ )
≈ P([120.5 - μ]/σ < Z )
= P([120.5 - 140]/9.5394 < Z )
= P (-2.0442 < Z ) = normalcdf(-2.0442, 5)= .9795

Exercise 5.2.2. It is known that the probability that a household owns a food processor is 0.1. If 190 households are interviewed, find the approximate probability that

  1. more than 26 households own a food processor;
  2. less than 30 households own a food processor.

Solution by TI-84:
Here p=.1 and n=190.
Let X = number of households who own a food processor.

  1. Now "X is more than 26" means "X > 26", which is "X ≥27".
    P(27 ≤ X) = 1 - P(X ≤ 26)
    = 1 -binomialcdf(190, .1, 26) = 1 - .9602 = .0398
  2. Again, "X is less than 30" means "X ≤ 29".
    P(X ≤ 29)= binomialcdf(190, .1, 29) = .9918

Alternative Normal Approximation:
Here p=.1 and n=190.
First step is to compute the mean μ and the standard deviation σ :
μ = np= 190*.1=19 and σ = np(1-p) = 190*.1*(1-.1) = 4.1352
Let X = number of households who own a food processor. Then X is B(190, .1) random variable and we will use N(19, 4.1352) to approximate.

  1. Now "X is more than 26" means "X > 26", which is "X ≥27".
    P(27 ≤ X) = P(26.5 ≤ X)         [This is continuity correction.]
    = P([26.5 - μ]/σ < [X - μ]/σ )
    ≈ P([26.5 - μ]/σ < Z )
    = P([26.5 - 19]/4.1352 < Z )
    = P (1.8137, < Z ) = normalcdf(1.8137, 5)= .0349
  2. Again, "X is less than 30" means "X < 30", which is "X ≤ 29".
    P(X ≤ 29)= P(X ≤ 29.5)        [This is continuity correction.]
    = P([X - μ]/σ < [29.5 - μ]/σ)
    ≈ P(Z < [29.5 - μ]/σ)
    = P(Z < [29.5 -19 ]/4.1352)
    = P ( Z < 2.5392) = normalcdf(-5, 2.5392) = .9944

Exercise 5.2.3. The campaign committee of a candidate claims that sixty percent of the voters are in favor of the candidate. You interview 150 voters. Assuming that the campaign committe's claim is accurate, what is the approximate probability that less than 77 will favor the candidate?
Solution

Solution by TI-84:
Here p=.6 and n=150.

Let X = number of voters in favor of the candidate. Then X is B(150, .6 ) random variable.
Now, "X is less than 77" means "X < 77", which is "X ≤ 76".
P(X ≤ 76)= binomilacdf(150,.6, 76) = .0128

Alternative Normal Approximation:
Here p=.6 and n=150.
First step is to compute the mean μ and the standard deviation σ :
μ = np= 150*.6= 90 and σ = np(1-p) = 150*.6*(1-.6) = 6
Let X = number of voters in favor of the candidate. Then X is B(150, .6 ) random variable and we will use N(90, 6) to approximate.
Now, "X is less than 77" means "X < 77", which is "X ≤ 76".
P(X ≤ 76)= P(X ≤ 76.5)        [This is continuity correction.]
= P([X - μ]/σ < [76.5 - μ]/σ)
≈ P(Z < [76.5 - μ]/σ)
= P(Z < [76.5 -90 ]/6)
= P ( Z < -2.25) = normalcdf(-5, - 2.25) = .0122

Exercise 5.2.4. A technique is used to fertilize eggs in a fertility clinic laboratory. It is known that the probability that an egg will be fertilized by this technique is 0.1. If 500 eggs are treated, what is the probability that at least 60 eggs will be fertilized?

Solution by TI-84:
Here p=.1 and n=500.
Let X = number of egg will be fertilize. Then X is B(500, .1) random variable and we will use N(50, 6.7082) to approximate.

Now "X is at least 60" means "X ≥ 60".
P(60 ≤ X) = 1 - binomialcdf(500, .1, 59) = 1 - .9190 = .081

Alternative Normal Approximation:
Here p=.1 and n=500.
First step is to compute the mean μ and the standard deviation σ :
μ = np= 500*.1=50 and σ = np(1-p) = 500*.1*(1-.1) = 6.7082
Let X = number of egg will be fertilize. Then X is B(500, .1) random variable and we will use N(50, 6.7082) to approximate.

Now "X is at least 60" means "X ≥ 60".
P(60 ≤ X) = P(59.5 ≤ X)         [This is continuity correction.]
= P([59.5 - μ]/σ < [X - μ]/σ )
≈ P([59.5 - μ]/σ < Z )
= P([59.5 - 50]/6.7082 < Z )
= P (1.4162, < Z ) = normalcdf(1.4162, 5)= .0784

Exercise 5.2.5. The probability that a computer chip produced in a factory is defective is is .2. If you have a sample of 60 chips, what is the probability that the number of defective chips will be less than 20?

Solution by TI-84:
Here p=.2 and n=60.
Let X = number of defective chips. Then X is B(60, .2 ) random variable.
Now, "X is less than 20" means "X ≤ 19".
P(X ≤ 19)= binomial(60, .2, 19) = .9893

Alternative Normal Approximation:
Here p=.2 and n=60.
First step is to compute the mean μ and the standard deviation σ :
μ = np= 60*.2= 12 and σ = np(1-p) = 60*.2*(1-.2) = 3.0984
Let X = number of defective chips. Then X is B(60, .2 ) random variable and we will use N(60, 3.0984) to approximate.
Now, "X is less than 20" means "X < 20", which is "X ≤ 19".
P(X ≤ 19)= P(X ≤ 19.5)        [This is continuity correction.]
= P([X - μ]/σ < [19.5 - μ]/σ)
≈ P(Z < [19.5 - μ]/σ)
= P(Z < [19.5 -12 ]/3.0984)
= P ( Z < 2.4206) = normalcdf(-5, 2.4206) = .9923

Exercise 5.2.6. The probability that a light bulb produced by a machine is defective is p = 0.2. Suppose a quality control inspector takes a sample of 120 bulbs. What is the probability that more than 30 bulbs will be defective?

Solution by TI-84:
Here p=.2 and n=120.
Let X = number of defective bulbs. Then X is B(120, .2) random variable.

Now "X is more than 30" means "X > 30", which is "X ≥ 31".
P(31 ≤ X) = 1- P(X ≤ 30) = 1 - binomialcdf(120, .2, 30) = 1 - .9279 = .0721.

Alternative Normal Approximation:
Here p=.2 and n=120.
First step is to compute the mean μ and the standard deviation σ :
μ = np= 120*.2 = 24 and σ = np(1-p) = 120*.2*(1-.8) = 4.3818
Let X = number of defective bulbs. Then X is B(120, .2) random variable and we will use N(24, 4.3818) to approximate.

Now "X is more than 30" means "X > 30", which is "X ≥ 31".
P(31 ≤ X) = P(30.5 ≤ X)         [This is continuity correction.]
= P([30.5 - μ]/σ < [X - μ]/σ )
≈ P([30.5 - μ]/σ < Z )
= P([30.5 - 24]/4.3818 < Z )
= P (1.4834, < Z ) = normalcdf(1.4834, 5)= .0694

Exercise 5.2.7. Suppose the probability that a student has access to the Internet is p = 0.8. Suppose you interview 160 students. What is the probability that less than 120 students will have access to the Internet?

Exercise 5.2.8. Suppose that the probability that a person favors medical use of marijuana is p = 0.6. If 780 individuals are interviewed, what is the probability that less than 450 will be in favor?

Exercise 5.2.9. Suppose that the probability that a middle-income family invests in the stock market is p = 0.8. If we interview 880 middle-income families, what is the probability that more than 700 have invested in the stock market?

Exercise 5.2.10. Suppose that an insurance company knows from experience that the probability that a life-insurance policyholder will survive another 10 years is p = 0.9. The company has 2280 policyholders. What is the probability that more than 2025 will survive another 10 years.

back to top