1. 18/09/2017
1
Introduction to Business statistics, a computer
integrated approach by Alan H. Kvanli, C.
Stephen Guynes and Robert J Pavur.
Whenever an experiment results in a
numerical outcome, such as the total value of
two dice, we can represent various possible
outcomes and their corresponding
probabilities much more conveniently by
using a random variable.
AAAA randomrandomrandomrandom variablevariablevariablevariable isisisis aaaa functionfunctionfunctionfunction thatthatthatthat assignsassignsassignsassigns
aaaa numericalnumericalnumericalnumerical valuevaluevaluevalue totototo eacheacheacheach outcomeoutcomeoutcomeoutcome ofofofof anananan
experimentexperimentexperimentexperiment....
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 2
2. 18/09/2017
2
There are two types of Random variables
Discrete Random Variables
Continuous Random Variables
DiscreteDiscreteDiscreteDiscrete RandomRandomRandomRandom VariableVariableVariableVariable
If all the possible values of a random variable can
be listed along with the probability for each value,
then such a variable is said to be a discrete
random variable.
For Example, X = No of heads in 3 flips of a coin
X= Total value of 2 dice.
ContinuousContinuousContinuousContinuous RandomRandomRandomRandom VariableVariableVariableVariable
If we can assume any value over a particular range
for a random variable then such a random variable
is called Continuous Random Variable.
For example; X= Height, X = Weight
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 3
Flip a coin 3 times. The possible outcomes
for each flip are Heads (H) and Tails (T).
According to the counting rule 1, there are
total eight possible outcomes (2*2*2)
These outcomes are TTT, TTH, THT, HTT,
HHT,THH and HHH. Suppose we are
interested in number of heads. Let
A = Event of observing 0 heads in 3 flips(TTT)
B = Event of observing 1 head in 3 flips ( TTH,
THT, HTT)
C = Event of observing 2 heads in 3 flips
(HHT, HTH, THH)
D= Event of observing 3 heads in 3 flips (HHH)Lecturer, Johaina Khalid, IMS,
University of Peshawar. 4
3. 18/09/2017
3
By simply counting the number of outcomes
for each event, we know that
P(A) = 1/8
P(B) = 3/8
P(C ) =3/8
P(D) = 1/8
The variable of interest in this example is X,
defined as
XXXX ==== numbernumbernumbernumber ofofofof headsheadsheadsheads outoutoutout ofofofof 3333 flipsflipsflipsflips....
We have already defined all possible outcomes
of X by defining four events, A, B, C and D and
have calculated their corresponding
probabilities, which may be listed as below:
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 5
Value of XValue of XValue of XValue of X (No of(No of(No of(No of
heads out of 3 flips)heads out of 3 flips)heads out of 3 flips)heads out of 3 flips)
ProbabilityProbabilityProbabilityProbability OutcomesOutcomesOutcomesOutcomes
0 1/8 TTT
1 3/8 TTH, THT, HTT
2 3/8 HHT, HTH, THH
3 1/8 HHH
NoteNoteNoteNote thatthatthatthat 1/8+3/81/8+3/81/8+3/81/8+3/8
+3/8+1/8 = 1+3/8+1/8 = 1+3/8+1/8 = 1+3/8+1/8 = 1
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 6
4. 18/09/2017
4
The value of the random variable X is not
known in advance, but there is a probability
associated with each possible value of X.
The list of all possible values of a random
variable X and their corresponding
probabilities is a probability distribution.
It may be written in general form as
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 7
Random Variable (X)Random Variable (X)Random Variable (X)Random Variable (X) Probabilities (P)Probabilities (P)Probabilities (P)Probabilities (P)
x1 p1
x2 p2
x3 p3
. .
. .
. .
. .
xn pn
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 8
5. 18/09/2017
5
Other examples of a discrete random variable
include
X= the number of cars that drive up to a
bank within a 5 minute period (X =
0,1,2,3,…)
X = the number of people out of a group of
50 who will suffer a fatal accident within the
next 10 years (X= 0,1,2…50)
X= the number of calls arriving at a telephone
switchboard over a 2 minute period (X
=0,1,2,3,..)
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 9
You roll two dice, a red die and a blue die.
What is a possible random variable X for this
situation? What are its possible values and
corresponding probabilities (Hint: Roll the
dice and observe a particular number. This
number is your value of the random variable ,
X. What observations are possible from the
roll of the two dice
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 10
6. 18/09/2017
6
PossibilitiesPossibilitiesPossibilitiesPossibilities forforforfor randomrandomrandomrandom variablevariablevariablevariable
X = total of two dice
X= average of two dice
X = the higher of the two numbers that
appear (Possible values = 1,2,3,4,5,6)
X = the number of dice with 3 appearing
(Possible values:0, 1, 2)
Suppose random variable X = total of the two
dice.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 11
PossiblePossiblePossiblePossible valuesvaluesvaluesvalues andandandand correspondingcorrespondingcorrespondingcorresponding probabilitiesprobabilitiesprobabilitiesprobabilities
forforforfor randomrandomrandomrandom variablevariablevariablevariable XXXX ==== totaltotaltotaltotal ofofofof twotwotwotwo dicedicedicedice::::
Total number of possible outcomes = 6*6 = 36
All these outcomes are equally likely or have
same chance of occurrence and the probability of
each outcome is thus 1/36
Now we will see the list of all possible outcomes
from this experiment and the corresponding
values of our random variable X
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 12
7. 18/09/2017
7
OutcomeOutcomeOutcomeOutcome Red DieRed DieRed DieRed Die Blue DieBlue DieBlue DieBlue Die Value of XValue of XValue of XValue of X
1 1 1 2
2 1 2 3
3 1 3 4
4 1 4 5
5 1 5 6
6 1 6 7
7 2 1 3
8 2 2 4
. . . .
. . . .
. . . .
34 6 4 10
35 6 5 11
36 6 6 12
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 13
For getting to know the associated
probabilities for each possible value of X, an
easy way is to get to know the number of
possible outcomes for each value of random
variable X.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 14
8. 18/09/2017
8
Value OF XValue OF XValue OF XValue OF X Number of Possible OutcomesNumber of Possible OutcomesNumber of Possible OutcomesNumber of Possible Outcomes ProbabilityProbabilityProbabilityProbability
2 1 (rolling a 1,1) 1/36
3 2 (Rolling a 1,2 or 2,1) 2/36
4 3 (Rolling a 1,3 or 3,1 or 2,2) 3/36
5 4 4/36
6 5 5/36
7 6 6/36
8 5 5/36
9 4 4/36
10 3 3/36
11 2 2/36
12 1 1/36
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 15
Note that the sum of all probabilities is
always equal to 1
Suppose X = average of the two dice
Still X is a discrete random variable with a
limited set of possible values (with gaps in
them) that is 1,1.5,2,2.5,3,3.5,4,4.5,5,5.5
and 6 .
Similarly we can also come up with the
probability distribution of this variable X by
finding out the associated probabilities for all
these values of X.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 16
9. 18/09/2017
9
A continuous random variable is a variable, for which
any value is possible over some range of values.
For a random variable of this type, there are no gaps
in the set of possible values
ExampleExampleExampleExample:::: Consider two random variables X and Y,
where
XXXX ==== Number of days it rained in Peshawar during
August.
YYYY ==== Amount of rainfall during this month
Here X is a discrete random variable, because there are
gaps in the possible values ( suppose 5.7 is not
possible) and Y is a continuous random variable as any
value is possible over a particular range.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 17
Suppose the heights of all adult males in the
united states range from 3 feet to 7.5 feet. Your
task is to describe these heights using such
statements as
15 % of the heights are under 5.5 ft.
88 % of the heights are between 5 ft and 6 ft.
We first define the random variable
X = Height of a randomly selected adult male in
United States.
Here for a continuous random variable, we are
unable to list all possible values of X as any value
is possible over a particular range.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 18
10. 18/09/2017
10
However we can still discuss probabilities
associated with X.
For example, the preceding statements may be
written as
P(X < 5.5) = 0.15
P(X is between 5 ft and 6 ft) = P(5<X<6) = 0.88
Here X is a continuous random variable and
probabilities for a continuous random variable can
be found only for intervals.
Determining the probabilities for a continuous
random variable will be discussed in the next
chapter.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 19
There are 3 popular methods of describing the
probabilities associated with a discrete random
variable
List each value of X and its corresponding
probability.
Use a histogram to convey the probabilities
corresponding to the various values of X.
Use a function that assigns a probability to
each value of X.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 20
11. 18/09/2017
11
The first method of listing all possible values
works well when there is a small number of
possible values of X, for example, observing
the no of heads in 3 flips of a coin but this
method doesn’t work well suppose for 100
flips of a coin.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 21
Histogram is also a convenient way to
represent the shape of a discrete distribution
having a small number of possible values.
The histogram is constructed in a way that
the height of each bar is the probability of
observing that value of X.
For the coin flipping example, possible values
of X and their associated probabilities are 0,
1,2 and 3 with the corresponding
probabilities 1/8, 3/8, 3/8 and 1/8
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 22
12. 18/09/2017
12
The histogram for the coin flipping example can
be seen as under
It can be clearly seen from this histogram that
the probability distribution for this random
variable X is symmetric and concentrated in the
middle values
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 23
Using a function (that is an algebraic formula to
assign probabilities is the most convenient
method of describing the probability distribution
of a discrete random variable.
The function that assigns a probability to each
value of X is called probability mass function
(PMF).
However this function may or may not be known.
The requirements of a PMF are
1- P( x) is between 0 and 1(inclusively) for each x.
2- Sum of probabilities for all values of x is always
equal to 1.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 24
13. 18/09/2017
13
Consider a random variable X having possible
values of 1,2, or 3. The corresponding
probability for each value is:
x1 =1 with probability 1/6
x2= 2 with probability 1/3
x3= 3 with probability 1/2
Determine an expression for the PMF
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 25
Consider the function
P(X = x) = P( x) = x/6 for x = 1,2,3
This function provides the probabilities
P(X =1) = P(1) = 1/6 (OK)
P(X =2) = P(2) = 2/6 = 1/3 (OK)
P(X =3) = P(3) = 3/6 = 1/2 (OK)
This functions satisfies the requirements for a
PMF as
Each probability is between 0 and 1and
P(1) + P(2) + P(3) = 1/6 +1/3+1/2 = 1
Consequently, the function P(x) = x/6 for
x=1,2,3 (and zero elsewhere) is the PMF for
this discrete random variable.Lecturer, Johaina Khalid, IMS,
University of Peshawar. 26
14. 18/09/2017
14
Check out Example 5.3 from book yourself.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 27
The mean of a discrete random variable ,
written as represents the average value of
the random variable if you were to observe this
variable over an indefinite period of time.
Reconsider our coin flipping example, Where X
is the number of heads in three flips of a coin.
Suppose you flip the coin three times, record
the value of X, and repeat this process ten
times. Now you have 10 observations of X.
Suppose they are
2222,,,,1111,,,,1111,,,,0000,,,,2222,,,,3333,,,,2222,,,,1111,,,,1111,,,,3333
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 28
15. 18/09/2017
15
The mean of these data is the statistic, ݔഥwhere
Sample mean=̅ݔ= (2+1…..+1+3) / 10 =1.6 heads
If you observed X indefinitely, what would X be on
the average?
Following are the list of possible values of X along
with their corresponding probabilities.
x1 = 0 with probability 1/8
x2 = 1 with probability 3/8
x3 = 2 with probability 3/8
x4 = 3 with probability 1/8
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 29
So the average value of X , is
(0)(1/8) + (1)(3/8) + (2)(3/8) + (3)(1/8) = 1.5 heads
Notice that X cannot be 1.5, this is merely the value
of X on the average.
The following formula can be used to compute the
mean of a discrete random variable
µµµµ ==== ΣΣΣΣ [[[[ xxxxiiii **** P(xP(xP(xP(xiiii)))) ]]]]
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 30
16. 18/09/2017
16
A personnel manager in a large production facility
is investigating the number of reported on the job
accidents over a period of 1 month. We define the
random variable
X = Number of reported accidents per month.
Based on past records, she has derived the
following probability distribution for X:
0 with probability 0.50
1 with probability 0.25
2 with probability 0.10
3 with probability 0.10
4 with probability 0.05
1.0
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 31
During 50 % of the months there were no
reported accidents, 25 % of the months had
one accident, and so on.
What is the mean or average value of X?
SolutionSolutionSolutionSolution
µ = Σ [ xi * P(xi) ]
µ = (0)*(.5) +(1)*(.25) +(2)(.1)+(3)(.1)+(4)*(.05)
==== 0000....95959595 reportedreportedreportedreported accidentaccidentaccidentaccident onononon averageaverageaverageaverage perperperper
monthmonthmonthmonth....
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 32
17. 18/09/2017
17
Reconsider the coin flipping example, Where X is
the number of heads in three flips of a coin.
Suppose you flip the coin three times, record the
value of X, and repeat this process ten times. Now
you have 10 observations of X. Suppose they are
2222,,,,1111,,,,1111,,,,0000,,,,2222,,,,3333,,,,2222,,,,1111,,,,1111,,,,3333
If we use the formulas studied in chapter 3 for
sample data to calculate mean and variance, the
values thus obtained are
Mean = ̅ݔ = 1.6
Variance = s2 = 0.933
However each of these measure describes the
sample and is a statistic. Lecturer, Johaina Khalid, IMS,
University of Peshawar. 33
If we consider observing X indefinitely, then the
variance is defined to be the variance of the
random variable X and is written as σ2
σ2 = variance of the discrete random variable X.
The variance of a discrete random variable X, is a
parameter describing the corresponding
population and can be obtained by using one of
the following expressions, which are
mathematically equivalent:
σ2222 ==== ΣΣΣΣ(x(x(x(x---- ))))2222 . P(x). P(x). P(x). P(x)
σ2222 ==== ΣΣΣΣxxxx2222P(x)P(x)P(x)P(x) ---- 2222
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 34
18. 18/09/2017
18
For the con flipping example
σ2222 ==== ΣΣΣΣxxxx2222P(x)P(x)P(x)P(x) ---- 2222
= [(0)2*(1/8) +(1)2*(3/8) +(2)2.
(3/8)+(3)2*(1/8)] –(1.5)2
= 3-2.25 = 0.75
EXAMPLEEXAMPLEEXAMPLEEXAMPLE 5555....5555
DetermineDetermineDetermineDetermine thethethethe variancevariancevariancevariance andandandand standardstandardstandardstandard deviationdeviationdeviationdeviation
ofofofof thethethethe randomrandomrandomrandom variablevariablevariablevariable describeddescribeddescribeddescribed inininin exampleexampleexampleexample
5555....4444 concerningconcerningconcerningconcerning onononon thethethethe jobjobjobjob accidentsaccidentsaccidentsaccidents
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 35
A personnel manager in a large production facility is
investigating the number of reported on the job accidents
over a period of 1 month. We define the random variable
X = Number of reported accidents per month.
Based on past records, she has derived the following
probability distribution for X:
0 with probability 0.50
1 with probability 0.25
2 with probability 0.10
3 with probability 0.10
4 with probability 0.05
1.0
Determine the variance and the standard deviation of the
random variable X defined above.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 36
19. 18/09/2017
19
XXXX P(x)P(x)P(x)P(x) x.Px.Px.Px.P(x)(x)(x)(x) XXXX2222.P(x).P(x).P(x).P(x)
0 0.5 0 0
1 0.25 0.25 0.25
2 0.1 0.2 0.4
3 0.1 0.3 0.9
4 0.05 0.2 0.8
Total 1.0 0.95 2.35
So, µ = Σ [ xi * P(xi) ]= 0.95 accident
σ2222 ==== ΣΣΣΣx2P(x) - 2 = 2.35 – (.95)2 = 1.45 accident 2222
σ = 1.45 ൌ 1.20 accidents
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 37
Three popular discrete random variables are
Binomial, hypergeometric and Poisson
random variables.
We will study only Binomial Random variable.
A binomial random variable counts the
number of successes out of n independent
trials.
The random variable X representing the
number of heads in three flips of a coin is a
special type of discrete random variable,
called a binomial random variable.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 38
20. 18/09/2017
20
The following are the conditions for a binomial
random variable in general and as applied to
the coin flipping example.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 39
A Binomial Situation (in general)A Binomial Situation (in general)A Binomial Situation (in general)A Binomial Situation (in general) For Coin flippingFor Coin flippingFor Coin flippingFor Coin flipping ExampleExampleExampleExample
1 Your experiment consists of n
repetitions called trials
n = three flips of a coin
2 Each trial has two mutually
exclusive possible outcomes (or
can be considered as having 2
outcomes) referred to as success
and Failure.
Success = Head, Failure = tail
3 The n trials are independent The results on 1 coin flip don ot
affect the results on another flip
4 The probability of a success for
each trial is denoted p; the value
of p remains same for each trial.
p = Probability of flipping a
head on a particular trial = ½
5 The random variable X is the
number of successes out of n trials
X = the number of heads out of
three flips.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 40
21. 18/09/2017
21
InInInIn exampleexampleexampleexample 4444....3333,,,, itititit waswaswaswas notednotednotednoted thatthatthatthat 30303030%%%% ofofofof thethethethe
peoplepeoplepeoplepeople inininin aaaa particularparticularparticularparticular citycitycitycity readreadreadread thethethethe eveningeveningeveningevening
newspapernewspapernewspapernewspaper.... SelectSelectSelectSelect fourfourfourfour peoplepeoplepeoplepeople atatatat randomrandomrandomrandom fromfromfromfrom
thisthisthisthis citycitycitycity.... ConsiderConsiderConsiderConsider thethethethe numbernumbernumbernumber ofofofof peoplepeoplepeoplepeople outoutoutout ofofofof
thesethesethesethese fourfourfourfour thatthatthatthat readreadreadread thethethethe eveningeveningeveningevening paperpaperpaperpaper.... DoesDoesDoesDoes
thisthisthisthis satisfysatisfysatisfysatisfy thethethethe requirementsrequirementsrequirementsrequirements ofofofof aaaa binomialbinomialbinomialbinomial
situation?situation?situation?situation? WhatWhatWhatWhat isisisis youryouryouryour randomrandomrandomrandom variablevariablevariablevariable herehereherehere
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 41
Referring to the conditions 1 through 5 for a binomial
situation.
1- n = 4 trials, where each trial means selecting a
person at random from the city.
2- There are 2 outcomes
Success = The person reads the evening newspaper
Failure = The person does not read the evening
newspaper.
3- the trails are independent
4- p = probability of success = probability that the
person selected at random reads the evening
newspaper = 0.3
5- Thus we may define our random variable X =
Number of people out of 4 who read the evening
newspaper (no of successes out of n independent
trials)
The variable X thus satisfies all the requirements and
thus may be called a binomial random variableLecturer, Johaina Khalid, IMS,
University of Peshawar. 42
22. 18/09/2017
22
For any binomial situation, the number of
ways of getting k successes out of n trials is
nCk.
We are thus able to determine the probability
mass function for any binomial random
variable as well.
EXAMPLEEXAMPLEEXAMPLEEXAMPLE::::
LetLetLetLet XXXX equalequalequalequal thethethethe numbernumbernumbernumber ofofofof headsheadsheadsheads outoutoutout ofofofof 3333 flipsflipsflipsflips....
HereHereHereHere XXXX isisisis aaaa binomialbinomialbinomialbinomial randomrandomrandomrandom variablevariablevariablevariable withwithwithwith
possiblepossiblepossiblepossible valuesvaluesvaluesvalues 0000,,,,1111,,,,2222 andandandand 3333
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 43
In order to find probability or derive a probability
mass function for each value of x , we must first
be able to find out the number of ways of getting
k successes out of n trials (that is no of ways of
getting 0 heads, 1 head, 2 heads n 3 heads out
of 3 flips of a coin)
Suppose if we have to find out the number of
ways of getting 2 heads out of 3 flips of a coin,
then this may be calculated as 3C2 = 3 (HHT,
HTH, THH)
Similarly we can do it for each value of our
binomial random variable.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 44
23. 18/09/2017
23
The probability mass function for a binomial
random variable may be expressed as
P(x)P(x)P(x)P(x) ==== nnnnCCCCxxxxppppxxxx((((1111----p)p)p)p)nnnn----xxxx forforforfor x=x=x=x= 0000,,,,1111,,,,2222,,,, ……………………....nnnn
EXAMPLEEXAMPLEEXAMPLEEXAMPLE:::: Derive the probabilities for each
value of random variable X , where X equal the
number of heads out f 3 flips with probability
of success or heads in each trial = p=0.5
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 45
We already know that the possible values of the
random variable X are 0, 1, 2 and 3 with
probabilities 1/8, 3/8,3/8 and 1/8.
This can be calculated from the probability mass
function for the random variable as well.
P(0)=3C0(0.5)0(1-0.5)3-0 = 1(0.125)=0.125= 1/8
P(1)=3C1(0.5)1(1-0.5)3-1 = 3(0.125)=0.375= 3/8
P(2)=3C2(0.5)2(1-0.5)3-2 = 3(0.125)=0.325= 3/8
P(3)=3C3(0.5)3(1-0.5)3-3 = 1(0.125)=0.125= 1/8
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 46
24. 18/09/2017
24
In example 5.6, the binomial random variable X
is the number of people (out of four) who read
the evening newspaper. Also there are n= 4
trials (people) with p =0.3 (30 % of the people
read the evening newspaper). Let S denote a
success and F a failure. Then define:
S = a person reads the evening newspaper
F = a person does not read the evening
newspaper
What is the probability that exactly two people
(out of four) will read the evening newspaper?
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 47
We know that Probability mass function for a
binomial random variable is
P(x) =P(x) =P(x) =P(x) = nnnnCCCCxxxxppppxxxx(1(1(1(1----p)p)p)p)nnnn----xxxx for x= 0,1,2, …….nfor x= 0,1,2, …….nfor x= 0,1,2, …….nfor x= 0,1,2, …….n
Here x= 2, n=4, p= 0.3, 1-p =0.7
Putting the values,
P(2) = 4C2(0.3)2(1-0.3)4-2
P(2) = 6 (0.3)2(0.7)2
P(2) =0.2646 =0.265
So 26.5% of the time, exactly two people out of
four will read the evening newspaper.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 48
25. 18/09/2017
25
For coming up with the probability Distribution for
the random variable X in this case, we need to find
out the corresponding probabilities for each value
of X as shown below:
P(0) = 4C0(0.3)0(0.7)4= 0.240
P(1) = 4C1(0.3)1(0.7)3= 0.412
P(2) = 4C2(0.3)2(0.7)2 = 0.265
P(3) = 4C3(0.3)3(0.7)1= 0.076
P(4) = 4C4(0.3)4(0.7)0= 0.008
One may check, that sum of all probabilities is
equal to 1 (or very close to 1 due to rounding
errors)
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 49
A graphical representation of the probability
mass function for the above example may be
seen below:
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 50
26. 18/09/2017
26
Suppose in example 5.6, you are interested in
finding out the probability that no more than
two people will read the evening paper.
This is called cumulative probability and is
obtained by summing P(x) over the
approximate values of X.
P(X ≤2) = P(x=0) +P(x=1) +P(X=2)
P(X ≤2) =0.240 +0.412 +0.265
P(X ≤2) =0.917.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 51
The shape of a binomial distribution is
Skewed left for p > ½ and small n
Skewed right for p < ½ and small n.
Approximately bell-shaped (symmetric) if p is
near ½ or if the number of trials is large.
Check out the figures A, B, C and D.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 52
27. 18/09/2017
27
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 53
Although one may use the formulas described
earlier to find out the mean and variance of a
of a binomial random variable but there are
convenient shortcuts as well as given below.
Mean of a Binomial random variable=Mean of a Binomial random variable=Mean of a Binomial random variable=Mean of a Binomial random variable=µµµµ =np=np=np=np
Variance of a Binomial variable=Variance of a Binomial variable=Variance of a Binomial variable=Variance of a Binomial variable=σ2222 =np(1=np(1=np(1=np(1----p)p)p)p)
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 54
28. 18/09/2017
28
Mean = µ =np
Mean = (4* 0.3) =1.2
Variance = σ2222 ====np(1-p)
Variance = 1.2(0.7)
Variance = 0.84
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 55
If you repeat example 5.6, using n=50 people
rather than n=4, how many evening newspaper
readers will you observe on the average.
Mean = µ =np
Mean = µ = (50 *0.3) = 15people
Variance =σ2222 =np(=np(=np(=np(1111----pppp))))
Variance = σ2222 ====15 (0.7) = 10.5
Variance = σ= √10.5 = 3.24 people
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 56
29. 18/09/2017
29
Airline overbooking is a common practice. Many
people make reservations on several flights due to
uncertain plans and then cancel at the last minute
or simply fail to show up. Eagle air is a small
commuter airline. Their plans hold only 15 people.
Past records indicate that 20% of the people
making a reservation do not show up for the flight.
Suppose that Eagle Air decides to book 18 people
for each flight.
1- Determine the probability that on any given
flight, at least one passenger holding a reservation
will not have a seat.
2- What is the probability that there will be one or
more empty seats for any one flight?
3- Determine the mean and standard deviation for
this random variable.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 57
DetermineDetermineDetermineDetermine thethethethe probabilityprobabilityprobabilityprobability thatthatthatthat onononon anyanyanyany givengivengivengiven flight,flight,flight,flight,
atatatat leastleastleastleast oneoneoneone passengerpassengerpassengerpassenger holdingholdingholdingholding aaaa reservationreservationreservationreservation willwillwillwill
notnotnotnot havehavehavehave aaaa seatseatseatseat....
X= Number of people(out of 18) who book a flight
and actually do appear.
Here we are interested in the probabilities that a
person comes up for the flight,
So n= 18, p= (1-0.2) = 0.8, 1-p = 0.2
There are 15 seats in the plane and 18 reservations
are made so if 16 or more than 16 people come for
the flight then the condition will hold true.
P(x≥16) = P(x=16) + P(x=17) + P(x=18)
P(x)P(x)P(x)P(x) ==== nnnnCCCCxxxxppppxxxx((((1111----p)p)p)p)nnnn----xxxx forforforfor x=x=x=x= 0000,,,,1111,,,,2222,,,, ……………………....nnnn
P(16) = 18C16(0.8)16(0.2)2= 153(0.028)(0.04)
P(16) = 0.1713
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 58
30. 18/09/2017
30
P(17) = 0.081
P(18) = 0.018
P(x≥16) = P(x=16) + P(x=17) + P(x=18)
P(x≥16) =0.172+0.081+0.018= 0.271
We see that if the airline follows this policy, 27%
of the time one or more passengers will be
deprived of a seat which is not a good situation.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 59
WhatWhatWhatWhat isisisis thethethethe probabilityprobabilityprobabilityprobability thatthatthatthat theretheretherethere willwillwillwill bebebebe oneoneoneone
orororor moremoremoremore emptyemptyemptyempty seatsseatsseatsseats forforforfor anyanyanyany oneoneoneone flight?flight?flight?flight?
As the plane holds only 15 people , so if 14
or less than 14 people come up for the flight
then there will be 1 or more empty seats.
P(X≤14) = P(x=14) +P(x=13) +….. +P(x=1)
+P(x=0)
P(X≤14) = 0.215
+0.151+…+0.003+0.001+0+0+0+0 = 0.50
With this booking policy, the airline will have
flights with one or more empty seats
approximately one half of the time.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 60
31. 18/09/2017
31
3333---- DetermineDetermineDetermineDetermine thethethethe meanmeanmeanmean andandandand standardstandardstandardstandard deviationdeviationdeviationdeviation
forforforfor thisthisthisthis randomrandomrandomrandom variablevariablevariablevariable....
Mean = µ =np
Mean = µ = (18 *0.8) = 14.4 people
So the average number of people who book a
flight and do appear is 14.4.
Variance =σ2222 =np(=np(=np(=np(1111----p)p)p)p)
Variance =σ2222 ==== 14.4 (0.2) = 2.88 people 2222
Standard deviation = 1.697 or 1.70 people
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 61
It is estimated that one out of 10 vouchers examined
by the audit staff employed by a branch of the
Department of Health and Human services will
contain an error. Define X to be no of vouchers in
error out of 20 randomly selected vouchers.
1- What is the probability that at least three
vouchers will contain an error?
2- What is the probability that no more than one
contains an error?
3- Determine the mean and standard deviation of X.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 62
32. 18/09/2017
32
X = no of vouchers in error out of 20 randomly
selected vouchers.
n=20, p= 0.10, 1-p = 0.90
1111---- WhatWhatWhatWhat isisisis thethethethe probabilityprobabilityprobabilityprobability thatthatthatthat atatatat leastleastleastleast threethreethreethree
vouchersvouchersvouchersvouchers willwillwillwill containcontaincontaincontain anananan errorerrorerrorerror????
If there are 3 or more than 3 vouchers with error
then this condition will satisfy, that is
P(X≥3) = P(x=3) +P(x=4)+ P(x=5)+….+P(x=20)
OR we may write it as
P(X≥3) = 1- P(X<3) = 1- [P(x=0) +P(x=1)
+P(x=2)]
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 63
P(X≥3) = 1- [P(0) +P(1) +P(2)]
P(X≥3) = 1- [0.122 +0.270+0.285]
P(X≥3) = 0.323
The probability that at leas three vouchers will
contain an error is 32.3%
2222---- WhatWhatWhatWhat isisisis thethethethe probabilityprobabilityprobabilityprobability thatthatthatthat nononono moremoremoremore thanthanthanthan
oneoneoneone containscontainscontainscontains anananan error?error?error?error?
P(X≤1) = P(x=0) +P(x=1)
P(X≤1) = 0.122 +0.270 =0.392
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 64
33. 18/09/2017
33
3- Determine the mean and standard deviation of
X.
Mean = µ =np
Mean = µ = (20 *0.10) = 2
So the average number of vouchers in error is 2.
Variance =σ2222 =np(1=np(1=np(1=np(1----p)p)p)p)
Variance =σ2222 ==== 2 (0.9) = 1.8 voucher 2222
SSSStandard deviation = 1.34 vouchers.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 65
A situation that requires the use of a binomial
random variable is lot acceptance sampling,
where you decide to accept or send back a lot.
A shipment of 500 calculator chips arrives at
Cassidy Electronics. The contract specifies that
Cassidy will accept this lot if a sample size of
10 from the shipment has no more than one
defective chip. What is the probability of
accepting the lot if, in fact, 10% of the lot (50
chips) are defective? If 20 % are defective?
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 66
34. 18/09/2017
34
This is the case of a binomial random variable where
X = no of defective chips out of 10 randomly selected
chips
So there are n =10 trials
Where each trial has 2 outcomes
Success = chip is defective
Failure = chip is not defective
If 10% are defective, thenIf 10% are defective, thenIf 10% are defective, thenIf 10% are defective, then
P=0.10, 1-p =0.90
Probability of acceptance = P(x≤1) =P(x=0) +P(x=1) =
0.349 +0.387 =0.736
This shows that in this sampling procedure, Cassidy
will accept the entire batch 73.6% of the time.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 67
IfIfIfIf 20202020% are defective, then% are defective, then% are defective, then% are defective, then
P=0.20, 1-p =0.80
Probability of acceptance = P(x≤1) =P(x=0)
+P(x=1) = 0.107 +0.268 =0.375
This shows that in this second case, Cassidy
will accept the entire batch 37.5% of the time.
Lecturer, Johaina Khalid, IMS,
University of Peshawar. 68