0% found this document useful (0 votes)
28 views39 pages

Chapter 5

This document discusses the binomial distribution and discrete random variables. It defines key concepts like probability distribution, mean, standard deviation, Bernoulli trials and binomial coefficients. Examples are provided to illustrate calculating probabilities and expected values for discrete random variables.

Uploaded by

idektbhlol9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views39 pages

Chapter 5

This document discusses the binomial distribution and discrete random variables. It defines key concepts like probability distribution, mean, standard deviation, Bernoulli trials and binomial coefficients. Examples are provided to illustrate calculating probabilities and expected values for discrete random variables.

Uploaded by

idektbhlol9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

STA302 Spring 2021

Chapter 5: Discrete Random Variables


STA302 Spring 2021

Section 5.1 Discrete Random Variables and Probability


Distribution

Many of the topics discussed here were introduced in the


previous chapters.

Def. Probability Distribution and probability histogram.


The Probability Distribution is similar to the relative
frequency table. It is a listing of all possible values with the
corresponding probabilities.
The Probability Histogram is similar to the relative frequency
histogram. It shows values on the horizontal axis and
probabilities on the vertical axis.
STA302 Spring 2021

Difference b/w relative freq and probability: In a class of 20


students, the following grouped-data table shows the
distribution of the students according to the number of
sisters they have.
# of sisters Frequency Relative freq.
0 4 4/20 = 0.2
1 10 0.5
2 6 0.3

The shaded cell in the above table represents the relative


frequency of students who have no sisters. We say that there
are 20% of students in the class who have no sisters
STA302 Spring 2021

Let X denote the # of sisters of a randomly selected student.


The value that X can assume depends on chance. The
following table is the probability distribution of X. It shows
the value of X with their corresponding probabilities

# of sisters Probability
x P(X=x)
0 4/20 = 0.2
1 0.5
2 0.3

The probability that X=0 is 0.2. P(X=1) and P(X=2) are 0.5 and
0.3 respectively.
The sum of probabilities of possible values = 1
ΣP(X=x) = 1
STA302 Spring 2021

At least and at most events:


P(X is at most x) means that X is less than or equal to x.
=P(X<=x).
e.g. P(a randomly selected student has at most 1 sister)
= P(X <=1) = P(X=0) + P(X=1) = 0.2 + 0.5 = 0.7
# of sisters Probability
x P(X=x)
0 4/20 = 0.2
1 0.5
2 0.3
P(X is at least x) means that X is greater than or equal to x.
=P(X>=x).
e.g. P(a randomly selected student has at least 1 sister)
= P(X >=1) = P(X=1) + P(X=2) = 0.5 + 0.3 = 0.8
STA302 Spring 2021

e.g. #5.10 p241


A family has 4 children. Let X denote the number of girls.

a. Identify the possible values of the random variable X.

Ans: X = 0, 1, 2, 3, 4

b. Determine the probability distribution of X


What are the possible outcomes?
There are 16 equally likely possible outcomes:
BBBB, BBBG, BBGB, BGBB, GBBB, BBGG, BGBG, BGGB,
GBBG, GBGB, GGBB, BGGG, GBGG, GGBG, GGGB, GGGG.
STA302 Spring 2021

The probability distribution is:

# of girls Probability
x P(X=x)
0 1/16
1 4/16
2 6/16
3 4/16
4 1/16
STA302 Spring 2021

The probability distribution is: # of girls Probability


x P(X=x)
0 1/16
1 4/16
2 6/16
3 4/16
4 1/16
Use random- variable notation to represent the probability of
each of the following events:
c. The couple has exactly 2 girls
Ans. P(X=2) = 6/16
d. The couple has at least two girls
Ans. P(X>=2) = P(X=2) + P(X=3) + P(X=4) = 6/16+4/16+1/16
=11/16
STA302 Spring 2021

e. At most 2 girls

Ans. P(X <= 2) = P(X = 2) + P(X = 1) + P(X = 0) = 6/16 + 4/16 +


1/16 = 11/16.

f. B/w 1 and 3 girls inclusive


Ans. P(1 <= X <= 3) = P(X = 1) + P(X = 2) + P(X = 3) = 4/16 +
6/16 + 4/16 = 14/16.

g. Children all of the same gender

Ans. P(X = 0 or 4) = P(X = 0) + P(X = 4) = 1/16 + 1/16 = 2/16


STA302 Spring 2021

e.g. 1.The discrete random variable X can assume only the


following values: 0,1,2,3,4 and 5.
If P(X<2) = 0.2 and P(X>=3)=0.7 find P(X=2)

Ans. P(X < 2) = P(X = 0) + P(X = 1) = 0.2


P(X >= 3) = P(X = 3) + P(X = 4) + P(X=5) = 0.7
P(X=0) + P(X = 1) + P(X=2) + P(X=3) + P(X=4) + P(X=5) = 1

