BG2209 - Prob

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 435

BG2209 : Statistics

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

• Statistics (40%): deals with collection, presentation, analysis and the


use of data to make decisions, solve problems
• It’s the science of data
Probability VS Statistics
Probability
Statistics
Birthday Problem
• Assume all 365 days have the same probability of being someone’s
birthday
• If there are 23 people in a room, the probability that there will be a
match is more than 50%
• If there are 50 people, the probability is 97%
0(A) +
0(A) 2
=

A:
Some have the same Bo
student
A No
=

-(A) (A) =

365.364 ...(365-n+1)
=

365Pn
=

151 365 3654


-(A) 1
=
-
P(A) 1
=
-
365Pn
3654
Poker
• A hand of 5 cards from a 52-card deck
• ! 2 pairs = 0.0475 2 pair

• ! full house = 0.00144 >22kkk


3 pair
• ! 5lush = 0.00198
• ! royal straight 5lush = 0.00000153
Example
BB
36

• A couple has two children, and at least one is a boy 88


• What is the probability that both children are boys?
P(BB) 1
=

&
-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
=

• &, ', (, … for elements


• ∈ is membership, e.g., * ∈ ! &
• ∉ is non-membership, e.g., , ∉ #
• - is the universal set (everything)
• ∅ is the empty set (nothing)
• ! is cardinality of !, or the number of elements in !
Set (Cont.)
• Order of element listing is not important
• !, #, $ is the same as {#, $, !}

• ' = {Messi, Suarez, Neymar}


• Messi ∈ ' but Ronaldo ∉ '

• There are 2 ways to write a set


• List: ' = Coke, Sprite, Pepsi
• Rule method: = = > ∈ ℜ 0 ≤ > ≤ 1}
~

such that
Examples
• ! = Set of engineering schools in Thailand

• ! = ScMU,cVakVa 3
...

• # = Set of mobile phone operators in Thailand

•#= SAIS, TRVE, CTAC, ...


Examples (Cont.)
• ! = Set of random integers from 1 to 10

