Professional Documents
Culture Documents
Probability Kiboko Kabsa
Probability Kiboko Kabsa
Probability Kiboko Kabsa
and
E1 ∪ E2 ∪ E3 =
𝑆𝑆𝑆, 𝑆𝑆𝑁, 𝑆𝑁𝑆, 𝑁𝑆𝑆, 𝑆𝑁𝑁, 𝑁𝑆𝑁, 𝑁𝑁𝑆, 𝑁𝑁𝑁 =S
Consider two event A and B are mutually
.
exclusive event such as
A B
Then n(A ∪ B) = n A + n B
⇒ ∴ P A or B = P A ∪ B
= P A + P(B)
Consider two events A and B which are
.
not mutually exclusive event such as
A B
Then n A ∪ B = n A + n B −n(A ∩ B)
∴ P A ∪ B = P A + P B − P(A ∩ B)
Example
In a political field , there are 20 CCM (C), 13
CHADEMA (D), and 6 ACT (A). If a person is
selected, find the probability that he or she is either
a CCM or an ACT
Soln.
the events are mutually exclusive events
then P C or A = P(C ∪ A)
∴ P(C ∪ A) = P C + P(A)
P(C ∪ A) = 20 + 6 = 26
39 39 39
26
∴P C∪A =
39
Example
P C ∪ male = 8 10 7 11
+ − =
13 13 13 13
Independent Event
Two or more events are said to be independent if
the occurrence of one event does not depend on
the occurrence other event
or for two events A and B are independent events
if and only if
P A ∩ B = P(A) × P(B)
. Example
Suppose that a fair coin is tossed twice with “A”
“Head on the first toss” and B event “head on the
second toss”
If the outcomes of the sample space is
S = { HH, HT, TH, TT } Show that
P A ∩ B = P A × P(B)
2 1
P A = P HH, HT = =
4 2
2 1
P B = P HH, TH = =
4 2
1 1 1
P A ∩ B = P HH = = P A × P(B)= ×
4 2 2
1
∴ P A∩B =P A ×P B =
4
, Example
Suppose that two machines I and II are
operated in a factory independently of each other.
Let E1 be the event that machines I will break down
and let E2 be the event that machine II will break
down if P E1 = 0.32 and P E2 = 0.2 Determine the
probability that at least one of the machines will
break down
Soln.
The probability that both machines will break
down is
P(E1 ∩ E2 ) = P(E1 ) × P(E2 ) = (0.32) × (0.2) = 0.064
The probability of at least one machines will
break down is
P E1 ∪ E2 = P E1 + P(E2 )−P( E1 ∩ E2 )
. = 0.32 + 0.2 − 0.064
= 0.34 − 0.064
∴ P E1 ∪ E2 = 0.456
Dependent Event
-The event that depends on other events. In
dependent event we have conditional
probability
-Thus conditional probability addresses the
question of whether one event dependent on
another one .
. Consider the tree diagram for any two
dependent events A and B as shown.
P A ∩ B = P(A) × P(B A)
P A ∩ B′ = P(A) × P(B′ A)
start
P A′ ∩ B = P(A′) × P(B A′)
P(A ∩ B)
P(B A) =
P(A)
Note
P(B A) + P(B′ A) = 1
P(A) + P(A′) = 1
P(B A′) + P(B′ A′) = 1
. Example
A and B are two events with probability given
that P A = 0.4, P B = 0.7 and P A ∩ B = 0.35
(i) Find P(A B) and P B A
(ii) Show that the events A and B are not independent
Soln. P(A ∩ B) 0.35 = 0.5
(i) P(A B) = =
P(B) 0.7
P(B A) = P(A ∩ B) = 0.35 = 0.875
P(A) 0.4
(ii) for independent
P A ∩ B = P(A) × P(B)
and for dependent P A/B ≠ P(A)
P(A ∩ B) ⇒ P(B A) = P(A) × P(B)
then from P B/A = P(A)
P(A)
∴ P(B A) = P(B)
. Since P(B A) = P(B)
∴ the events A and B are not independent
hence shown
Example
Mr. Bill is buying two goldfish from a pet shop. The
shop’s tank contains seven male fish and eight fish
but all look the same . Find the probability that Bill’s
fish are
(i) both the same sex
(ii) both female
(iii) both female given that they are the same sex
Consider tree diagram
2nd fish
1st fish
7 6 42
P both male = 15 × =
14 210
8 7 56
P both 𝑓𝑒𝑚𝑎𝑙𝑒 = × =
15 14 210
7 8 56
P male, 𝑓𝑒𝑚𝑎𝑙𝑒 = × =
15 14 210
8 7 56
P 𝑓𝑒male, 𝑚𝑎𝑙𝑒 = × =
15 14 210
11 20 sugar
neither
9 20 no sugar
the probability of the customer take sugar
(0.7 × 3 5) + (0.2 × 1 4) + (0.1 × 11 20) = 0.525
. P(customer takes Sugar and Milk)
= (0.7 × 3 5) = 0.42
∴ P(customer takes Sugar and Milk / customer sugar)
P(M∩S) 0.42
P M S = = = 0.8
P(S) 0.525
Rules of Probability
For events of S then the following rules are
satisfies
(i) 0 ≤ P E ≤ 1 for all events E ⊂ 𝑆
(ii) P S = 1
(iii) if E1 , E2 −− − is sequence of mutually exclusive
events in S then P S = P E1 ∪ E2 ∪−− −
(iv) if E ∪ E ′ = S where E′ is the event
.
that E does not occur then E ∪ E ′ = S and
E ∩ E′ = ∅
(v) P E + P(E ′ ) = 1
Consider the table below with set algebra
B B′
A A∩B A ∩ B′ A
A′ A′ ∩ B A′ ∩ B′ A′
B B′ 𝑆
then P A ∩ B′ + P A′ ∩ B′ = P(B′ )
P A ∩ B + P A′ ∩ B = P(B)
P A ∩ B + P A ∩ B′ = P(A)
P A′ ∩ B + P A′ ∩ B′ = P(A′)
. Example
If P A = 0.5, P B = 0.3 and P A ∩ B = 0.2 find the
probability of
(a) P A ∩ B′
soln.
from . P A ∩ B + P A ∩ B′ = P(A)
P A ∩ B′ = P A − P(A ∩ B)
∴ P A ∩ B′ = 0.5 − 0.2 = 0.3
(b) P A′ ∩ B
from . P A ∩ B + P A′ ∩ B = P(B)
P A′ ∩ B = P B − P(A ∩ B)
P A′ ∩ B = 0.3 − 0.2 = 0.1
. (c) P A′ ∩ B′
from . P A′ ∩ B + P A′ ∩ B′ = P(A′)
P A′ ∩ B′ = P A′ − P(A′ ∩ B)
∴ P A ∩ B = 0.6
. Example
Consider two events E and F such that
P E = 0.2, P F = 0.6 calculate P(E ′ ∩ F) for each
of the following conditions
(i) E and F are mutually exclusive .
then E ∩ F = ∅ and F ⊆ E′
so that E ′ ∩ F = F
E ′ ∩ F = F ⇒ P(E ′ ∩ F) = P(F)
∴ P E′ ∩ F = 0.6 since P F = 0.6
(ii) E ⊂ F
then F = E ∪ (E ′ ∩ F) ⇒ P F = P E + P(E ′ ∩ F)
P E ′ ∩ F = P F − P(E) ∴ P E ′ ∩ F = 0.6 − 0.2 = 0.4
(iii)P E ∩ F = 0.1 then from P E ′ ∩ F + P(E ∩ F) = P(F)
P E ′ ∩ F = P F − P(E ∩ F)= 0.6 − 0.1 = 0.5
∴ P E ′ ∩ F = 0.5
Quiz
In a certain small town the probability that a women
attends a family planning clinic is 0.4 and the
probability that her husband attends the clinic is 0.4 .
The probability that a husband attends a clinic given
that the wife does is 0.08 calculate the probability
that
(i) both wife and husband will attend the clinic
(ii) the wife will attend the clinic given that the
husband does
(iii) One of the two persons will attend a clinic
Bayes’ Rule
.Bayes' rule allows us to update predicted
probabilities of an event by incorporating new
information.
Consider a patient at a given hospital under going
test for Aids . Let A be event that a person under go
the test suffer from Aids. Let B be event that the test
indicates that the person tested has HIV
P A∩B
Then P(A B) =
P B
but P A ∩ B = P(B A) × P A … . . . (i)
and P B = P A ∩ B + P A′ ∩ B … . . . (ii)
P A∩B
then substitute into P(A B) =
P B
P(B A) × P A
∴ P(A B) =
P A ∩ B + P A′ ∩ B
.
P(B A) × P A
∴ P(A B) =
P(B A) × P A + P(B A′) × P A′
∴ P(A B) = 0.08716
. Example
1st box contains 2 white and 3 red ball , 2nd box
contains 4 white and 5 red ball. One of the ball is
drawn at random from one of the box and is found to
be red. Find probability it was drawn in second box.
soln .
let A be 1st box and B be 2nd box
then probability of obtaining a box
1 1
P A = P B =
2 2
condition probability 3 5
P R A = P R B =
5 9
require P(R B)×P(B)
P B R =
P R B ×P B +P R A ×P(A)
5 1
. ×
9 2 25
P B R = 5 1 3 1 =
× + × 52
9 2 5 2
25
∴ P B R =
52
Quiz
Three machines A,B and C produce 60% , 30%
,10% respectively items. Defective % are 2% ,3%
and 4% respectively. An item is selected at random
and is found defective. Find probability that items
were produced by machine C
. Sampling Without Replacement
Example
In a basket containing 3 yellow cards and 5 blue
cards. Find the probability that when two cards
drawn one at a time.
5 8 𝑏
(a) Both are blue = 5 8 × 5 8 = 25 64
(b) of different color = 3 8 × 5 8 + 5 8 × 3 8 = 30 64
(c) Both are yellow . = 3 8 × 3 8 = 9 64
. (ii) Without replacement .
consider the tree diagram .
2 7 𝑦
𝑦
3 8 5 7
1st 𝑏
3 7 𝑦
5 8 𝑏
4 7 𝑏
(a) Both are blue = 5 8 × 4 7 = 20 56
(b) of different color = 3 8 × 5 7 + 5 8 × 3 7 = 30 56
(c) Both are yellow . = 3 8 × 2 7 = 6 56
Permutations & Combinations
.A permutation –Is the arrangement of
number or object in a particular ways (order)
Consider cards A, K, Q
How many different ways could these cards be put
together (order is important)
soln .
The tree diagram is used to derive the permutation
. 3rd
Position
soln .
8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40320
Suppose .
Four boys are running in race in how
many ways can 1st two places be taken
by the boys
Where
𝑟≤𝑛 𝑛 = 𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟
r = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑡𝑜 𝑏𝑒 𝑝𝑖𝑐𝑘𝑒𝑑
then 4! 4! 4×3×2!
4𝑃 2 = = = = 12
(4−2)! 2! 2!
Note 1! = 1 and 0! = 1
. Example
A code consists of 3 letter followed by 2 number, How
many code words can be made if no letter or digits is
repeated in any code work
Soln.
From 26 and 10 number then the arrangement
are 26𝑃 3 × 10𝑃 2 = 1404000
Example
How many arrangements can be made of the
letters in the word TROTTING ?
In how many of these are the N and the G next
to each other?
. Soln.
The arrangement of TROTTING
8! = 6720
=
3!
= 20 × 19! − 2 × 19!
= 19! × 20 − 2 = 19! × 18
Combinations
. - A selection of object which is made without
regard to the order
Consider the cards as A, K, Q,J.
How many combination are there if two cards
are chosen .
Then AK, AQ, AJ,KA,KQ,KJ,QA,QK,QJ,JA,JK,JQ.
but. AK , KA…….1
AQ , QA…….1
AJ , JA…….1
KQ , QK…….1
QJ , JQ…….1
JK , KJ…….1
6 combinations
.
In general for r objects chosen from n unlike
objects the number of combination is given as
𝑛!
𝑛𝐶𝑟 =
(𝑛−𝑟)!𝑟!
Example
A school Governor’s committee of five people is
to be chosen from eight applicants. How many
different selections are possible?
soln.
Number of selections is given as
8!
8𝐶5 = = 56
(8−5)!5!
. Example
A cricket team consisting of 6 batsmen, 4
bowlers and 1 wicket- keeper is to be selected
from a group of 18 cricketers Comprising 9
batsmen,7 bowlers and 2 wicket-keepers. How
many different team can be selected?
soln.
The batsmen can be selected in 9𝐶6 ways
The bowlers can be selected in 7𝐶4 ways
The wicket-keepers can be selected in 2𝐶1 ways
Total number of teams = 9𝐶6 × 7𝐶4 × 2𝐶1
= 5880 ways
. Example
A girl wants to ask 8 friends to tea but there is
only room for 4 of them. In how many ways
can she choose whom to invite if two of them
are sisters and must be invited
soln.
If two sisters are invited
6𝐶2 = 6!
= 15
4!2!
P E = 0.24871
. Example
Prove that nC r + nCr-1 = n+1Cr
Consider the LHS
nC r + nCr-1
𝑛! 𝑛!
= +
𝑟! (𝑛 − 𝑟)! (𝑟 − 1)! (𝑛 − (𝑟 − 1))!
𝑛! 𝑛!
= +
𝑟! (𝑛 − 𝑟)! (𝑟 − 1)! (𝑛 − 𝑟 + 1)!
𝑛! 𝑛!
= +
𝑟(𝑟 − 1)! (𝑛 − 𝑟)! (𝑟 − 1)! (𝑛 − 𝑟 + 1)(𝑛 − 𝑟)!
𝑛! 1 1
= +
(𝑟 − 1)! (𝑛 − 𝑟)! 𝑟 𝑛−𝑟+1
. 𝑛! 𝑛−𝑟+1+𝑟
(𝑟 − 1)! (𝑛 − 𝑟)! 𝑟(𝑛 − 𝑟 + 1)
𝑛! 𝑛+1
(𝑟 − 1)! (𝑛 − 𝑟)! 𝑟(𝑛 − 𝑟 + 1)
(𝑛 + 1) 𝑛!
𝑟 (𝑟 − 1)! ((𝑛 + 1) − 𝑟) (𝑛 − 𝑟)!
(𝑛 + 1)!
𝑟! (𝑛 + 1 − 𝑟)!
∴ 𝑛 + 1 𝐶𝑟
Hence proved
. Quiz
Show that
𝑛𝐶𝑟+1 + 𝑛𝐶𝑟 = (𝑛 + 1) 𝐶(𝑟+1)
Probability Density Function for
Discrete Variable
. A random variable is said to be discrete if it
assumes only a countable number of values on
the real line
Consider example
Suppose that three teenager boys are selected at
random from a school parade and each is asked
whether is a smoker (S) or he does not (N) then
the sample space of this random experiment is
given by
S = { NNN, NNS, NSN,SNN,NSS,SNS,SSN,SSS }
Let X denoted the number of smoker among the
three chosen boys. .
. then.
𝑋 𝑆𝑆𝑆 = 3, 𝑋 𝑆𝑆𝑁 = 𝑋 𝑆𝑁𝑆 = 𝑋 𝑆𝑆𝑁 = 2,
note that
P 𝑋 =0 +P 𝑋 =1 +P 𝑋 =2 +P 𝑋 =3 =1
the table indicates how the probability is distributed
over the possible values such a function is called a
probability distribution of X and X is a real values
function 𝑓(𝑥) of 𝑥 defined by
𝑓 𝑥 =P 𝑋=𝑥 and Satisfying
𝑛=3
𝑥=0 𝑓(𝑥) =1
.
Example
A digit is selected at randomly from among the
digits 0,1,2,3,4,5,6,7,8,9 Let X denote the
digit selected. What is the probability
distribution of X
soln. assume that each digit has an equal chance
of being selected
1
P 𝑋 = 𝑥 = 10 , 𝑥 = 0, 1,2,3,4,5,6,7,8,9
and P(X = 𝑥) = 0, 𝑥 ∉ = 0, 1,2,3,4,5,6,7,8,9
∴ the probability distribution of X is given by .
1
, 𝑥 = 0, 1,2 −− − 9
𝑓 𝑥 = 10
0 , otherwise
9
where 𝑓 𝑥 ≥ 0 and 𝑥=0 𝑓(𝑥) = 1
. Example
Consider a family of three children suppose
that every child has the same probability "𝑡" of
being a girl, independently of each other. Let
X denote the number of girls in a randomly
selected family. Determine the probability
distribution of X
soln.
Let G denote a girl and B a boy
then
S = {GGG,GGB,GBG,BGG,BBG,BGB, GBB,BBB}
Let X denote the number of girl
then P(X=0) = P({BBB}) but
P({B}) = 1 − P( G )
. P({B}) = 1 − 𝑡
then
P X = 0 = (1 − 𝑡) × (1 − 𝑡) × (1 − 𝑡)
(1 − 𝑡) 3
∴P X=0 =
similarly
P X = 1 = P GBB or BGB or BBG
=P GBB) + P BGB + P(BBG
= 𝑡(1 − 𝑡)2 + 𝑡(1 − 𝑡)2 + 𝑡(1 − 𝑡)2
= 3𝑡(1 − 𝑡)2
P X = 2 = P GGB or GBG or BGG
= 𝑡 2 (1 − 𝑡) + 𝑡 2 (1 − 𝑡) + 𝑡 2 (1 − 𝑡)
= 3𝑡 2 (1 − 𝑡)
P X = 3 = P GGG = 𝑡 3
. Note that
3
then
3 3
𝑓(𝑥) = P(X = 𝑥) = 1
𝑥=0 𝑥=0
3
(1 − 𝑡)3−𝑥 𝑡 𝑥 , 𝑥 = 0,1,2,3
𝑓 𝑥 = 𝑥
0 , otherwise
In general the Binomial distribution is given by.
𝑁 𝑁−𝑥 𝑥
𝑄 𝑃 , 𝑥 = 0,1,2 … . . 𝑁
P 𝑥 = 𝑥
0 , otherwise
Where P is probability that an event will occur
Q is probability that an event will not occur
N is the finite number of trials on random sample
𝑥 is the number of success
and the probability is such that P + Q = 1
. Example
In a ten questions true and false examination
A student tosses a fair coin to determine his
answer to each question. Find the probability
that (a) He has exactly eight correct answers
(b) has at least eight correct answers
Soln
𝑁 𝑁−𝑥 𝑥
𝑄 𝑃 , 𝑥 = 0,1,2 … . . 𝑁
P 𝑥 = 𝑥
0 , otherwise
where
1 1
𝑃 = , Q = , N =10 and 𝑥 = 8
2
2
10 1 10−8 1 8
P X=8 = × × = 0.04
8 2 2
. At least eight
P X ≥ 8 = P X = 8 +P X = 9 + P X = 10
10 1 10−8 1 8
P X≥8 = × ×
8 2 2
10 1 10−9 1 9 10 1 0 1 10
+ × × + × ×
9 2 2 10 2 2
= 0.054
. Example
If 20% of the bolts produced by a machine are
defective determine the probability that out of
4 bolts chosen at random
(a) 1 (b) 0 (c) at most 2 bolts will be defective
Soln
the probability of defective let be P = 0.2
and non defective let be 𝑄 = 1 − 0.2 = 0.8
(a) Pr(1 defective bolt out of 4) = 4C1 × (0.2)1 × (0.8)3
= 0.4096
(b) Pr(0 defective bolt) = 4C0 × (0.2)0 × (0.8)4
= 0.4096
.
(c) Pr(at most 2 bolts will be defective )
Pr X ≤ 2 =
= Pr X = 0 +Pr X = 1 + Pr X = 2
= 4C0 × (0.2)0 × (0.8)4 + 4C1 × (0.2)1 × (0.8)3
+ 4C2 × (0.2)2 × (0.8)2 = 0. 97298
Probability Density Function for
Continuous Variable
A random variable is said to be continuous if it
assumes any value in an interval of the real line
Thus continuous variable assumes an uncountable
number values
Consider experiment is conducted to determine the
average life time failure measured in seconds , Let X
be a continuous random. Variable which assumes
values in an interval on the real line
then 𝑛
P(X𝑖 ) = 1
𝑖=1
Is continuous distributed over the entire range of X
. Then let ∆P denote the total
of probability distributed over the
sub-interval
and let ∆X be the total element over the sub-
interval
∆P
∴ is the probability of single element over the
∆X
sub – interval
and let 𝑓(𝑥) be continuous function of 𝑥
∆P 𝑑𝑃
then 𝑓 𝑥 = lim ≈ = 𝑓(𝑥)
∆P→0 ∆X 𝑑𝑥
∆X→0
𝑑P = 𝑓 𝑥 𝑑𝑥
but 𝑓(𝑥) is the probability density at the point x in the
interval and let the interval be “a” and “b”
. from 𝑑P = 𝑓 𝑥 𝑑𝑥
𝑏
then 𝑑P = 𝑎
𝑓 𝑥 𝑑𝑥
𝑏
P = 𝑎
𝑓 𝑥 𝑑𝑥
𝑏
but P = P a ≤ 𝑥 ≤ b = 𝑎
𝑓 𝑥 𝑑𝑥
𝑏
and P a ≤ 𝑥 ≤ b = 𝑎
𝑓 𝑥 𝑑𝑥 = 1
𝑓 𝑥 , 𝑎≤𝑥≤𝑏
P 𝑥 =
0, Otherwise
∴ P(1 ≤ 𝑥 ≤ 2)
2 𝑥 1 1
= 1 5
+ 𝑑𝑥 =
30 3
. Example
Let X be continuous random variable
which assumes values in the interval 0
to infinite let x have p.d.f given by
𝑒 −𝑥 , 𝑥 ≥ 0
𝑓 𝑥 =
0 , otherwise
Calculate P 𝑥 ≥ 𝑎 , 𝑎 > 0
soln P(𝑥 ≥ 𝑎) = P(𝑎 ≤ 𝑥 ≤ ∞)
∞
P 𝑥≥𝑎 = 𝑒 −𝑥 𝑑𝑥
𝑎
= −𝑒 −∞ − (−𝑒 −𝑎 )
= 𝑒 −𝑎
Expected Value of X or the
Expectation of x
Suppose that 𝑋1 occurs 𝑓𝑟 (𝑥1 ) times 𝑋2 occurs 𝑓𝑟 (𝑥2 )
times and so on
The sum of the observed values of X is then given as
𝑥1 𝑓𝑟 (𝑥1 ) + 𝑥2 𝑓𝑟 𝑥2 + 𝑥3 𝑓𝑟 𝑥3 ……….. 𝑥𝑛 𝑓𝑟 (𝑥𝑛 )
∴ E 𝑥 = 𝑥1 P1 + 𝑥2 P2 + 𝑥3 P3 + . . . 𝑥𝑛 Pn
Note that ∴ E 𝑥 = 𝑥 = 𝜇
. Example
Find E(x) and E 𝑥 2 for a binomial
experiment in the parameters P and n
where
n = number of trials , P= probability of
success
𝑛
soln E x = xP(x𝑖 )
𝑖=1
but 𝑛 x n−x
P x = 𝑥
P Q
then 𝑛 𝑛! x Qn−x
E(x) = 𝑥
𝑥=1 (𝑛−𝑥)!𝑥! P
𝑛 𝑛(𝑛−1)!𝑥 x−1 Qn−x
= P
𝑥=1 (𝑛−𝑥)!𝑥(𝑥−1)! P
𝑛 (𝑛−1)!
= nP 𝑥=1 Px−1 Qn−x
(𝑛−𝑥)!(𝑥−1)!
𝑛 (𝑛−1)!
nP 𝑥=1 Px−1 Qn−x
(𝑛−𝑥)!(𝑥−1)!
𝑛−1
= nP 𝑥−1
Px−1 Q(n−1)−(x−1)
𝑛 𝑛!
= 𝑥=1[𝑥 𝑥−1 + 𝑥] Px Qn−x
(𝑛−𝑥)!𝑥!
𝑛 𝑛! 𝑛!
= 𝑥=1 𝑥(𝑥 − 1) Px Qn−x + 𝑛
𝑥
𝑥=1 (𝑛−𝑥)!𝑥! P x Qn−x
(𝑛−𝑥)!𝑥!
𝑛 𝑛 𝑛−1 (𝑛−2)!
= 𝑥=1 𝑥(𝑥 − 1) P2 Px−2 Qn−x + nP
(𝑛−𝑥)!𝑥(𝑥−1)(𝑥−2)!
2 𝑛 (𝑛−2)!
= 𝑛(𝑛 − 1)P 𝑥=2 Px−2 Qn−x + nP
(𝑛−𝑥)!(𝑥−2)!
= Px 2 − Px 2
∴ Var(x) = E(x 2 ) − [E x ]2
or Var(x) = E( x − 𝜇 2 )
= E(x 2 − 2𝜇x + 𝜇2 )
= E(x 2 ) −E(2𝜇x)+ E(𝜇2 )
= E(x 2 ) −2𝜇E(x) + 𝜇2
= E(x 2 ) −2𝜇2 + 𝜇2 = E x 2 − 𝜇2
but in terms of 𝑛, P, Q
Since E x 2 = 𝑛 𝑛 − 1 P2 + 𝑛P
𝜇 = E(x) = 𝑛P
(i) E ax + b = aE x + b
(ii) E ax + bx = aE x + bE x
Example
What is the expectation of the score when an
unbiased die is rolled once ? If the probability
distribution is
Outcome 1 2 3 4 5 6
1 1 1 1 1 1
Probability 6 6 6 6 6
6
𝑛
soln
The expected score, E x = x𝑖 P(x𝑖 )
𝑖=1
1 1 1 1 1 1
= 1 × + 2 × + 3 × + 4 × + 5 × + 6 × = 3.5
6 6 6 6 6 6
Example
What is the expectation of the square of the whe
Number that comes up when a fair die is rolled
at once
soln
Let X be the number when the die is rolled then
E x 2 = 6𝑖=1 x 2 i P(xi )
2
1 2
1 2
1 2
1 2
1 2
1
=1 × +2 × +3 × +4 × +5 × +6 ×
6 6 6 6 6 6
= 15.17
.
Example
If the probability of a defective bolt is 0.1 find
(a) the mean (b) Variance (c ) the standard
deviation for the distribution of defective bolts in
a total of 400
soln
(a) Mean = 𝑛P = 400 × (0.1) = 40
(b) Variance = 𝑛PQ = 400 × (0.1) × (0.9) = 36
(c) Standard deviation = 𝑛PQ = 36 = 6
.
Example
The random variable has following probability
distribution
𝑥: 1 2 3 4
Find
(i) Var(x)
E(x)= 1 × 0.6 + 2 × 0.2 + 3 × 0.1 + 4 × 0.1 = 1.7
E x 2 = 12 × 0.6 + 22 × 0.2 + 32 × 0.1 + 42 × 0.1
= 3.9
. ∴ Var(x) = E(x 2 ) − [E x ]2
= 3.9 − [1.7]2
= 1.01
(ii) Var(7)
∴ Var(7) = E(72 ) − [E 7 ]2
= E(49) −[7]2
= 49 − 49
∴ Var(7) = 0
(iii) Var(3x)
∴ Var(x) = E((3x)2 ) − [E 3x ]2
= E 9 x 2 − [3E x ]2
= 9E x 2 − [3E x ]2
. = 9E x 2 − [3E x ]2
but E(x 2 ) = 3.9 and E(x) = 1.7
= 9 × 3.9 − [3 × 1.7]2
= 9.09
(iv) Var(3x + 7)
∴ Var(3x+7) = E((3x + 7)2 ) − [E 3x + 7 ]2
= E(9x 2 + 42x + 49) −[3 E x + 7]2
= 9E(x 2 ) + 42 E(x) + E(49) −[3 × 1.7 + 7]2
2
= 9 × 3.9 + 42 × 1.7 + 49 −[12.1]
= 9.09
The Poisson Distribution
Is the discrete probability distribution
Consider binomial distribution
𝑛
P 𝑥 = 𝑥
P 𝑥 (1 − P)n−x
𝑛!
= P 𝑥 (1 − P)n−x
(𝑛 − 𝑥)! 𝑥!
𝜇
but μ = nP ⇒ P = 𝑛
𝑛! 𝜇 𝑥 𝜇 𝑛−𝑥
∴ = ( ) × (1 − )
(𝑛 − 𝑥)! 𝑥! 𝑛 𝑛
n (𝑛 − 1) … … . (𝑛 − 𝑥 + 1)(𝑛 − 𝑥)! 𝜇 𝑥
= ×( )
(𝑛 − 𝑥)! 𝑥! 𝑛
𝜇 𝑛−𝑥
× (1 − )
𝑛
.
n (𝑛 − 1) … … . (𝑛 − 𝑥 + 1) 𝜇𝑥 𝜇 𝑛−𝑥
= × × (1 − )
𝑛𝑥 𝑥! 𝑛
𝜇 𝑥
𝑛 (𝑛 − 1) (𝑛 − 𝑥 + 1) 𝜇 𝑛−𝑥
= × × ……. × × (1 − )
𝑛 𝑛 𝑛 𝑥! 𝑛
1 𝑥+1 𝜇𝑥 (1 − 𝜇 𝑛)𝑛
= 1− ×⋯× 1− × ×
𝑛 𝑛 𝑥! (1 − 𝜇 𝑛)𝑥
the introduce limit as 𝑛 → ∞
𝜇𝑥
then P x = 1 × ⋯ 1 ×
𝑥!
lim 1 − 𝜇 𝑛 𝑛 ≈ 𝑒 −𝜇 and lim 1 − 𝜇 𝑛 𝑥
≈1
𝑛→∞ 𝑛→∞
𝜇 𝑥 × 𝑒 −𝜇 𝜇 𝑥 𝑒 −𝜇
∴ P x = 1× ×1 =
𝑥! 𝑥!
. ∴ The Poisson is given by
𝜇 𝑥 𝑒 −𝜇
P x =
𝑥!
where 𝜇 = mean
Example
The number of defects in a wire cable can be
modelled by the Poisson distribution with a mean
of four defects per kilometer What is the
probability that a single Kilometer of wire will
have exactly two defects
. soln.
−1 2
𝑧
𝑒2
∴ P(𝑧) =
𝛿 2𝜋
and the graph is given as Y 𝝁=𝟎
a 0 b 𝑍
𝟎. 𝟓 𝟎. 𝟓
…
Example
Assuming the distribution of the height of adult
men is normal with mean 174cm and standard
deviation 7cm , find the probability that a
randomly selected adult man is
(i) Under the 185 cm (ii) Over 185 cm (iii)
between 180cm and 185 cm
(iv) Under 170 cm
soln.
The mean height , 𝜇 = 174
The standard deviation 𝛿 = 7
(i) Under 185 cm
then 𝑥 = 185 cm and so 𝑍 = 𝑥−𝜇
𝛿
𝑥−𝜇 185−174
∴ 𝑍= = = 1.571
𝛿 7
then use normal table to find area
∴ P 1.571 = 0.4418
which is area as
⇒ 𝜇 = 77.926 , 𝛿 = 9.4
Example
The continuous random variable has p.d.f 𝑓(𝑥)
𝑘(𝑥 + 2)2 −2 ≤ 𝑥 < 0
4
where 𝑓 𝑥 = 4𝑘 0≤𝑥≤
3
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
(a) Find the value of the constant 𝑘
(b) Find the P(𝑋 > 1)
. Since X is a random variable ,
4
0
∴ −2
𝑘 (𝑥 + 2)2 𝑑𝑥 + 3
0
4𝑘𝑑𝑥 = 1
0 4 3
𝑘
(𝑥 + 2)2 + 4𝑘 𝑥 = 1
3
−2 0
𝑘 4
8 + 4𝑘 =1
3 3
8𝑘 = 1
1
𝑘=
8
1
(𝑥 + 2)2 −2 ≤ 𝑥 < 0
8
∴ 𝑓 𝑥 = 1 4
0≤𝑥≤
2 3
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
. (b) for P X > 1
4
then P X > 1 ⇒ P X > 1 = P(1 < 𝑥 < )
3
4 4
3 3
4 1 1
P 1<𝑥< = 𝑑𝑥 = 𝑑𝑥
3 2 2
1 1
1
4 3
1 4 1 1
= [𝑥] = − 1 = ×
2 2 3 2 3
1
1
=
6
The Normal Approximation to the
Binomial Distribution
Under certain circumstances the normal distribution
can be used as an approximation to the binomial
distribution as for large 𝑛 and P is close to 0.5
𝑋~𝑁 𝑛𝑝, 𝑛𝑝𝑞 approximately
Example
It is known that in a sack of mixed grass seeds 35%
are gray grass. Use the normal approximation to the
Binomial distribution to find the probability that in a
sample of 400 seeds there are
(a) Less than 120 gray grass seeds,
(b) Between 120 and 150 gray seeds (inclusive )
(c) More than 160 gray seeds
. Then 𝑋~𝑁(𝑛𝑝, 𝑛𝑝𝑞)
Where 𝑛 = 400 and P = 0.35
then 𝑛𝑝 = 400 × 0.35 = 140
𝑛𝑝𝑞 = 400 × 0.35 × 0.65 = 91
𝑋~𝑁(140 , 91)
(a) 𝑃 𝑋 < 120 ⇒ 𝑃 𝑋 < 119.5
119.5−140
⇒ 𝑍= = −2.149
91
= 𝑃(𝑍 < −2.149)
= 0.0158
119.5−140 150.5−140
𝑃 119.5 < 𝑋 < 150.5 = 𝑃 91
<𝑋<
91
= 0.0158