0.2 0.7
Therefore, P(X=2) = 1 – 0.2 – 0.7 = 0.1
STA302 Spring 2021

e.g.2 The discrete random variable X can assume only the


following values: 0,1,2,3,4 and 5.
If P(X<=3) = 0.4 and P(X>2)=0.9 find P(X=3)

P(X=0) + P(X = 1) + P(X=2) + P(X=3) + P(X=4) + P(X=5) = 1

0.4 0.9
Therefore, P(X=3) =
STA302 Spring 2021

Section 5.2 The mean and standard deviation of a discrete


random variable
STA302 Spring 2021

10 workers in a factory are paid on an hourly basis (in USD)


as follows:
4 4 5 5 5 6 6 6 6 8
Define the discrete random, X, as the hourly pay.
Determine the mean of X, μ

4+4+5+5+5+6+6+6+6+8
μ= = 5.5 $/hr
10
STA302 Spring 2021
10 workers in a factory are paid on an hourly basis (in USD)
as follows:
4 4 5 5 5 6 6 6 6 8
Define the discrete random, X, as the hourly pay.
Determine the probability distribution of X
x P(X=x)
4 2/10 = 0.2
5 3/10 = 0.3
6 4/10 = 0.4
8 1/10 = 0.1

4+4+5+5+5+6+6+6+6+8
μ= = 5.5 $/hr
10
2*4 + 3*5 + 4*6 + 8
μ= = 5.5 $/hr
10
STA302 Spring 2021
10 workers in a factory are paid on an hourly basis (in USD)
as follows:
4 4 5 5 5 6 6 6 6 8
Define the discrete random, X, as the hourly pay.
Determine the probability distribution of X
x P(X=x)
4 2/10 = 0.2
5 3/10 = 0.3
6 4/10 = 0.4
8 1/10 = 0.1

μ = 4*2/10 + 5*3/10 + 6*4/10 + 8*1/10 = $5.5


μ = 4*P(X=4) + 5*P(X=5) + 6*P(X=6) + 8*P(X=8) = $5.5
STA302 Spring 2021

In general the mean μ of a discrete random variable X is


defined by:
μ = ΣxP(X=x)

The mean is also called the expected value of X


STA302 Spring 2021

GPA = 3.7 with prob. of 0.9


And GPA = 3.5 with prob of 0.1
What ‘s the expected GPA?
Ans. : Expected GPA = 3.7*0.9 +3.5*0.1 = 3.68
STA302 Spring 2021

The standard deviation, σ, of a discrete random variable X is


defined by:
σ = Σ(x-μ)2P(X=x)
STA302 Spring 2021

The standard deviation, σ, of a discrete random variable X is


defined by:
σ = Σ(x-μ)2P(X=x)

In the previous example, the standard deviation, σ, of the


hourly pay is calculated as follows:

4 0.2 4-5.5=-1.5 2.25 2.25*0.2=0.45


5 0.3 -0.5 0.25 0.075
6 0.4 0.5 0.25 0.1
8 0.1 2.5 6.25 0.625
1.25
σ =√1.25 = 1.118
STA302 Spring 2021

Section 5.3 The Binomial Distribution


STA302 Spring 2021

We start with the following example:


We flip an unbalanced coin (with P(H) = 0.4 and P(T)=0.6)
three times. We are interested in calculating the probability
that 2 heads occur.
STA302 Spring 2021

What outcomes have 2 heads? HHT, HTH, THH


P(2 heads) = P(HHT) + P(HTH) + P(THH)
= 0.4*0.4*0.6 + 0.4*0.6*0.4 + 0.6*0.4*0.4
= 0.096 + 0.096 + 0.096 = 0.288
STA302 Spring 2021

Each flip is called a trial.


1. Each trial has only two possible outcomes: Head or Tail.
2. The trials are independent.
3. P(success)=0.4 remains the same from trial to trial.

Definition: Any series of trials satisfying the above 3


conditions are called Bernoulli trials.
STA302 Spring 2021

Another example of Bernoulli Trials: If the probability that a


girl at the age of 30 gets married before her 35th B-day is 0.3

In a group of 10 girls at the age of 30. We analyze the number


who get married before the 35th B-day.

In this example, each girl of the 10 represents a trial.


Each trial has 2 possible outcomes (get married - success) or
(not get married - failure)
All the trials are independent.
P(success)=0.3 remains the same from girl to girl.
STA302 Spring 2021

Definition: The Binomial Distribution is the probability


distribution for the number of successes in a sequence of
Bernoulli trials.
STA302 Spring 2021

FACTORIALS

Definition: k factorial is denoted by k! = k(k-1)(k-2)…3.2.1