• ! = (1,2,3, ...,103, (x
=

I
=

12x203

• # = Set of lifetime of light bulb

•#= 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

• Rain or cold = RVC

• Not rain but cold = ar) (r )


=
=
-
b

• Not rain or not cold = &UC RUC


=
Experiment
• An experiment is any activity or process that generates a set of data
• Examples:
• Tossing a coin
• Selecting a card from a deck
• Weighting a loaf of bread
• Measuring the time to load a webpage
• Measuring the voltage in a circuit
• Measuring WiFi signal strength dr
• Counting bit errors in data transmission 3(R 156
=
Common Words
• “! is at most 2” means ! ≤ 2
>
• “! is at least 2” means
>
• “! is more than 2” means
<
• “! is less than 2” means

• “! is no more than 2” means
>
• “! is no less than 2” means
Sample Space
• The sample space of an experiment, denoted by !, is the set of all
possible outcomes of the experiment
• Examples:
• Tossing a coin
• ! = #, %

• Tossing a die S1,2,3, ...,63


• !=

• Selecting a card from a deck


• ! =
[1 , A , AX, A8, ...,
k
Sample Space (Cont.)
• Measuring the time to load a webpage

•! = 3 +
+
x x03
+

• Measuring the voltage in a circuit

•! = \v r3
-

• Weighting a loaf of bread

• ! = \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
=

• Experiment: A contractor is planning for water and electricity demand


for an office complex
• Demand for electricity: 10 to 110 MWH per day
• Demand for water: 40 to 240 KL per day
• What is the sample space !? W

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
.
.,

• Event: # = Showing a value greater than three

34,5,6
• #=
Example
• Experiment: Taking BG2209 until you pass

• ! = 20, f0qff,...3

• Event: # = Passing the course on the second time

•#= 3 03
-
Example
• Experiment: Tossing a coin repeatedly until two heads appear in a row

•!= & HH, THH, ...


3

• Event: # = Getting two heads in a row on the fifth toss

•#= & TTTHH,


THTHH, HTTHH3
Event (Cont.)
• If !, # are events, then ! ∩ #, ! ∪ # are events
• If ! is an event, then !̅ is an opposite event
• Examples:
• ! = 1, 3, 5 , + = 1, 2, 3, 4, 5, 6

• !̅ = 22,4,63

• # = Driving no more than 80 km/hr

• #/ = more than
Examples
• ! = Messi will score no less than 2 goals tonight

• !̅ = less than 2

• $ = Tom has at least 3 tablets

less than
%=
• $
3

• & = Students may register at most 21 credits


more than

• &' =
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/ -

'
• " $ =" & =(

• Tossing a fair die


• " 1 =" 2 =⋯=" 6 =
'
-
Pavi
Axioms of Probability
•0≤# $ ≤1
•# & =1 -I
Ex
• $, ) are disjoint events, i.e., $ ∩ ) = ∅, then

# $ ∪ ) = # $ + #())

etex====
• Example:
• Tossing a die
• # 1 or 6 =
d) pess
Axioms of Probability (Cont.)
• !" , !$ , !% , … , !' are disjoint events, then

( !" ∪ !$ ∪ ⋯ ∪ !' = ( !" + ( !$ + ⋯ + ((!' )

Passins
I

=PAVAut.. UDI
i
C

PCA) + P(A) PBtt


=

P291 ...P(D)
+
suy lottery:Winest price

Example SW, LW, LW, LLLW, ...


S =

• Toss a coin until the first head appears

• ! = EH,TH, TTH, 3 ...

• Define disjoint events, #$ = [H3 , #& = \ H3 , #' = [TTH3 , …


+

• ) #$ = 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-
--
~
-
-

• ! "∪$∪'∪( = /Al +P1B1+ P/C1 + PID) -P(AnBI

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
=

0(RUC 0(R) PIC1


=

+ -
P(RCI

0.8 P(R1 0.2-0.2


=
+

-(R)
=

0.5
Example (Cont.)
A -
B 15
=

P( R)
=

• Probability of not rain but cold = P(Rr() P((nR)


=

p(C1
=

C -
P -
PIC1R)

x
- 80.4
0.3 =0.1-0.7 0.3
=

• Probability of not rain or not cold =


0 RUC1 P(RCI
=

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
=

=0.75-0.75-0.1 0.05 0.55


+
=

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.4 -0.3 -0.2 0.05


=

0.05
=
+

Plexactly activity) 0.35 0+0.05 0.00


=
+ =
Example (Cont.) Le

• Find a probability that a random resident will engage in exactly one


activity
exactly one 1 0.98
=

I M1+P(If - MtP(M -7)


02
- -

=0.39 + 0 0.05 0.2


+
=
Example 22
• A contractor is planning for water and electricity demand for an office
complex
• Demand for electricity: 10 to 110 MWH per day
• Demand for water: 40 to 240 KL per day
&(B)0.7
=

P(A)
• ! = Electricity demand is at least 50
0.6
=

• # = Water demand is at least 100 L


We

< Ar
200
P(AB) 0.42
=

60
Example (Cont.)
IC
• ! "∩$ = 120x60 0.42
=

100x200

• ! " ∪ $ = /A) + DIB1 -PlAnBI 1 -

20X60
- -
0.88

100 x
200
Example
=
AnB A -
B

• ! " = 1/3 and ! ' = 1/2


• Determine the value of !(' ∩ ")̅ when > p(B -
A)

• " and ' are disjoint


11B G
=

P(B -
A) P(B)
=

I
A
112
=

• "⊂'

P(B A) P(B P(A)


N/13
- =
-

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

• - , = 0121 p(4) 0161


32
+ + = =

• Picking a card from a standard deck


• Probability of picking Ace or Queen = P(B) 8
=

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
*

• BG2209 final grades. SSS or not? i


#
Simple Sample Space
• ! = #$ , #& , #' , … , #) , ! = *
$
• If ! is SSS, then + #$ = + #& = + #' = ⋯ = + #) = )

-
+ - =
!

• 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

• Counting the number of elements in event ! from an SSS


• When the outcomes are equal likely, computing the probability of an
event ! is reduced to counting
• Two basic rules
• Multiplication rule
• Addition rule
Multiplication
• Two operations perform one after another
• If there are !" ways to perform operation 1
• And there are !# ways to perform operation 2
• The number of ways to perform two operations together = !" . !#
• This rule can be generalized to more than two operations
Examples
• There are 3 ways to go from ! to "
• There are 4 ways to go from " to #
• How many ways to go from ! to # via "?
dac 4a
=

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
=

play a diff songs 35x36


=
Examples
• Tossing ! coins 2

• Tossing ! dice
n
6

• Grading 60 students 10 grades

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

• One byte of data consists of 8 bits


• How many different values can be stored in a byte?
==256 values

7 bit 2

• The signal has 1026 different values 2 bits &


8 bits 28

• How many bits are required? :


10 bits 1024
=

bits 2018 values


Example
• How many terms will be included in the expansion of

!+#+$+% &+'+( )+*+++,+-


ex3x5 60
=
=

• Which of the following will be included: !#', #&(, $(*?


Example
• Select 2 cards from a deck without a replacement
• How many outcomes?
52x57
=

• 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
=
+ +

• 8 black, 2 red balls 2x 1


3
=
-

• Pick 2 balls without replacement

• ! two black balls = ! , = 1 x


x
=

3
+

• ! two red balls = ! 0 =


2x 1 3
=
-

• ! one black, one red = ! 3 = i


ic
Example W

• 8 black, 2 red balls


• Pick 2 balls without replacement

• ! two black balls = ! , = x = 56 0.622


90
=

• ! two red balls = ! 0 = 3 x


=
0.022
=

• ! one black, one red = ! 3 = x4 X8 32 0.356 +


= =
Example W

• 8 black, 2 red balls


• Pick 2 balls with replacement

• ! two black balls = ! , = x,8 0.6


=

• ! two red balls = ! 0 = = 0.0

• ! one black, one red = ! 3 = 8 x, ,,8 0.32


=
Addition Rule R-

Ra

• Use method 1 in !" ways


• Use method 2 in !# ways
• If one method can be used, the total number of ways is !" + !#
• This rule can be generalized to more than two methods

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
+ +
=

• A student wants to buy three tablets from different manufacturers


• The total number of choices = 5x 3 60
&x
=
(i) (5)
=

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
=
+ +

• A student wants to buy two tablets from Apple


• The total number of choices = P
(z)
+
10
=
Example -

• There are 4 elevators -

• There are 2 stairways


• A student wants to go from the 1st to 4th floor
• How many ways?
4yzx2343
=

6x6x6
=
63
=

same all the way 6=

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!
=

• How many ways can numbers 1, 2, 3, … , ! be arranged?


=n!
Factorial
• !! = ! ! − 1 ! − 2 … 1
• !! = ! ! − 1 !
• 1! = 1, 2! = 2, 3! = , 4! =
• 0! = 1
,--!
• ./!
=
Example
• A trip to Europe
• Famous cities: Rome, Paris, London, Athens, Amsterdam
• How many ways?
Example
• How many ways can 10 people sit in a circle?
! -x!
=in
nPr
• Permutation of ! things taken " at a time
• Order is important

!!
!#" = #%& = #&,% =
!−" !

• #&,& = !!
• #&,* =
• #&,+ =
Examples
• Select 2 letters from !, #, $, %
&!
=

202 =

2!

• Three awards (gold, silver, bronze) will be given to a class of 50


students
=
=500
Example
• Four dice are rolled
• What is the probability that each of the numbers that appear are
different?
01A) 1A) GPC
= =

= 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!

• Visit Rome before London 3!

I
=

1x

it's
3 3!x

• How many ways? 3!


2 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

• A standard deck is shuffled and dealt face up in a row


• How many arrangements will the four aces be adjacent?
internal permutationa!18 other card

49

number of 2!x29!
=

wallS
1.26x768
=
Example In class

• Toss 6 dice total number ways for rolling dices=6


of

• Find probability that each of the six faces will appear


650337 6!=
prob 6!
=

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

• There are ! people in a room


• Find the probability that at least two people have the same birthday
(Ignore Feb, 29)
1
1mal 9s'mbal +

W
R
Allposible ways 365
=

no same:365 364 363 ... 365-(n-1)


number
walls 365!
of =

1365-ni
Probinosamel 365! =
=
365
1365 - n1! 3654
365

%smtbal=-365
3654
I things
!,
=

uPr take r and arrange


nCr 3
n

take
thing
r
(14) ·

• Combination of ! things taken " at a time


order is important
W • Order is not important
n choose r

! !!
!#" = #%& = #&,% = =
" "! ! − " !

&
• %
is called binomial coefficient
i (3) :

(S)
I's)
& &
• =
=

% &*%
&
• = 1, &, = , &
=
& -
(4) 8!
=
Binomial Expansion
$
• !+# = ! $ + 2!# + # $
'
• !+# = ! ' + 3! $ # + 3!# $ + # '
)
)
. + )0+
!+# =* !#
/
+,-

)
.
2) =*
/
+,-

' ' ' '


• '
+ $
+ 1
+ -
=
Pascal’s Triangle

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
=

• Select two students from 50 students to clean the room


• How many ways? 50pa W

=(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

• A link is used to connect two nodes

Y 2
e link

3 link

• A full mesh network of 10 nodes


• How many links are required? =x0 1) 2i8 =
=

45
=
Example Prov
*
Fur 108
• A link is used to connect two nodes

• A full mesh network of 10 nodes


• How many links are required?
Example

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

• Find the probability of getting a straight


0 =

10,9((i)(e)(2) -
0 A2345678978/akA

IS 1919
=

3.92x703
=

I
Poker Problems (Cont.) In class

• Find the probability of getting a straight flush


A 10
=1491191
=

15) I
=

0.00000365
Poker Problems (Cont.) In class

• Find the probability of getting a royal straight flush


0 2
=
10 JQk A

1)
=0.00000754 -t
Poker Problems (Cont.) In class

• Find the probability of getting a pair


0
X234
*
()(2)(5)
=

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!

• Find the probability that 3 letters are placed correctly


=151
Si

• Find the probability that 4 letters are placed correctly


=
Example (Cont.)
• (⋆⋆) Find the probability that all letters are placed incorrectly

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!
=

• How many ways can 6 people out of 10 sit in a circle?


=181
PRBBB

Multinomial Distribution (2) 15)


=

!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

• In how many ways can 20 students be assigned to 10 groups (2


students per group)
20!
=

- 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
=

P(B) 0121 P(31


+
Example P(I) 0.3
=

0(IT =0.7

• The probability that a doctor correctly diagnoses an illness is 0.7


• Given that the doctor makes an incorrect diagnosis, the probability
that the patient file a law suit is 0.9
• What is the probability that a doctor makes an incorrect diagnosis and
the patient sues? ~
OIS1Il

• ! = Incorrect diagnosis, # = Sue


I correct
=

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
=

• ! = Right, # = Goal P)G/&


-

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

• $ ! ∩ # = probability that both are 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)
=
-

&() -(BB1+ P(BG) P16B1


+

=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
=

• Any unrelated events are independent


• Example:
• ! = It will rain tomorrow
• # = Barcelona will win tonight
• Two events !, # are independent iff % ! ∩ # = % ! . % #
• Example:
• % Rain tomorrow = 0.2, % Barcelona wins = 0.8
• % Rain tomorrow 9:; Barcelona wins = PIR1. PIWI
=0.2x0.8 0.76
=
Independent (Cont.)
• If !, # are independent, the occurrence of # will not change the
probability of !

$ !# =$ !

$(! ∩ #)
=$ !
$(#)

$ ! ∩ # = $ ! . $(#)
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

• ! "irst is ', third is , = 01H1. 813+

3x? 2
=
=

and =

-(HTT1 +(HTT
88 8 4
=
+ =
=
Example 8=0(H) 1/2
=

82 0(TH)
=

1/2
=

• Toss a coin infinitely many times, each toss is independent of the


other
P3 (TTH) 1/8
=
=

• !" = $ %irst * on the /01 trial =


a Pzt...
2 +It...
=
+ +

• $ * eventually = Er =
=
Example
• Series circuit, components fail independently
• What is the probability that the circuit operates?

Reliability
A B

·system works) P1AnB1 PA1.0181


=
=

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

• Each component will fail independently with probability 0.1


• What is the probability that the circuit will fail?
0 ,faill 0.2
=

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
=

• Advanced circuit, components fail independently


01fX) 6 x 0.9 x0.95x0.9
=

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

• In answering a question on a multiple choice test, a student either


knows the answer or he guesses
• ! is the probability that he knows the answer
• When he guesses, the probability to get the correct answer is 1⁄4
• Find the probability that he will get the correct answer for a question

' = Doesn’t know the answer = Guesses


• % = Knows the answer, %
• ( = Correct answer
• ) ( = P((k((k) 0(k10(k)
+

(x0
yxx 0)
=
+
- =
Example (Cont.)
Example In class

• John has 3 email accounts: Google, Microsoft, Yahoo


• 70% of messages go to !, 20% to ", 10% to #
• In !, only 1% are spams, 2% in ", 5% in #
• Find the probability that a message is a spam

• ! = Google, " = Microsoft, # = Yahoo, % = Spam


-15) 0151610161 P/S/MIP/M1 +
=

+
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

• ! = Meet a beautiful girl


• #$ = At AU Mall
• #& = At Plaza
• #' = At the Library

• ( #' |! = 01AB) = -(A3/BIP(B)


&IB1A,IP1A1 0... (B1AD(A
+ +

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
= =

001 0101P1 + D1fP1fz 0D1f3101f


+
Example (Cont.)
• !" = Factory 1, !$ = Factory 2, !% = Factory 3
• & = Defective
0.02X0.5
=

0.02x0.5 0.03x0. 3 0.04X0.2


+ +
Example In class

• In answering a question on a multiple choice test, a student either knows


the answer or he guesses
• ! is the probability that he knows the answer
• When he guesses, the probability to get the correct answer is 1⁄4
• Find the probability that he actually knew the answer when he answered it
correctly

' = Doesn’t know the answer = Guesses


• % = Knows the answer, %
• ( = Correct answer
• ) %|( = & (k) IOCIKI0/k1
P(C *(IK10(k)+
P/C+ k(B(k)

- -
↑x 0
-x +1(1 -
01
&
Example (Cont.)
Example In class

• John has 3 email accounts: Google, Microsoft, Yahoo


• 70% of messages go to !, 20% to ", 10% to #
• In !, only 1% are spams, 2% in ", 5% in #
• If a message is a spam, what is the probability that it is in !?

• ! = Google, " = Microsoft, # = Yahoo, % = Spam


0(615) 0(615)
=
=
DIS1GIP161
PISI &15/818161 0/S/MIPIM1+S1Y01Y
+

=
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

• A random variable (RV) is a function from the sample space to the


real line. !: # → ℛ
• Example: Flip 2 coins
• # = '', '), )', ))
• Define ! = # of '’s
• ! '' = 2, ! ') = ! )' = 1, ! )) = 0
• - ! = 0 = - )) = 1/4
• - ! = 1 = - ') + - )' = 1/2
• - ! = 2 = - '' = 1/4
01X 01 0(T 1
= =
T
2
=

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
= =

01Y 1) p(TH) P(HT) P(TT)


= =
+ +
314
=
8 7 2 3
01X 11 0(X 21 0(X 3)
=
+ =
+ =

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}

• ! and * are equivalent because 3 ! = 0 = 3 * = 0 = 1/2 and


3 ! = 1 = 3 * = 1 = 1/2
volid
-
⑥ 0 o

Discrete RVs
w

volid

• The number of possible values of a RV is finite or countably infinite


• Examples:
• Flip a coin ⑧ 0???
• Toss a die
• Number of students
• Number of errors in digital data transmission
• Number of requests to www.au.edu
Continuous RVs
• The number of possible values is infinite *
• Examples:
• Distance to Mega Bangna
0(X 20)
Temperature in this room
0
= =


• Time to finish a homework assignment 19.9
e
-
20.7

• Volume of water -179.9(X)20.1

• Pressure of the tires


• Power of the transmitted signals
• Voltage of the outlet
• Note: The probability of every point is 0
7. Probability Distributions
BG2209 : Statistics for Engineers
Discrete RVs
• We define probability mass function (pmf) such that
Tossing coin

H 0(X x
=
=

11z fx)
= =

! " =$ %=" 0(X 21


M
=

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

• Suppose a random variable ! has the following pmf

&# for # = 1, 2, 3, … , 5
" # =%
0 otherwise

• Determine the value of &


S
Sf(x)
X7
=
1
=

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

• ! 0.5 < & ≤ 1 = 0(X 11


=

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

• 2 0.3 < ! ≤ 0.7 = ofNdx Sax


=

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

• Suppose that ! is a continuous RV with pdf given by

& 4# − 2# * , 0<#<2
" # =%
0, otherwise

• What is the value of &?


find a from normalization 2

CS14x-2x46x 2
=

02
Afixidx=fixdx =
1511 2x3
02
-

3
2
=

xx8 7 =

3
8
=
Example (Cont.) In class

• Find !(# > 1)


-fixidx
=31x-zxdx
3?
= 23
14x 2x1
23
-

3x =2
=
Example In class

• Suppose that ! is a continuous RV with pdf given by

& '( , #>0


" # =%
0, otherwise

•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

+(10) 0(X [10)


=
Cumulative Distribution Function (Cont.) *
• Discrete case:

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

• ' # <( ≤% =! % −! # 01A) 7 PIA


=
-

' #<(≤% !(%) !(#)


Example * f(x) =
fix), 0 1.1
D

f(x)
fIx1,
=

01.1 C

• Suppose ! has a probability mass function given by omf &

1/2, #=1
" # = % 1/3, #=2 fixi
1/6, #=3 12 -

-13

• Find the cumulative distribution function ,(#)


116

I
- I -X
Example (Cont.)
7
- ⑧

1/2
-


fiz,*3
Rean >
1 2 3
Example In class

• The cumulative distribution function of ! is given by

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

• Consider the pdf


C

3 W

! " =$2 ", 0<"<1


0, elsewhere

• Find 1 " -

fixidx=" xax= y"


x3233 x32
=

=
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

• Suppose the random variable ! has cdf given by

0, #<0
" # =% ,- .
1−+ , #≥0

• Find the pdf 0(#)


d -Ex *
fix
=

-x2
=- Ge
6X
- x2
2xe
=
Example (Cont.) In class

• Find the probability that ! exceeds 1


01X11 1
=
-
f()
2
-
7
=1 -
x e
-

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 =

• & ' ≤ 8, + > 50 =


Marginal Distributions
• The marginal distributions of ! and " alone are

#$ % = ' #(%, +)
(

#- + = ' #(%, +)
.
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
+ + + +

) ) $ %, & ,% ,& = ) ) $ %, & ,& ,% = 1


*+ *+ *+ *+

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

12:00 12:15 ! 13:00


Example (Cont.)
Marginal Distributions
• The marginal distributions of ! and " alone are
)

#$ % = ' # %, + ,+
()

#- + = ' #(%, +) ,%
()
Example
• The joint pdf of ! and " is

# $, & = 4$&, 0 ≤ $ ≤ 1, 0≤&≤1

• #, $ =
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 ! ", $ = 0


(→*+ -→*+

lim ! ", $ = !/ $
(→+

lim ! ", $ = !0 "


-→+

lim ! ", $ = 1
(,-→+
Example
• The joint pdf of ! and " is

# $, & = 4$&, 0 ≤ $ ≤ 1, 0≤&≤1

• , $, & =
Example (Cont.)
• !" # =

• !% & =
Example
• The joint pdf of ! and " is

# $, & = 1 − * +, − * +- + * +(,0-) , $ ≥ 0, &≥0

• 45 $ =
Example (Cont.)
• !" # =
Example
• The joint cdf of ! and " is

# $, & = ((4$ + & + + 5$& . ), 0 ≤ $ ≤ 1, 0≤&≤1

• 3 $, & =
Example (Cont.)
• !" # =

• !% & =
9. Mean and Variance
BG2209 : Statistics for Engineers
Mean
• Mean, or expected value, or average of a random variable ! is

" = $[!]

• It tells where the probability distribution is centered


Mean (Cont.)
• If ! is discrete
+

" = $[!] = ' ,- ,


()*+

• 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

"#$ ! = & ' = ( ! − * '

• It’s a measure of spread or dispersion

• Standard deviation is & = "#$(!)


Examples
4.9, with , = 1/2
!=#
5.1, with , = 1/2

•1! =

1, with , = 1/3
2 = 3 5, with , = 1/3
9, with , = 1/3

•12 =
Theorem
• The variance of a random variable ! is

"#$ ! = & ! ' − & ! '

• This is an easier way to compute variance


Theorem (Cont.)
• Proof:
Theorem
• For any constants ! and "

#!$ !% + " = !( #!$ %

• A shift doesn’t change the variance

• #!$ 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

, $, & = ,( $ . ,* & ∀$, ∀&


Example
• ! and " are independent or not?

#=% #=& '( (*)


"=2 0.12 0.28 0.40
"=3 0.18 0.42 0.60
45 (6) 0.30 0.70 1.00
Example
• ! and " are independent or not?

#=% #=& #=' #=( )* (,)


"=1 0.01 0.07 0.09 0.03
"=2 0.20 0.00 0.05 0.25
"=3 0.09 0.03 0.06 0.12
78 (9)
Example
• ! and " are independent or not?

# $, & = 6$& ) , 0 ≤ $ ≤ 1, 0≤&≤1


Theorem
• ! and " are independent if

# $, & = ( $ . *(&)

• If # $, & can be factored into separate functions of $ and &, then


! and " are independent
Example
• ! and " are independent or not?

21 +
# $, & = $ &, $+ ≤ & ≤ 1
4
Example
• ! and " are independent or not?

(
# $, & = , 1 ≤ $ ≤ 2, 1≤&≤3
$+&
Theorem
• Whether or not ! and " are independent

# ! + " = # ! + #["]

• Proof (continuous case):


Example
• Hard disk performance depends on
• ! = Access time
• # = Data transfer time
• $ ! = 4.17 ms
• $ # = 10.2 ms

• $ !+# =
Theorem
• The result can be generalized to more than two random variables
• If !" , !$ , … , !& are random variables, then

' !" + !$ + ⋯ + !& = ' !" + ' !$ + ⋯ + '[!& ]


Theorem
• If ! and " are independent, then

# !" = # ! # "

Proof (continuous case):


Theorem
• If ! and " are independent, then

#$% ! + " = #$% ! + #$%(")

Proof (continuous case):


Covariance and Correlation
• The measures of degree of association of ! and " if they are
dependent
• The covariance between ! and " is

#$% !, " = ()* = +[ ! − .) " − .* ]

• #$% !, ! =
Covariance
• !"# $, & > 0, $ and & move in the same direction
• Examples:
• Height and weight

• !"# $, & < 0, $ and & move in the opposite direction


• Examples:
• Snowfall and temperature
Theorem
!"# $, & = ( $& − ( $ ( &

• This is an easier way to compute covariance


• Proof:
Theorem
• If ! and " are independent, then

#$% !, " = 0

• Proof:
Theorem (Cont.)
• !"# $, & = 0 does not mean $ and & are independent
• Example:
• Suppose $ ∼ * −1,1 and & = $ -
• Find !"#($, &)
Correlation
• The correlation between ! and " is

#$+(!, ")
#$% !, " = ()* =
./% ! . ./%(")

• #$+(!, ") has the square unit, #$% !, " is unitless


Correlation (Cont.)
• −1 ≤ $%& ≤ 1
• $%& ≈ 1 means ( and ) are highly correlated
• $%& ≈ 0 means ( and ) are lowly correlated
• $%& ≈ −1 means ( and ) are highly correlated but opposite direction
Example
• Let ! and " be discrete random variables having joint pmf

$ + 2&
# $, & = , $ = 1, 2, & = 1, 2
18

• Find ,-.(!, ")


Example (Cont.)
Example
• Let ! and " be continuous random variables having joint pdf

# $, & = $ + &, 0 < $ < 1, 0<&<1

• Find ,-.(!, ")


Example (Cont.)
Theorem
• Whether or not ! and " are independent

#$% ! + " = #$% ! + #$% " + 2)*+(!, ")

• 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$'+,-(!, ")

• #$% 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

• Find the average number of Android users


Hypergeometric Distribution
• ! objects, " of type 1, ! − " of type 2
• Randomly pick $ objects without replacement
• % = number of type 1, $ − % = number of type 2

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

• , = # of transmissions until successful

•- , =
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?

• What is the probability that this family will have 5 children?


Example
• A company wishes to hire 3 workers
• Each applicant has a probability of 0.6 of being found acceptable
• How may applicants would this company expect to interview?

• Find probability that exactly 6 applicants would be interviewed?


Poisson Distribution
• Notation: !~#$%&&$'())
• It’s a counting process
• Count the number of occurrences (arrivals or events) + , in 0, ,
• + , can be
• Students arriving to class (time)
• Defects on a wire (length)
• Impurities in water (volume)
• Bit errors in data transmissions
• Telephone calls
• Accidents
Poisson Distribution (Cont.)
• ! = average arrival rate per unit time
• # = $ % = number of arrivals in [0, %]

- ./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

• Average number of calls in 40 s =


Example
• On average there are 3 accidents per month at a junction
• What is the probability that there are exactly 5 accidents for a given
month?

• Average number of accidents in a year =


Example
• Bit error rate in digital data transmission is 10#$
• Find the probability of 3 errors when transmitting a frame of 10% bits

• Average number of bit errors in a frame =


Example (Cont.)
• Poisson distribution can be used to approximate the binomial
distribution
11. Special Continuous Random
Variables
BG2209 : Statistics for Engineers
Special Continuous RVs
• Uniform distribution
• Exponential distribution
• Normal distribution
• Chi-square distribution
• t distribution
• F distribution
Uniform Distribution
• Notation: !~# $, &

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

• Average time between calls


Example
• On average there are 3 accidents per month at a junction
• What is the probability that 2 moths or more will elapse before the
next accident occurs?

• Average time between accidents


Example
• Lifetime of a light bulb is exponentially distributed
• The mean lifetime is 10,000 hrs
• Find the probability that the light bulb will last less than 200 hrs
12. Normal Distribution
BG2209 : Statistics for Engineers
Normal Distribution
• Notation: !~# $, &'
• The most important distribution in this course
• Sometimes called Gaussian distribution

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

& & &

1 = 2 4' !' + 6~)( 2 4' *' + 6, 2 4'$ +'$ )


'3" '3" '3"

• The linear combination of independent normals is normal


Example
• !" ~$ %" , '"( , !( ~$ %( , '((
• !" and !( are independent
• What is the distribution of ) = 5!" − 4!( + 7?
Example
• !~# 3, 4 , '~# 4, 6
• )*+ !, ' = 2
• What is the distribution of . = 2! − 3' − 10?
Transformation
• !~# $, & '

!−$
(= ~# 0, 1
&

• # 0, 1 is called the standard normal distribution


• There are cdf tables for the standard normal
• Before you can use the tables, you must transform any normal into
the standard normal
Standard Normal Distribution
• Notation: !~#(%, ')

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

• The sample mean !/ is a random variable


• Then !/ will have mean and variance
Sample Mean (Cont.)
• ! #" =

• %&' #" =

• Note: As ( increases, what will happen to ! #" and Var #" ?


Law of Large Number
• The sample mean "! from a large number of trials should be close to
the population mean #, and will tend to be closer as more trials are
performed
• As $ → ∞, "! → #
• (( lim "! = #) = 1
-→.
Sample Mean of Normal
• !" , !$ , … , !& are i.i.d. normal with ' !( = * and +,- !( = . $
• The sample mean !/ is a normal random variable

.$
/
!~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
%/ '

∑1./0 ". − '$


~) 0, 1
% '

• Usually ' ≥ 30 is required for the CLT to work well


• If the observations are i.i.d., you can almost always use the CLT
Example
• Suppose !" , !$ , … , !"&& are i.i.d. from some distribution
• The mean is 1000, and the standard deviation is 1000
• Find '(950 < !- < 1050)
Example
• A random sample of size ! = 15 is drawn from the pdf

% & = 3 & − 1 ), 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.)

You might also like