Professional Documents
Culture Documents
BG2209 - Prob
BG2209 - Prob
BG2209 - Prob
for Engineers
Part 1 : Probability
1. Introduction
BG2209 : Statistics for Engineers
Instructor
• Dr. Jerapong Rojanarowan
6
• Office: VME0503
• Email: jerapongrjn@au.edu
Grading
• Quiz 1 5% &
• Quiz 2 5%
• Midterm exam 35%
• Final exam 45%
• Assignment 10%
Textbook
• R. Walpole, R. Myers, S. Myers, and K. Ye, “Probability and Statistics
for Engineers and Scientists”, 8th Edition, 2007, Prentice-Hall
Slides
• http://sites.google.com/site/jerapong/bg2209
Contents
• Introduction
• Set
• Basic probability
• Counting techniques
• Conditional probability
• Random variables
• Probability distributions
• Joint probability distributions
• Mean and variance
Contents (Cont.)
• Special discrete random variables
• Special continuous random variables
• Normal distribution
• Introduction to statistics
• Parameter estimation
• Sampling distributions
• Confidence Intervals
• Hypothesis testing
Class Policies
• You must check for updates and announcements. It is your
responsibility to keep yourself posted about the class
• Exams and quizzes will be closed-book and closed-notes
• Students are allowed to bring a non-programmable calculator
• In quizzes, you cannot borrow a calculator, erasure, etc. from your
friend
• No make up quiz in any cases
Class Policies (Cont.)
• Assignment is due in class a week after it is assigned. Late assignment
will not be accepted in any case
• You have to show all your work, not just the results, to receive credits
• When you are in class, you must concentrate on the lecture. If you
talk to other students, I will ask you questions about the lecture
• Mobile phones must be turned off
• Electronic devices such as CD players, iPods are not allowed
Mathematical Models
• Deterministic models
• Pythagoras's theorem
• Ohm’s law
• Kirchhoff’s law
• Newton’s law
• Gauss’s law
• Etc.
Mathematical Models (Cont.)
• Probabilistic models
• Will it rain tomorrow?
• Will stock market go up today?
• Will you pass BG2209?
• How many errors will occur in data transmission?
• What is your 4G speed?
• Etc.
Definitions
• Probability (60%): methodology that describes random variations in
the system
• It’s the science of uncertainty
A:
Some have the same Bo
student
A No
=
-(A) (A) =
365.364 ...(365-n+1)
=
365Pn
=
&
-181
3
=
Ask Marilyn
• Imagine that you are a contestant at a game show
• Behind one of three doors is a car, behind the other two are eggs
• If you pick door A, the host will open door B and reveal an egg
• He will offer you a chance to switch to door C
v
stay
• What should you do? Switch UV
Oscar by swick
=
2. Set
BG2209 : Statistics for Engineers
Set
• A set is a collection of objects
• Objects in a set are called elements
• Notations:
• !, #, $, … for sets x
3a,bac
=
such that
Examples
• ! = Set of engineering schools in Thailand
• ! = ScMU,cVakVa 3
...
• ! = (1,2,3, ...,103, (x
=
I
=
12x203
•#= 3 +
+
x 03
+
Subset
• If every element of set ! is an element of set " then ! is a subset of
", ! ⊂ "
Example
• ! = {Messi, Suarez, Neymar}
• 2 = Suarez, Neymar
• 3 = {Ronaldo, Bale}
•2⊂!
•3⊄!
Facts
• ! = # iff (if and only if) ! ⊂ # and # ⊂ !
•∅⊂!
•!⊂&
•!⊂!
• If ! ⊂ # and # ⊂ ' then ! ⊂ '
Intersection ·and, but, however I
• The intersection of two sets ! and ", denoted by ! ∩ ", is the set
consisting of all elements that are in both ! and "
• ! ∩ " = & & ∈ ! ()* & ∈ "}
e
Cep
=n =0
Examples
• ! = 0, 1, 2, 3, 4 , ) = {3, 4, 5, 6}
• !∩) = 33,93
• / = 0 ∈ ℜ 0 ≤ 0 ≤ 2}, 4 = {0 ∈ ℜ | 1 ≤ 0 ≤ 3}
• /∩4 = 3x 12
- 23
x =
Disjoint Sets
• Two events ! and " are mutually exclusive or disjoint, if ! ∩ " = ∅,
i.e., if ! and " has no elements in common
Union
• The union of two sets ! and ", denoted by ! ∪ ", is the set
consisting of all elements that are in either ! or " or both
• ! ∪ " = & & ∈ ! () & ∈ "}
> Au
Examples
• ! = {0, 1, 2, 3, 4}, + = {3, 4, 5, 6}
• !∪+ = ~
• / = 0 ∈ ℜ 0 ≤ 0 ≤ 2}, 4 = {0 ∈ ℜ | 1 ≤ 0 ≤ 3}
• /∪4 = 2 x 0x133
=
Difference
• The difference of two sets ! and ", denoted by ! − ", is the set
consisting of all elements that are in ! but not in "
• ! − " = & & ∈ ! ()* & ∉ "} = ! ∩ ".
A -
B AnB
=
>3 -
A
We W
A -
B An
(A -
BU(AUB(V(B A) -
Examples
• ! = {0, 1, 2, 3, 4}, + = {3, 4, 5, 6}
• !−+ = W
• / = 0 ∈ ℜ 0 ≤ 0 ≤ 2}, 4 = {0 ∈ ℜ | 1 ≤ 0 ≤ 3}
• /−4 = \x R0xx 3
-
Complement
• The complement of a set !, denoted by !,̅ is the set of all elements in
$ that are not in !
• !̅ = & & ∈ $ ()* & ∉ !}
Examples
• ! = 0, 1, 2, 3, 4 , ) = {0, 1, 2, 3, 4, 5, 6}
• !̅ =
• / = 0 ∈ ℜ 0 ≤ 0 ≤ 2}, ) = {0 ∈ ℜ}
• /4 = xx0uxx23
8 &
0 2
Laws of Operations
• Complement law:
! ∩ !̅ = ∅
! ∪ !̅ = '
!̅ = !
• Commutative law:
!∩( =(∩!
!∪( =(∪!
Laws of Operations (Cont.)
• Associative law:
!∩ #∩$ = !∩# ∩$
!∪ #∪$ = !∪# ∪$
• Distributive law:
!∩ #∪$ = !∩# ∪ !∩$
!∪ #∩$ = !∪# ∩ !∪$
• DeMorgan’s law:
! ∩ # = !̅ ∪ #(
! ∪ # = !̅ ∩ #(
Proof
• !∩ #∪% = !∩# ∪ !∩%
• Use Venn diagram
A *
W
!)
.
W
LHS
Example
• ! = Rain, # = Cold
• Not cold = C
•! = 3 +
+
x x03
+
•! = \v r3
-
• ! = \w awo}=
Example
• Two gas stations are located at a certain intersection
• Each one has six gas pumps
• Experiment: The number of pumps in use at a particular time
• What is the sample space !?
S
30,q2q...,723
=
S
210,01,10,11 ...,0,61c
=
x,01,4419...,k4619
:
16,01,16,41, ...,16,613
151 19
=
Example
• Experiment: Going from A to B by N or E directions only
• What is the sample space !?
[NNEEE, EEEENN, ENENEt,
S=
3
...
6=75
2!!
B
Combination
A
Example
• Experiment: Taking BG2209 until you pass
• What is the sample space !?
S
40,f,ffP,...3
=
151 8
=
Example
• Experiment: Tossing a coin repeatedly until two heads appear in a row
• What is the sample space !?
S [ HH, THH,
=
...
3
Example IV P
=
Sel 5 - 100 1
=
Sw 25
00s[2003
=
248 120,50l
-
E W
↑8
7
E
70 78
S:Set of all possibilities
Event
Event:sot of Sovious
• An event is a set of some outcomes, i.e., a subset of sample space
• Example:
• Experiment: Tossing a die
• != & 1,2,3, .
63
.
.,
34,5,6
• #=
Example
• Experiment: Taking BG2209 until you pass
• ! = 20, f0qff,...3
•#= 3 03
-
Example
• Experiment: Tossing a coin repeatedly until two heads appear in a row
• !̅ = 22,4,63
• #/ = more than
Examples
• ! = Messi will score no less than 2 goals tonight
• !̅ = less than 2
less than
%=
• $
3
• &' =
AU
An
ro
Example -
DJories
u
Liparallel
• ! = Component 1 is working, # = Component 2 is working, $ =
Component 3 is working
• When will the system fail?
AnBUC-
work
Example (Cont.) fail:work:An(Bnd
--
+
4
-)
-
5
/A vs
-
Ers
-
AU -
FU AVI
3. Basic Probability
BG2209 : Statistics for Engineers
Probability
• The study of randomness and uncertainty
• Probability of an event !, denoted by " ! , is a measure of the
chance that ! will occur
• Examples: PAR)
• Tossing a fair coin P(A)+ P(B/ -
'
• " $ =" & =(
# $ ∪ ) = # $ + #())
etex====
• Example:
• Tossing a die
• # 1 or 6 =
d) pess
Axioms of Probability (Cont.)
• !" , !$ , !% , … , !' are disjoint events, then
Passins
I
↑
=PAVAut.. UDI
i
C
P291 ...P(D)
+
suy lottery:Winest price
• ) #$ = I , ) #& = Y
&
, ) #' = 8 ,… r
2
=
• ) #$ ∪ #& ∪ #' ∪ ⋯ = -A
+PIAalt... 2 +8+...3
=
+
2i
=
A =
=
2
7-
Axioms of Probability (Cont.) 0(A) 0(1) 1
+ =
•! ∅ =0 0(A)
-
• ! &̅ = 1 − ! &
• Examples:
• ! Barca wins = 1 − !(Barca wins)
•! 3 = 7- 0IT1
• ! 4≥3 = 7 -
P(X(3) Vau,A,A -
B A
a sets
• If & ⊂ 8, then ! & ≤ !(8) 01A1 +q qXq19...
-
Axioms of Probability (Cont.)
• For any two events ! and "
A
Ne
# ! ∪ " = # ! + # " − #(! ∩ ")
Axioms of Probability (Cont.)
• ! "∪$∪C = -Al + plB) -0(CI -
PIAnCI-PIBC1 +PIABCI
A
B
W
=.
W
I
I-
-
W-
--
~
-
-
A -P/A1D)-P(BCI PIBD
-
-
PIC1 P(ABC1+AnD
+
+ AcnD + BCDI -
PAcnb
Example cold=C
main=R
• Suppose there is 40% chance of cold weather, 10% of rain and cold,
and 80% of rain or cold
• ! " = 0x) 0.2
=
0 (RC) 0.7
=
P(RVC1 0.8
=
+ -
P(RCI
-(R)
=
0.5
Example (Cont.)
A -
B 15
=
P( R)
=
p(C1
=
C -
P -
PIC1R)
x
- 80.4
0.3 =0.1-0.7 0.3
=
0(A) 7
=
-
0(Al
P(RC)
=
1 -
0.9
=
1 -0.7
=
·
I
Example
-
Le
0.05
• 75% jogs ("), 20% like ice cream ($), 40% enjoy music %
• 15% of " and $, 30% of " and %, 10% I and M, and 5% do all three
• Find a probability that a random resident will engage in at least one
of the three activities
~
JuIuml P1I1+0161 +M1 -11In61-016nm1+
=
P6nInml
only J:01J-1MVIII 0161 -016nI1 -P1(1m1+P16nInml
=
0.85
=
only I:011-(UMII
P/I) -P1InC1-01InMI+PKCnInMI
=
0.2-0.75-0.7 0.05
+ =
0
only M:P(m-1JVIII
01M1-PIMII-IMI1+PISINMI
=
0.05
=
+
P(A)
• ! = Electricity demand is at least 50
0.6
=
< Ar
200
P(AB) 0.42
=
60
Example (Cont.)
IC
• ! "∩$ = 120x60 0.42
=
100x200
20X60
- -
0.88
100 x
200
Example
=
AnB A -
B
P(B -
A) P(B)
=
I
A
112
=
• "⊂'
5
=
=
-
Example (Cont.)
• ! " ∩ $ = 1/8
A) P(B) 0(ArB)
x*
-(B - =
- A
W
I
t
3
- - =
W
i
Finite Sample Space
• Sample space ! is finite, i.e., ! = {$% , $' , $( , … , $* }
• If event , = {$% , $( }, then - , = - $% + - $(
• Examples:
• ! = 1, 2, 3, 4, 5, 6 , , = 2, 4, 6 even
52
Simple Sample Space
• A simple sample space (SSS) is a finite sample space in which all
outcomes are equal likely
• Examples:
• Tossing two fair coins. SSS or not? ↑
• Picking a card from standard deck. SSS or not? 521152
• Tossing a die. SSS or not? 6216
• Football match between AU team VS Barcelona. SSS or not? 3
*
-
+ - =
!
• This equation can be used only when the sample space is SSS
Example
• Tossing 2 dice is SSS (each with probability 1/36)
• Computing the sum %
• & % = 2 = one
•
•
&
&
%
% =4 =
o
= 3 = 01,21 0(2q7)
+
=
• & % =7 =
Not
• & % = 10 = 014,61 015,51 016,4 33
+
+
=
• & % = 11 =
• & % = 12 =
4. Counting Techniques
BG2209 : Statistics for Engineers
Counting Techniques ·(A) 1Al
=
ISI
3x2 72
=
=
• Tossing 2 dice
• How many outcomes?
6x6 36
=
Example
• Each year starts on one of the seven days (Sunday through Saturday)
• Each year is either a leap year or not
• How many different calendars are possible?
2x7 14
=
Example
• Beethoven wrote 9 symphonies
• Mozart wrote 27 piano concertos
• A radio station will play first a symphony and then a concerto
• How many ways can this be done?
9x 27
=
• Tossing ! dice
n
6
160
=
Example
• John wants to order a customized Macbook Pro
• Choose 256 GB or 512 GB of storage
• Choose 4 GB, 8 GB, or 16 GB of memory
• Choose Corei5, 2.7 GHz, 2.9 GHz, or 3.1 GHz, or Core i7, 2.2GHz, or 2.5 GHz
• How many different Macbook Pros can be configured?
=Ustorage Xmem*pV
=
2x3x5
=
38
Example
• A fast-food restaurant offers customers a choice of eight toppings that
can be added to a hamburger
• How many different hamburgers can be ordered?
28-2
=
Example i
binary digit o
7 bit 2
• What is the probability that the 2 cards have the same rank?
(A) = |t1
is
=
Example astya, bastard,
=
t
1 0x244, 0xst4, 0x 2,
=
+ +
=
1 xx
3
=
+ +
3
+
Ra
W W
ne Ma n,X42
=
7
- -
Noodles s 5x&
fried rice sta
Example
• A student wants to buy a tablet
• Apple has 4 models, Samsung has 5 models, Sony has 3 models
• The total number of choices = 4 5 3 72
+ +
=
Example (Cont.)
AP, SS, Sony E
15) 0, 15) 3 :=
=
(ii) 18
=
• A student wants to buy three tablets from the same manufacturer but
different models
• The total number of choices = (i) 15) (3) 0 10 1 25
=
=
+ + +
+
three tablets
same model 4 5 3
=
+ +
6x6x6
=
63
=
don't
use the previous ones=6x5x&
don't
use the previous one 6x5x5
=
Permutation
• A permutation is an arrangement of all or part of a set of objects
• The number of permutations of ! objects is !!
• Examples:
• How many ways can letters #, %, & be arranged?
3 2 7
=
3x2x) 3!
=
!!
!#" = #%& = #&,% =
!−" !
• #&,& = !!
• #&,* =
• #&,+ =
Examples
• Select 2 letters from !, #, $, %
&!
=
202 =
2!
= S
15160 78
Example
• A football team has 5 strikers
• A manager chooses 3 strikers to play, one on the middle, one on the
left, another on the right side of the field
• How many ways can the manager choose?
5 x4 3 60
x
WaYS
=
• If LM10 is always chosen to play on the middle, how many ways can a
manager choose?
&x x x
3 72 WaYS
=
Example
• How many license plates of 6 digits can be made from the numbers 1,
2, 3, …, 9
• With no repetition? 96 9!
-
qx8x7x6x5x2 60480
=
19-6)!
• Allowing repetitions?
96
qx9x9x9x9x9
537447
=
• Containing repetitions?
60980 -
53744
9 070,967
=
96-8
Example
90 song u
• An iPod playlist contains 100 songs, 10 are by the Beatles
• Suppose the shuffle feature is used to play the songs
• What is the probability that the first Beatles song heard is the fifth
song played?
90x89x8x5598 0.07
=
(A) 1A1
=
410,
=
ISI 10095
Example
• A trip to Europe
*
• Famous cities: Rome, Paris, London, Athens, Amsterdam 5!
I
=
1x
it's
3 3!x
2 3!+
x
=
3! =60 so
3 x
so I for R
2x3!+ befor ↳ and so fr
&X 3! after L
for a
Example
• A trip to Europe
• Famous cities: Rome, Paris, London, Athens, Amsterdam
• Visit Rome before London
• How many ways?
R P!
=
3
R 3x3!
=
total
3x2x2! 60
=
R =
x 3!
=
Example In class
49
number of 2!x29!
=
wallS
1.26x768
=
Example In class
ways
=
0.0154
66
• Find the probability that all six faces will be the same
777717
222232
:
666666
3 6
Ways
65 1.28x18
=
=
Birthday Problem In class
W
R
Allposible ways 365
=
1365-ni
Probinosamel 365! =
=
365
1365 - n1! 3654
365
%smtbal=-365
3654
I things
!,
=
take
thing
r
(14) ·
! !!
!#" = #%& = #&,% = =
" "! ! − " !
&
• %
is called binomial coefficient
i (3) :
(S)
I's)
& &
• =
=
% &*%
&
• = 1, &, = , &
=
& -
(4) 8!
=
Binomial Expansion
$
• !+# = ! $ + 2!# + # $
'
• !+# = ! ' + 3! $ # + 3!# $ + # '
)
)
. + )0+
!+# =* !#
/
+,-
)
.
2) =*
/
+,-
1
1 t
1
1 I 2 I 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
y1 x x 6x exy y
x+ =
+
+ +
+
isl l El El yel
Examples
• How many ways can we get a pair of aces?
=(5) xx
=
=(5)
So!
=
50x49=
=
5003
48!2! 2 2!
Example
• There are 4 blue shoes and 5 red shoes
=19115
• How many way can you arrange the shoes? =(9)
B B R B R R B R R
=(5)(9) 15)
=
Example In class
Y 2
e link
3 link
45
=
Example Prov
*
Fur 108
• A link is used to connect two nodes
gal A
m
• Going from ! to " by # or $ directions only
• How many ways can we go from ! to "?
s
Poker Problems
straight
Noting
Poker Problems (Cont.)
• Find the probability of getting 2 pairs
an
1
=
221194
=
I
Poker Problems (Cont.)
• Find the probability of getting a full house
a (e)
I
=
=
I
Poker Problems (Cont.)
• Find the probability of getting a flush
0(x 1c
=
(-3)(2)
=
151
I
Poker Problems (Cont.) In class
10,9((i)(e)(2) -
0 A2345678978/akA
IS 1919
=
3.92x703
=
I
Poker Problems (Cont.) In class
15) I
=
0.00000365
Poker Problems (Cont.) In class
1)
=0.00000754 -t
Poker Problems (Cont.) In class
1) (1721134193
=
0.579
I
Example
• A deck of 52 cards is shuffled and distributed to 4 players
• Find the probability that each player will receive one ace
0(n 11)
=
2!1511 li
=
ISI
19311lll
• Find the probability that one player will receive all aces
11li
as =
19311l
Example
• What is the coefficient of ! " # $ in the expansion of (! + #)( ?
x y ex 2xy
+ =
+
y
+
15) 15)
=
=
8!
S!3!
Example
• What is the coefficient of ! "## $ %## & '## in the expansion of
(! + $ + &)+## ?
-
600!
100! 200!300!
Example
• How many terms will be included in the expansion of (" + $)&' ?
Example
• ⋆ How many terms will be included in the expansion of
(# + % + &)() ?
Example
• Suppose Krispy Kreme has 10 kinds of doughnuts
• John orders a box of 12 doughnuts
• How many different ways are possible?
Example
• There are 100 multiple choice questions in a test
• How many ways can a student answer 80 questions correctly?
=1511218930
Example
• 5 letters are placed randomly in 5 envelopes
• Find the probability that all letters are placed correctly
- 7
5!
3 79797
2,2
3
Example
• (⋆⋆) Throw 10 balls randomly into 3 boxes
• Find the probability that every box contains at least one ball
Example
• How many ways can 10 people sit in a circle?
9!
=
!Binomial
• !" of type 1, !# of type 2, !$ of type 3, … , !% of type &
'!
• The number of arrangement is '
) !'* !'+! …'- !
• Example:
• How many ways can we arrange “MISSISSIPPI”?
=!
!!!2!
Example
• A deck of 52 cards is shuffled and distributed to 4 players
• How many different ways?
=S2!
13!73!73!73!
(5511351125112
=
Example (cont.)
• Find the probability that player ! will receive 6 hearts, player " 4
hearts, player # 2 hearts, and player $ 1 heart
Example (cont.)
• Find the probability that each player will receive 3 picture cards
Example In class
- 20!
12!90!
2!2'....!
20!
=
20
75
=2.38x10 Ways
Hypergeometric Distribution
• ! objects, " of type 1, ! − " of type 2
• Randomly pick $ objects without replacement
1 341
2 542
% & of type 1, $ − & of type 2 = 3
5
Example
• A university warehouse has 10 laser printers and 15 inkjet printers
• 7 printers are randomly selected to be checked
• What is the probability that exactly 3 of those printers are laser
printers? 25
e
70 75
L I
=131'
3L
77 (E)
↑I
Binomial Distribution
• ! objects, " of type 1, ! − " of type 2
• Randomly pick $ objects with replacement
, -1,
• % type 1 = = ., % type 2 = =1−. =2
- -
$ 6 716
% 3 of type 1, $ − 3 of type 2 = . 2
3
Example
• Dead pixels on the touch screen occur with probability 10#$
• A particular screen has 1000 pixels
• Find the probability that there are 2 dead pixels on the screen
use binomial
(89k9k 186,998
=
-
(4)pa"
5. Conditional Probability
BG2209 : Statistics for Engineers
In class
Piphone 30 0.6
=
=
50
Sandroid 20 0.
=
=
50
o & 6
iphone, Sandroid 1 1) =
Piphone Sandroid
6
10! 60.
=
xo.
2!6!
=
0.11
Conditional Probability
• The occurrence of one event may change the probability of another
event
• The probability of ! given that " occured, denoted # ! "
• Examples:
• ! = Barcelona wins, " = Messi is injured
• # ! " = The probability that Barcelona will win given that Messi is injured
• Tossing a die
• % = 1, 2, 3, 4, 5, 6 , ! = 2, 4, 6 , " = 1, 2, 3, 4, 5
• # ! " = 3.
Conditional Probability (Cont.)
• !(#|%)
Conditional Probability (Cont.)
!(" ∩ #)
! "# =
!(#)
!(" ∩ #)
! #" =
!(")
! " ∩ # = ! " # .! #
̅
! " # = 1 − !("|#)
Conditional Probability (Cont.)
• ! " # =?
Example
• Toss 2 dice and take the sum -S 3 2
• ! = 1, 3, 5, 7, 9, 11 ta,
• ) = 2, 3
•+ !) =
031+p3"is
-(3)
I
PlAnBI =
0131
3
=
0(IT =0.7
01 InS1 1I/SIDISI
=
(S1II (Il
=
0.9x0.3 0.27
=
Example
• The probability that Messi scores a goal if he uses the right foot = 0.9
• The probability that he will use the right foot = 0.6
• What is the probability that he will score a goal with his right foot?
0(0) 0.6
=
01G1R1 018/R/DIRI
=
0(2/6/
=
-
P(RIGIP(8)
=
0.9 x0.6
=0.54
Example
• There are 4 white balls, 8 red balls
• Pick 2 balls without replacement
• ! = The first is white, # = The second is white
A Y
=
Example
• A couple has 2 kids and at least one is a boy
• What is the probability that both are boys?
• ! = 488,86,68,663
• # = Both are boys EBB3
• $ = At least one is a boy EBB,36,683
P(AIC) P(ARCI P(BB)
=
-
=x
43
=
3/2
Example In class
160/900
6001900
• ! = Male, # = Employed
• $ ! # = P(MnE) =
460 0.77
=
PIE) 600
•$ #! = ↑(f) =
&60
=
0.92
* (M)
W 500
olmnf 500
900
Dep. 0(AB1 0(ABIP1B1
=
Independent IB/AIPAl
=
$ !# =$ !
$(! ∩ #)
=$ !
$(#)
$ ! ∩ # = $ ! . $(#)
Independent (Cont.)
• Events don’t have to be physically unrelated to be independent
• Example:
• Tossing a die
• ! = 2, 4, 6 , ' = 1, 2, 3, 4
• * ! = 316
• * ' = 416
A, are inde
• ! ∩ ' = 52,43
• * !∩' = 216
Independent (Cont.)
• If !, # are independent, then !, #$ are independent
A
indepa indep
Independent VS Disjoint
• If !, # are disjoint, then !, # are dependent
I Disjoint
A, B Independent?
• Check ! " ∩ $ = ! " . !($) or not
• Yes, they are independent
• No, the are dependent
Example
• ! " = 0.4, ! ( = 0.5, ! " ∩ ( = 0.3
• Are " and ( independent?
?
·(An ) (A1.01B1
=
0.3 F 0. x0.S
-
0.1
1. Bader depen
A, B, C Independent?
• Check ! " ∩ $ ∩ % = ! " . ! $ . !(%) or not
• Then check each pair
• ! " ∩ $ = ! " . ! $ or not
• ! " ∩ % = ! " . ! % or not
• ! $ ∩ % = ! $ . !(%) or not
Example
• Toss a coin independently 3 times
• ! "irst is ' = I
3x? 2
=
=
and =
-(HTT1 +(HTT
88 8 4
=
+ =
=
Example 8=0(H) 1/2
=
82 0(TH)
=
1/2
=
• $ * eventually = Er =
=
Example
• Series circuit, components fail independently
• What is the probability that the circuit operates?
Reliability
A B
0.8x0.9 0.72=
Example (Cont.)
A
0.8
&work 1 0.98 =
0.9
6)
system works) 0AuBI
=
=>
AUBI
=-- PlErBl
= -
P/EIPI5I
0(1) 1 =
-
P(A) =2 - x -
0.81(1 -
0.9)
=
1 -
0.2x0.) 0.98
=
Example In class
0 (06SSI 0.9
=
A B C D E
P(X) =
0.1
3
0(VX) 0.9x0.1
=
01VV X110.91x0.1
=
aifaill= 0.1x10.94 0.4
=
01Vvux) 30.91x0.2 n 0
=
0IVVVVX 10.9190.2 =
Example (Cont.)
Example
• Parallel circuit, components fail independently
• What is the probability that the circuit operates?
A
B
Example (Cont.)
&(AX 0.7
=
Example
3
P(BX) =
0.2
In class 01CX) =
0.1
01DX) 3x0.9x0.05
=
I
01fX) 3x0.9x0.05
=
pifaill 0.6273
• What is the probability that the circuit operates?
=
D operatel=1-pifaill
=
0.3787
B F
C
Example (Cont.)
Partition of Sample Spaces
• !" , !$ , !% , … , !' form a partition of the sample space ( if
• !", !$, !%, … , !' are disjoint
• !" ∪ !$ ∪ !% ∪ ⋯ ∪ !' = (
• Examples:
• ! and !̅ form a partition
• Vowels and consonants from a partition
AnA G
= S
A A
AVA S
=
Law of Total Probability
• !" , !$ , !% , … , !' is a partition of the sample space
• There is an event (
Law of Total Probability (Cont.)
• ! = ($% ∩ !) ∪ ($) ∩ !) ∪ ⋯ ∪ ($+ ∩ !)
• ,(!) = ,($% ∩ !) + ,($) ∩ !) + ⋯ + ,($+ ∩ !)
• ,(!) = ,(!|$% ). ,($% ) + ,(!|$) ). ,($) ) + ⋯ + ,(!|$+ ). ,($+ )
, ! = 0 , ! $1 . ,($1 )
12%
Example
• ! = Score a goal
• #$ = By using left foot
• #% = By using right foot
• #& = By using head
•' ! = · 1B
All01Ayl 0181Ay101A1 + 1B1A/PA
+
Example
• ! = Meet a beautiful girl
• #$ = At AU Mall
• #% = At Plaza
• #& = At the Library
•' ! = · 1B
All01Ayl 0181Ay101A1 + 1B1A/PA
+
Example
↑ choice
(x0
yxx 0)
=
+
- =
Example (Cont.)
Example In class
+
P/SIYIPY
= 10.01110.71+ 10.02110.21 10.05110.11
+
0.016
=
Example (Cont.)
Bayes’ Theorem
• !" , !$ , !% , … , !' is a partition of the sample space
• There is an event (
) !* ∩ ( )((|!* )) !*
) !* ( = = '
) ( ∑12" )((|!1 ))(!1 )
&(B) P/B/A10(A,1
=
01B1A1
+ + APA
Example
• ! = Score a goal
• #$ = By using left foot
• #% = By using right foot
• #& = By using head
• ' #$ |! = 0(A1B1 -
* 1917, 10/A1
-(B)
&IB1A10(A1 01B1A1
+ + APA
Example &IB/Ag
P(B)
Example
• A store gets 50% of its items from factory 1, 30% from factory 2, and
20% from factory 3
• 2% of factory 1’s items are defective
• 3% of factory 2’s items are defective
• 4% of factory 3’s items are defective
• If an item from the store is found to be defective, find the probability
that it comes from factory 1
~
114, 10) Plfand 0D1flPfal
= =
- -
↑x 0
-x +1(1 -
01
&
Example (Cont.)
Example In class
=
0.07X0.7
0.01x0.7 +0.02x0.2 +0.05X0?
-
0.44
Example (Cont.)
Example
• A binary communication channel carries data as one of two types of
signals denoted by 0 and 1
• As a result of noise, a transmitted 0 is sometimes received as a 1 and
a transmitted 1 is sometimes received as a 0
• For a given channel, assume a probability of 0.94 that a transmitted 0
is received as a 0 and a probability of 0.91 that a transmitted 1 is
received as a 1
• Further assume a probability of 0.45 of transmitting a 0
Example (Cont.)
• If a signal is sent, determine the
• Probability that a 0 is received
• Probability that a 1 is received
• Probability that a 1 was transmitted given that a 1 was received
• Probability that a 0 was transmitted given that a 0 was received
• Probability of an error
Example (Cont.)
Example
• There are ! black balls and " white balls in a box
• Pick 2 balls without replacement
• If the first ball is black, add 2 more black balls in the box
• If the first is white, remove 2 more white balls from the box
• What is the probability that the second ball is white?
Example (Cont.)
6. Random Variables
BG2209 : Statistics for Engineers
Random Variables =
#
number
01x 1 =
+0(HT1 c/p+ /2
=
PTH1 = =
01X 21 0(HH)
= =
1/4
=
Notation
• Capital letters like !, #, $ usually represent RV’s
• Small letters like %, &, ' usually represent particular values of RV’s
• Then ( ! = % means the probability of random variable ! has a
value equal to %
• Examples: ⑳
HH HT .
TH
• ( !=2 ·
· TT
• ( 1≤!<5
• ((! ≥ 3)
P
01Y 01 P(HH) 1/2
=
W
Un
W
= =
30x x)
Example
=
=
X7 =
-1
-
smell
smell
for(i
0;i<0;i
• Tossing 2 dice
+1
=
+
A(i)
10;
=
• ! = sum of 2 dice
• ! 1,2 =3 0(X 21
=
01X x1
=
any number
*/,-, ./0
0/,-, ./,
•' !=( =) …
*/,-, ./*0
0(X 2)
=
1/36
=
01X 3)
=
2136
=
:
01X 12)
=
1136
=
Examples
• Flip a coin
0 if '
•!=#
1 if )
• Roll a die
0 if {1, 2, 3}
•*=#
1 if {4, 5, 6}
Discrete RVs
w
volid
•
• Time to finish a homework assignment 19.9
e
-
20.7
H 0(X x
=
=
11z fx)
= =
f(z)
=
-
T 0(X 01
=
112 f(0)
= =
=
fix
~
0≤! " ≤1
f(0) -(1)
112 -
Seiz beiz ) ! " =1
>X
&x x
=
⑧ 7
*+,- S...dX x
=
Example
• Flip a coin
0 if '
!=#
1 if )
1/2, +=0
* + =#
1/2, +=1
Example
•! = number of bits in error in a next 4 bit transmitted
•# ! = 0 = 0.6561
•# ! = 1 = 0.2916
•# ! = 2 = 0.0486
•# ! = 3 = 0.0036
•# ! = 4 = 0.0001
+x = =
x(...dX x
=
Example -
D
&# for # = 1, 2, 3, … , 5
" # =%
0 otherwise
3(X
=
c+
=
(2 (3 c C
+ + +
X7
=
(11 2 3 4 5)
+ + + +
7 =
75)
C
=175
Example (Cont.)
•! "<2 = f(x) c
=
x115
=
•! "≤2 = fx f(z)
3
+ =
=
Example In class
• Flip 2 coins
• ! = # of heads
1/4, $=0
# $ = % 1/2, $=1
1/4, $=2
• , ! ≤ 0.8 = 01X 0)
=
f(0)
=
4
=
Example (Cont.) In class
I
f1
3
=
•! X>1 = 01X 21
=
- f12) 7
=
&
Continuous RVs
• The probability of every point is 0, then ! " = $ = 0
• We will focus on the probability of a range, ! & ≤ " ≤ (
• ! & <" ≤( =! & <" <( +! " =( =! & <" <(
• Note that = is not important in continuous case
01ax(b1 01a[x[b
=
Continuous RVs (Cont.)
• We define probability density function (pdf) ! " such that
+
# $ < & < ' = ) ! " ,"
*
- omf
fix
, ! " ≥0
paf
0
) ! " ," = 1
/0
Area 1
=
Continuous RVs (Cont.) fix6x =
pdf fix
D
-
Sf(x16X
2
Example
• Select a point ! randomly between 0 and 1
1, 0≤#≤1 C
" # =%
0, otherwise
0.7
x
=
0.7
0.3
0.7-0.3 0.4=
Example (Cont.)
• ! " > 0.8 =
&
Sexiax
0.8 ax Yodx
=
+
-x
-
7
x
=
x
=
-
0.8 0.2
=
0.8
W
&
5, ox I X - &
0.8
0.8
Example In class
& 4# − 2# * , 0<#<2
" # =%
0, otherwise
CS14x-2x46x 2
=
02
Afixidx=fixdx =
1511 2x3
02
-
3
2
=
xx8 7 =
3
8
=
Example (Cont.) In class
3x =2
=
Example In class
•4 !=3 = 0
• 4 ! ≤ 3 = 3 fixdx
⑧
-
x = -
jx =
0.95
Example (Cont.) In class
•! 2≤$<4 = fixiax
4
x
S C 6X
-
-
2
=
=-
(x 9
X2
=
0.717
Ye
•! $≥5 =
-
S
se
xX 8
=
(j I
-
= -
X5 =
=0.1 -
S
-
e
6.74x783
=
Cumulative Distribution Function *
• The cumulative distribution function (cdf) for any random variable
! is defined by
" # = %(! ≤ #)
Cdf
fixdx ~
fix
! " =$ ((*)
↑
= ↓ ↓
%&' -
r +
ernen
0x2x101 axx1
-
• Continuous case: X
f(x) 0(X =
=
x)
'
! " = , ( " /"
-.
/!(")
( " =
/"
Properties of CDFs *
• ! " is non-decreasing function
• If # < %, then ! # ≤ ! %
• ' ( ># =1−! # 01x [a 1
= -
P(X)al
f(x)
fIx1,
=
01.1 C
1/2, #=1
" # = % 1/3, #=2 fixi
1/6, #=3 12 -
-13
I
- I -X
Example (Cont.)
7
- ⑧
1/2
-
↑
fiz,*3
Rean >
1 2 3
Example In class
0, # < 1
1/4, 1 ≤ # < 3
" # =
3/4, 3 ≤ # < 5
1, # ≥ 5 f(x)
~
--
113
3 fis
• / ! = 3 = f(3) df(x)
-
=0
37131
=
2x -
x3
=
37x >X
Example (Cont.) In class
•! ">3 = 1 -
f(3)
=7 -
3
&
1
=
•! "≤1 = -(7)
- 7
&
Example C
3 W
• Find 1 " -
=
Example (Cont.)
• Use ! " to evaluate #(0.3 < ) < 0.6)
10.3x0.61
fixdx= "xdx=xax=y
8.3312_0.e 0.3
-10.61 -f(0.31
010.3(X-0.61
=
=
0(0.3X0.61
0(0.3(X(0.61 f(0.61 f(0.31
=
-
312
0.60.3
=
3/2
Example In class
0, #<0
" # =% ,- .
1−+ , #≥0
-x2
=- Ge
6X
- x2
2xe
=
Example (Cont.) In class
1
=
&
0.37
=
8. Joint Probability Distributions
BG2209 : Statistics for Engineers
Bivariate Random Variables
• The simultaneous outcomes of two random variables
• Example:
• Blood pressure: systolic (H) and diastolic (L)
• Time: hour and minute digits
• Computer usage: CPU and memory usage
• Location: (", $) coordinates
Discrete Bivariate Random Variables
• If !, and # are discrete random variables, then !, # is called jointly discrete bivariate random
variable
• The joint (or bivariate) pmf is
$ %, & = ( ! = %, # = &
0 ≤ $ %, & ≤ 1
, , $ %, & = , , $ %, & = 1
- . . -
( !, # ∈ 0 = , , $ %, &
%, & ∈ 0
Example
• Consider the time of digital clock
• ! = Hour digits, ! = 0, 1, … , 23
• ) = Minute digits, ) = 0, 1, … , 59
• , 10, 30 =
• ,- 10 =
Example (Cont.)
• !" 30 =
#$ % = ' #(%, +)
(
#- + = ' #(%, +)
.
Example
• The joint pmf of ! and " is
$+&
# $, & = , $ = 1, 2, 3, & = 1, 2
21
y=2
y=1
1 2 3
Example (Cont.)
• !" # =
• !% & =
Continuous Bivariate Random Variables
• If !, and # are continuous random variables, then !, # is called jointly continuous
bivariate random variable
• The joint (or bivariate) pdf is
$ %, & ≥ 0
+ + + +
5 7
/ 0 ≤ ! ≤ 2, 3 ≤ # ≤ , = ) ) $ %, & ,% ,&
4 6
Example
• Choose a point at random in the interior of the circle ! " + $ " = 16
• Find the pdf ((!, $)
((!, $)
!
Example (Cont.)
Example
• Amy and Bob agree to meet around 12:30
• Neither of them is punctual nor patient
• If one arrives and the other is not there, the first person will wait 15
minutes, and then leave
• Each will arrive at random uniformly from 12:00 to 13:00
• What is the probability that they will get together?
Example (Cont.)
• ! and " are the two arrival times
13:00
"
12:15
#$ % = ' # %, + ,+
()
#- + = ' #(%, +) ,%
()
Example
• The joint pdf of ! and " is
• #, $ =
Example (Cont.)
• !" # =
Example (Cont.)
• ! 0 < $ < 0.5, 0.5 ≤ ) ≤ 1 =
Bivariate CDF
• The joint (bivariate) cdf of ! and " is
• Discrete case:
# $, & = , , 2 3, 4
-./ 0.1
Bivariate CDF (Cont.)
• Continuous case:
) *
/0 /0
+ ", $ = ! ", $ = ! ", $
/"/$ /$/"
Bivariate CDF (Cont.)
• ! ", $ is non-decreasing in both " and $
lim ! ", $ = !/ $
(→+
lim ! ", $ = 1
(,-→+
Example
• The joint pdf of ! and " is
• , $, & =
Example (Cont.)
• !" # =
• !% & =
Example
• The joint pdf of ! and " is
• 45 $ =
Example (Cont.)
• !" # =
Example
• The joint cdf of ! and " is
• 3 $, & =
Example (Cont.)
• !" # =
• !% & =
9. Mean and Variance
BG2209 : Statistics for Engineers
Mean
• Mean, or expected value, or average of a random variable ! is
" = $[!]
• If ! is continuous
+
" = $ ! = . ,-(,) 1,
*+
Example
• ! = outcome of rolling a fair die
•# ! =
Example
• ! is a discrete random variable with pmf given by
0.5, #=1
" # = %0.2, #=2
0.3, #=3
•- ! =
Example
• ! is continuous random variable with pdf
#%
" # = , −1 < x < 2
3
•- ! =
Law of Unconscious Statistician
• Expectation of a function of a random variable
• If ! is discrete
)
"# ! = % # * +(*)
&'()
• If ! is continuous
)
" #(!) = . # * +(*) /*
()
Example
• Find ! " #
• If " is discrete
)
! " # = % * #+(*)
&'()
• If " is continuous
)
! " # = . * #+(*) /*
()
Example
• Find ![cos(2()]
• If ( is discrete
0
![cos(2()] = , cos(21) 2(1)
-./0
• If ( is continuous
0
![cos(2()] = 3 cos(21) 2(1) 41
/0
Example
• ! is a discrete random variable with pmf given by
0.5, #=1
" # = % 0.2, #=2
0.3, #=3
• - ./ =
Example
• ! is continuous random variable with pdf
1 '
" # = # , −1 < x < 2
3
• - !. =
Theorem
• For a constant !
" ! =!
• "[5] =
Theorem (Cont.)
• Proof: (continuous case)
Theorem
• For any ! " and constants # and $
% #! " + $ = #% ! " +$
• % 2)*+" − 5 =
Theorem (Cont.)
• Proof: (continuous case)
Theorem
• For any constants ! and "
# !$ + " = !# $ + "
• # 7$ + 5 =
Theorem (Cont.)
• Proof: (continuous case)
Example
• ! is a discrete random variable with pmf given by
0.5, #=1
" # = %0.2, #=2
0.3, #=3
•- ! =
• - 4! + 3 =
Example
• ! is continuous random variable with pdf
1 '
" # = # −1<x<2
3
•, ! =
• , 2! − 1 =
Theorem
• For any ! " and ℎ(")
• & 5*+," − 2/ 0 =
Theorem (cont.)
• Proof: (continuous case)
Example
• The pdf of a random variable ! is
" # = 1, 0<#<1
• )[cos ! + / 0 + 5] =
Variance
• Variance of a random variable ! is
•1! =
1, with , = 1/3
2 = 3 5, with , = 1/3
9, with , = 1/3
•12 =
Theorem
• The variance of a random variable ! is
• #!$ 2% + 10 =
• #!$ 1 − % =
Theorem (Cont.)
• Proof:
Example
• ! is a discrete random variable with pmf given by
0.5, #=1
" # = %0.2, #=2
0.3, #=3
•- ! =
• - !. =
Example (Cont.)
• !"# $ =
• !"# 1 − 2$ =
Example
• ! is continuous random variable with pdf
1 '
" # = # , −1 < x < 2
3
•- ! =
• - !' =
Example (Cont.)
• !"# $ =
• !"# 4$ + 3 =
Theorem
• For any constant !
"#$ ! = 0
• "#$ 10 =
Theorem (Cont.)
• Proof: (continuous case)
Independent
• ! and " are independent if
or
# $, & = ( $ . *(&)
21 +
# $, & = $ &, $+ ≤ & ≤ 1
4
Example
• ! and " are independent or not?
(
# $, & = , 1 ≤ $ ≤ 2, 1≤&≤3
$+&
Theorem
• Whether or not ! and " are independent
# ! + " = # ! + #["]
• $ !+# =
Theorem
• The result can be generalized to more than two random variables
• If !" , !$ , … , !& are random variables, then
# !" = # ! # "
• #$% !, ! =
Covariance
• !"# $, & > 0, $ and & move in the same direction
• Examples:
• Height and weight
#$% !, " = 0
• Proof:
Theorem (Cont.)
• !"# $, & = 0 does not mean $ and & are independent
• Example:
• Suppose $ ∼ * −1,1 and & = $ -
• Find !"#($, &)
Correlation
• The correlation between ! and " is
#$+(!, ")
#$% !, " = ()* =
./% ! . ./%(")
$ + 2&
# $, & = , $ = 1, 2, & = 1, 2
18
• Proof:
Theorem
• Whether or not !, # and $ are independent
%&' ! + # + $
= %&' ! + %&' # + %&' $
+ 2+,- !, # + 2+,- !, $ + 2+,-(#, $)
• %&' 0 + ! + # + $ =
Example
• !, #, $ and % are independent
• &'( ! + # + $ + % =
Theorem
• For any constants ! and "
• #$% 7&, 2( =
Theorem (Cont.)
• Proof:
Theorem
• Whether or not ! and " are independent
• #$% 2! − 3" + 7 =
Theorem
• Whether or not !, # and $ are independent
%&' &! + )# + *$
= &, %&' ! + ) , %&' # + * , %&' $
+ 2&)./0 !, # + 2&*./0 !, $ + 2)*./0(#, $)
• %&' 2! − 3# + 4$ − 1 =
10. Special Discrete Random
Variables
BG2209 : Statistics for Engineers
Special Discrete RVs
• Uniform distribution
• Bernoulli distribution
• Binomial distribution
• Multinomial distribution
• Hypergeometric distribution
• Geometric distribution
• Negative binomial distribution
• Poisson distribution
Uniform Distribution
• The probabilities of every point are the same
• If there are ! possible points, the probability of each point is 1/!
• Examples:
• Tossing a coin
• Tossing 2 coins
• Tossing a die
• Tossing 2 dice
• Selecting a student randomly
• Buying an iPad from a store
• Storing data in RAM
Example
• ! = Last digit of student ID
•#=
•$ % =
Example
• Tossing a die
$
%
, "=1
$
•! " = , "=2
%
…
$
, "=6
%
•+ , =
Example (Cont.)
• !"# $ =
Bernoulli Distribution
• Notation: !~#$%&(()
• There are 2 outcomes of the experiment; denoted by success or failure
• * success = *(0 = 1) = 2
• * failure = * 0 = 0 = 1 − 2 = :
• Examples:
• Tossing a coin, it is head or not?
• Picking a card, it is K or not?
• Taking BG2209, pass or fail?
• Transmitting a signal, received correctly or not?
• Compiling codes, successful or not?
Bernoulli Distribution (Cont.)
%, "=1
! " =$
(, "=0
•* + =
Bernoulli Distribution (Cont.)
• !"# $ =
Binomial Distribution
• Notation: !~#$%(%, ()
• Repeat the Bernoulli process * times
• + = The number of successes
* 1 341
- +=. =/ . = 0 2 , . = 0, 1, 2, … , *
.
• 9 + = *0
• :;< + = *02
Binomial Distribution (Cont.)
Example
• Roll a die 5 times
• Find the probability to get exactly two 3’s
•! " =
• $%& " =
Example
• Roll 2 dice 12 times
• Find the probability that the sum will be 7 or 11 exactly 3 times
•! " =
• Var " =
Example
• The probability that the case will protect the iPhone in drop test is
3/4
• Find the probability that exactly 2 out of 10 will survive
•$ % =
• '() % =
Example
• 1,000 bits are transmitted
• Bit error rate (BER) is 10#$
• Find the probability that there are at most 2 bit errors
•% & =
• ()* & =
Example
• IC chips are produced and tested
• ! working = 0.995
• If 1,000 chips are selected to be tested
• Find the probability that there will be 1 defective chip
•. / =
• 012 / =
Multinomial Distribution
• General form of binomial distribution
• Repeat the Bernoulli process ! times
• There are !" times of event 1, !# times of event 2, …, !$ times of event %
!! -. -/ -0
& '" = !" , '# = !# , … '$ = !$ = ," ,# … ,$
!" ! !# ! … !$ !
• ," + ,# + ⋯ + ,$ = 1
• !" + !# + ⋯ + !$ = !
Example
• There are 3 major mobile OSs; Android, iOS, and Windows
• Suppose ! Android = 0.6, ! iOS = 0.3, ! Windows = 0.1
• Poll 100 users about their mobile OSs
• Find the probability that there will be 70 Android users, 25 iOS users,
and 5 Windows users
Example (Cont.)
• Find the probability that there will be 70 Android users
3 563
4 764
' ( of type 1, $ − ( of type 2 = 2 ( = 5
7
Hypergeometric Distribution (Cont.)
%
•! " =$
&
% &*% &*+
• '() " = $
& & &*,
Hypergeometric Distribution (Cont.)
Example
• There are 25 balls in a box
• 15 red balls, 10 blue balls
• Pick 7 balls without replacement
• What is the probability that you will get 5 red balls?
Example (Cont.)
• Pick 7 balls with replacement
• What is the probability that you will get 5 red balls?
Example
• There are 10 missiles, 3 are defective that will not fire
• 4 are selected at random
• Find the probability that 3 out of 4 will fire
Example (Cont.)
• Find the probability that at most 2 will not fire
Geometric Distribution
• Notation: !~#$%&(()
• Consider infinite sequence of independent *+,- . trials
• / = # of trials until the first success is obtained
1 / = 2 = 3 2 = 4 567 ., 2 = 1, 2, 3, …
7
•= / =
>
A
• ?@, / =
>B
Geometric Distribution (Cont.)
Example
• Toss a die repeatedly until the first 6 appears
• ! = Number of tosses until the first 6 appears
• # ! = 10 =
Example
• In Ethernet LANs, a packet is transmitted
• If a collision occurs, it will be retransmitted until successful
• ! successful = 0.8
• Find the probability that a packet will be transmitted 3 times
•- , =
Examples
• Tossing a coin
• Find the average number of tosses to get a head
• Tossing a die
• Find the average number of tosses to get a one
Example
• Toys in cereal boxes are Batman, Spiderman, Superman, and Iron man
• One toy in a cereal box
• How many boxes on average are required to make a complete set?
Negative Binomial Distribution
• Notation: !~#$%&'((*, ,)
• Sometimes called Pascal distribution
• Consider infinite sequence of independent ./01 2 trials
• 3 = # of trials until the rth success is obtained
6 − 1 : <=:
5 3=6 =7 6 = 2 ; , 6 = 0, 0 + 1, …
0−1
Negative Binomial Distribution (Cont.)
$
•! " =
%
$)
• &'( " =
%*
Negative Binomial Distribution (Cont.)
Example
• A family decided to have children until it has 2 boys
• ! male = 0.55
• How many children would this family expect to have?
- ./0 !% 1
* $ % =+ =, + = , + = 0, 1, 2, …
+!
• 6 # = !%
• 789 # = !%
Poisson Distribution (Cont.)
Example
• Telephone calls arrive to a central office as a Poisson process
• Average arrival rate = 5 calls/min
• Find the probability that there will be no more than 3 calls in 40 s
1
' ( = , -<(<+
+−-
•/ 0 =
Uniform Distribution (cont.)
• !"# $ =
Uniform Distribution (Cont.)
• !~# 1, 3
Example
• !~# 0, 1 and ', ( are constants
• What is the distribution of ( − ' ! + '?
Example
• !~# $, &
•' ! =6
• *$+ ! = 3
• Find the values of $ and &
Exponential Distribution
• Notation: !~#$%& '
• It’s used to model the time (distance, volume) between two arrivals
• ( = time between two arrivals
/01
* + =, -. , +≥0
0, otherwise
= + = 1 − . /01 , +≥0
Exponential Distribution (Cont.)
$
•! " =
%
$
• &'( " = %)
Exponential Distribution (Cont.)
Exponential Distribution (Cont.)
'()
! " =$ %& , "≥0
0, otherwise
8
5 6 = 7 "!(") ;"
'8
8
= 7 "%& '() ;"
< 8
∞
= −"& '() > − 7 (−& '() ) ;"
0 <
8
= 7 & '() ;"
<
@
=
(
Example
• Telephone calls arrive to a central office as a Poisson process
• Average arrival rate = 5 calls/min
• Find the probability that there will no call in 40 s
1 213 4
1
( ) = 0 /5 4 , )∈ℜ
2-. /
Normal Distribution (Cont.)
•! " =$
• %&' " = ( )
• * + has no closed-form integration
• Use tables to find probability
Normal Distribution (Cont.)
• It’s a bell-shaped curve, and symmetric around !
• Center = !
• Width = #
Normal Distribution (Cont.)
• !" > !$
• %" > %$
Theorem
• !" , !$ , … , !& are independent normal random variables
• !' ~) *' , +'$ , , = 1, 2, … , 0
!−$
(= ~# 0, 1
&
1 01 2 /4
) * = / , *∈ℜ
2.
1
7 8 ≤ * = : * = Φ * = < ) * >*, *∈ℜ
0=
CDF of Standard Normal Distribution
CDF of Standard Normal Distribution (Cont.)
•! "≤$ =Φ $
•! "≥$ =
•! $≤"≤( =
•! "≤0 =
•! " ≤ −$ =
•! " ≥ −$ =
•! −$ ≤ " ≤ $ =
Some Popular Values
•Φ 0.00 =
•Φ 1.00 =
•Φ 1.28 =
•Φ 1.645 =
•Φ 1.96 =
•Φ 2.33 =
•Φ 3.00 =
•Φ 4.00 =
Standard Normal Table
Some Popular Inverse Values
• Φ"# $ = & such that Φ & = $
• Φ"# 0.90 =
• Φ"# 0.95 =
• Φ"# 0.975 =
• Φ"# 0.99 =
• Φ"# 0.995 =
Example
• !~# 20, 4
• Find ( 19 < ! < 23
Example
• !~# 2, 2
• & −1 < ! < * = 0.9
• What is the value of *?
Example
• Heights of male students are !~# 170, 4
• Heights of female students are )~# 160, 5
• Select one male and one female student independently
• Find the probability that female student is taller
Example (Cont.)
Example
• The SAT mathematics test scores follow a normal distribution
• The mean is 500, and the standard deviation is 100
• If 5 students are randomly chosen
• Find the probability that all scored below 600
Example (Cont.)
Example
• The annual rainfall (in inches) is normally distributed
• The mean is 40, and the standard deviation is 4
• What is the probability that 2 of the next 5 years the rainfall will
exceed 50 inches?
Example (Cont.)
Example
• The lifetimes of chips (in hrs) are normally distributed
• The mean is 4.4#10& hrs, and the standard deviation is 3#10( hrs
• The specification requires that at least 90% will have a lifetime of at
least 4.0#10& hrs
• Will chips meet the specification?
Example (Cont.)
• What is the probability that a batch of 100 chips will contain at least 4
chips whose lifetimes are at less than 3.8$10' hrs
Random Samples
• !" , !$ , … , !& form a random sample if
• !' are all independent
• !' have the same distribution
• Then !" , !$ , … , !& are i.i.d. (independent and identical distributed)
Sample Mean
• !" , !$ , … , !& are i.i.d. with ' !( = * and +,- !( = . $
• The sample mean
∑&(1" !(
!/ =
2
• %&' #" =
.$
/
!~1 *,
2
!/ − *
~1 0, 1
./ 2
∑&(8" !( − 2*
~1(0, 1)
. 2
Example
• Weights of students are normally distributed with mean of 68 kg, and
standard deviation of 10 kg
• If 36 students are chosen, compute !(65 < '& < 71)
Example
• The elevator has a maximum capacity of 1,630 kg
• 24 students get on the elevator
• Weights of students are normally distributed with mean of 68 kg, and
standard deviation of 10 kg
• What is the probability that the elevator is overloaded?
Example (Cont.)
Example
• Suppose that !" , !$ , … , !& are i.i.d. normal
• The standard deviation is 16
• Find ' such that ( !) − + ≤ 1 ≥ 0.95
Example (Cont.)
Central Limit Theorem
• One of the remarkable results in probability
• The sum of a large number of independent random variables has a
distribution that is approximately normal
• !" , !$ , … , !& are i.i.d. something with ' !( = * and +,- !( = . $
• !( don’t have to be normal
• As / → ∞,
.$
2
!~4 *,
/
Central Limit Theorem (Cont.)
"! − $
~) 0, 1
%/ '
/ 3
1
• Use CLT to approximate -( < 2 < )
0 0
Example (Cont.)
Example
• A coin is tossed 200 times
• !" = 1, if it is head, !" = 0 otherwise
• ' = ∑+,,
")* !"
• Use CLT to approximate -( ' − 0 ' ≤ 5)
Example (Cont.)
Example
• Weight (in 1000 kg) that a bridge can withstand without structural
damage is normally distributed with mean 400 and standard
deviation 40
• Weight of a car is random variable with mean 2 and standard
deviation 0.2
• How many cars would have to be on the bridge for the probability of
structural damage to exceed 0.1?
Example (Cont.)
Normal Approximation to the Binomial
• !" , !$ , … , !& are i.i.d. '()* +
• , = ∑&/0" !/ is '1* *, +
• For large *,
, − *+
~5(0, 1)
*+3
Example
• Suppose !~#$% 100, 0.8
•%= , ,= , -=
• . ! ≥ 90 =
• . ! ≥ 90 ≈
Example
• In a 4-choice test with 60 questions
• One student guesses the answer in every question
• Find the probability that this student will answer more than 15
questions correctly
•!= , $= , %=
Example (Cont.)