e.g.
3! = 3*2*1 = 6
4! = 4*3*2*1 = 24
5! = 5*4*3*2*1 = 120
10! = 10*9*8*7*6*5*4*3*2*1 = 3,628,800
0! = 1
Note that n! = n*(n-1)!
STA302 Spring 2021

Binomial Coefficients

The Binomial Coefficient

The Binomial Coefficient represents the number of ways we


can get x successes in n Bernoulli trials.

Example the number of ways we can get 2 heads in 3 tosses


of a coin is given by

Therefore there are 3 ways of getting 2 heads in 3 tosses.


STA302 Spring 2021

Binomial Coefficients can be easily calculated using the


calculator

Example the number of ways we can


get 2 heads in 3 tosses of a coin can
be calculated on a Casio calculator
by pressing 3 -> shift -> ÷ -> 2
This gives 3C2 = 3 (try it!)
STA302 Spring 2021

So now we have the number of ways of getting 2 heads HHT,


HTH, THH
The next step is to calculate the probability of 2 heads:
P(2 heads) = 3 * 0.42 * 0.6 = 0.288

n x
P( X  x) n C x p (1  p )
x
x  0,1,2,..., n
STA302 Spring 2021

The Binomial Probability Formula:


If n is the number of Bernoulli trials.
P(success) = p
x is the number of successes.
Then the probability distribution of random variable X is
called the Binomial distribution and it’s defined by the
following formula

n x
P( X  x) n C x p (1  p )
x
x  0,1,2,..., n

We say that random variable X has the binomial distribution


with parameters n and p
STA302 Spring 2021

The Binomial Probability Formula:


e.g. A multiple-choice exam of 10 questions each with 5
possible answers. The student guesses the correct answer
for each of the 10 questions.
a. Are the conditions of Bernoulli trials satisfied in this
problem?
Ans:
What are the trials?
Each of the 10 questions is a trial
Independent? Yes
Two possible outcomes per trial?
Yes. Either correct or wrong answer.
What’s the probability of success for all trials?
=1/5 one correct out of 5 possible answers
STA302 Spring 2021

The Binomial Probability Formula:


e.g. A multiple-choice exam of 10 questions each with 5
possible answers. The student guesses the correct answer
for each of the 10 questions.
b. Calculate the probability he gets 3 correct answers.

Ans:
Apply the binomial formula

P( X  3)10 C3 0.23 (1  0.2)103


10! 10 * 9 * 8 * 7!
10 C3    120
(10  3)!3! 7!*3!
10C3 can also can be calculated using Casio calculator:
10 shift ÷ 3 gives 120
STA302 Spring 2021

The Binomial Probability Formula:


e.g. A multiple-choice exam of 10 questions each with 5
possible answers. The student guesses the correct answer
for each of the 10 questions.
b. Calculate the probability he gets 3 correct answers.

Ans:
Apply the binomial formula

P( X  3)  120 * 0.23 (0.8) 7  0.2013


STA302 Spring 2021

The Binomial Probability Formula:


e.g. A multiple-choice exam of 8 questions each with 4
possible answers. The student guesses the correct answer
for each of the 8 questions.
c. Calculate the probability he gets at least two correct
answers
Ans:
P(at least two correct) = P(X=2) + P(X=3) +…+P(X=10)

= 1 - P(at most one correct)


= 1 - P(X=0) - P(X=1)
STA302 Spring 2021

Mean and Standard Deviation of a Binomial Random Variable

The mean or the expected value of a binomial random


variable with parameters n and p is given by:
  np
e.g. for the multiple-choice example, n=10, p=1/5=0.2 The
expected number of correct answers = 10*0.2 = 2
STA302 Spring 2021

Another example:
Let’s assume that 35% of Grade 5 students in Zimbabwe are
ADD. If we randomly selected 8 grade 5 students from
Zimbabwe, the probability that 2 of them are ADD is given by
the binomial formula where n = 8, p = 0.35 and X=2

so

Also, if we randomly selected 80 grade 5 students from


Zimbabwe, what is the expected number of ADDs among
them?
Answer   np = 80 x 0.35 = 28 student
STA302 Spring 2021

Mean and Standard Deviation of a Binomial Random Variable

The standard deviation of a binomial random variable with


parameters n and p is given by:
  np(1  p )
e.g. for the multiple-choice example, n=10, p=1/5=0.2 The
standard deviation of the number of correct answers =

  10 * 0.2(1  0.2)  10 * 0.2 * 0.8  1.6  1.2649


STA302 Spring 2021

e.g. A binomial RV X has a mean 20 and standard deviation 4.


Calculate n and p.
  np  20
  np(1  p)  4
 np (1  p )  16
  (1  p )  16
16 16
 1 p    0.8
 20
 p  0.2
20
  np  20  n   100
p

You might also like