You are on page 1of 5

ECE3720

Engineering Probability and Statistics



Lecture 8
Yimin D. Zhang, Ph.D.

Department of Electrical & Computer Engineering
Villanova University

Spring 2012
Homework Assignment 6: Solution
1.
ECE-3720 Spring 2012 2 Y. D. Zhang
Homework Assignment 6: Solution
2. Probability that one auditor is unsatisfactory:



Probability that one auditor is satisfactory


Probability that the office is satisfactory (i.e., all auditors are
satisfactory)


Probability that the office is unsatisfactory (i.e., any auditor
is unsatisfactory)
ECE-3720 Spring 2012 3 Y. D. Zhang

+ = + = = <
_
e e
e e
k
e
X
k
k
! 1 ! 0 !
] 2 [ P
1 0 1
0
1
) ( 1 ] 2 [ P 1 ] 2 [ P
1 1


+ = < = > e e X X
m m
m
e e X X X )] ( 1 [ ]) 2 [ P ( ] 2 ... 2 [ P
1 1


+ = > = > >
m
m m
e e X X X X )] ( 1 [ 1 ] 2 ... 2 [ P 1 ] 2 ... 2 [ P
1 1


+ = > > = < <
Homework Assignment 6: Solution
3.
ECE-3720 Spring 2012 4 Y. D. Zhang
Homework Assignment 6: Solution
4.





5.

ECE-3720 Spring 2012 5 Y. D. Zhang
Postponed to Feb 16 (Thursday) so that students would
have sufficient time to go over the graded homeworks.

Coverage: Chapters 1 & 2 (Lecture notes 1-7).

Open book you can bring in:
o Textbook
o Lecture notes
o Homeworks
o Calculator

The use of laptop computers is not allowed.

Internet access is not allowed.


About Exam 1
ECE-3720 Spring 2012 6 Y. D. Zhang
Expectation:


Variance:

var(X ):=E[(X m)
2
]

Covariance:


Correlation coefficient:

Review
ECE-3720 Spring 2012 7 Y. D. Zhang
_ _
= = =
i
i i
i
i X i
x X x x p x X ) ( P ) ( ] [ E
)] )( [( E ) , cov(
Y X
m Y m X Y X =
Y X Y
Y
X
X
XY
Y X m Y m X
o o o o

) , cov(
E : =
(

|
|
.
|

\
|
|
|
.
|

\
|
=
Probability generating functions
Binomial random variable
The weal law of large numbers
Conditional probability
Conditional expectations

Chapter 3 More about discrete random variables
ECE-3720 Spring 2012 8 Y. D. Zhang
Binomial random variable
Example: Let us toss a coin three times. Let X be the number
of heads. Then X takes values 0, 1, 2, or 3. Find the pmf of
X. The probability of getting a head is p, and the probability
of getting a tail is q=1 p.
Solution.
P(TTT) = q
3
p
X
(0) = q
3
P(TTH) = pq
2

P(THT) = pq
2
p
X
(1) = 3pq
2

P(HTT) = pq
2

P(THH) = p
2
q
P(HTH) = p
2
q

p
X
(2) = 3p
2
q
P(HHT) = p
2
q


P(HHH) = p
3
p
X
(3) = p
3


ECE-3720 Spring 2012 9 Y. D. Zhang
Binomial random variable
Now let us consider tossing a coin n times. Let X be the
number of heads, which takes values of 0, 1, 2, , n. Find
the pmf p
X
(k). The probability of getting a head is p, and the
probability of getting a tail is q=1p.
We can conclude that


This is referred to as the binomial random variable,
denoted as binomial(n,p).



ECE-3720 Spring 2012 10 Y. D. Zhang
k n k
X
q p
k
n
k p

|
|
.
|

\
|
= ) ( for k = 0, , n
Binomial random variable
Pascals triangle:








From this, we can also easily confirm that
ECE-3720 Spring 2012 11 Y. D. Zhang
_
=

|
|
.
|

\
|
= +
n
k
k k n n
b a
k
n
b a
0
) (
b a b a + = +
1
) (
2 2 2
2 ) ( b ab a b a + + = +
3 2 2 3 3
3 3 ) ( b b a ab a b a + + + = +
4 3 2 2 3 4 4
4 6 4 ) ( b b a b a b a a b a + + + + = +
1 ) ( ) (
0
= + =
_
=
n
n
k
X
q p k p
Binomial random variable
Expectation:
E[X] = np
Variance:
var[X] = np(1 p)

Binomial random variable can be considered as the sum of n
independent Bernoulli trials.

Each Bernoulli trial has an expectation of p and a variance of
p(1p).

The mean and the variance of the binomial distribution are
thus equal to the sums of expectations and variances of
each individual trial.
ECE-3720 Spring 2012 12 Y. D. Zhang
Binomial random variable
n=80, p=0.25 (np=20)
ECE-3720 Spring 2012 13 Y. D. Zhang
n=80, p=0.5 (np=40)
n=80, p=0.75 (np=60)
Poisson Approximation
Denote =np. Recall that


Then for a binomial random variable




ECE-3720 Spring 2012 14 Y. D. Zhang


=
|
.
|

\
|
e
n
n
n
1 lim
!
1 1
! )! (
!
lim
1
)! ( !
!
lim
) 1 ( lim ) ( lim
k
e
n n k k n n
n
n n k n k
n
p p
k
n
k p
k
k n
k
k
n
k n k
n
k n k
n
X
n


=
|
.
|

\
|

|
.
|

\
|

|
|
.
|

\
|

=
|
.
|

\
|

|
.
|

\
|

|
|
.
|

\
|
=
1
) 1 ( ) 1 (
lim
)! (
!
lim
=
+
=



k
n
k
n
n
k n n n
k n n
n
becomes Poisson when n (and p 0)
1 1 lim =
|
.
|

\
|


k
n
n

Poisson Approximation
When n>>1 and p<<1, direct computation of pmf using the
binomial distribution may not be convenient.
Example: A typesetter makes, on the average, one mistake
per 1000 words. Assume that he is setting a book with 100
words to a page. Let S be the number of mistakes that he
makes on a single page.
The exact probability distribution for S is the binomial
distribution binomial(100, 0.001).
The Poisson approximation uses =np=100x0.001=0.1.
Matlab example
>> nchoosek(100,50)
Warning: Result may not be exact. Coefficient is greater than
1.000000e+015 and is only accurate to 15 digits
ans = 1.0089e+029
ECE-3720 Spring 2012 15 Y. D. Zhang
The weak law of large numbers
Consider the average of the result of coin tosses (X=1 for head
and X=0 for tail).
As the number of trials increases, the sample mean
approaches the statistical mean, which is 0.5.
ECE-3720 Spring 2012 16 Y. D. Zhang
10
0
10
1
10
2
10
3
10
4
10
5
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
number of trials (n)
s
a
m
p
l
e

m
e
a
n
_
=
=
n
i
i n
X
n
M
1
1
The weak law of large numbers
Weak law of large numbers:



Conditions for the weak law:



ECE-3720 Spring 2012 17 Y. D. Zhang
0 ) | (| P lim = >

c m M
n
n
2
2
) | (| P
c
o
c
n
m M
n
s >
The weak law of large numbers
Example: For the coin toss problem, o
2
=1/4 (why?).
Then, if we would achieve c=0.1 with ,

then the required number of trials is

ECE-3720 Spring 2012 18 Y. D. Zhang
1 . 0 ) | (| P = > c m M
n
250
1 . 0 1 . 0
25 . 0
P
2 2
2
=

= s
c
o
n
10
0
10
1
10
2
10
3
10
4
10
5
-0.5
0
0.5
1
1.5
number of trials (n)
s
a
m
p
l
e

m
e
a
n
10 trials.
n P
2
o
c =
0.6
0.4
Homework Assignment 8

1. Problem 15 of Chapter 3 (page 133 of textbook)
2. Problem 17 of Chapter 3 (page 134 of textbook)
3. On the average, only 1 person in 1000 has a particular rare
blood type.
(a) Find the probability that, in a city of 10,000 people, no
one has this blood type.
(b) How many people would have to be tested to give a
probability greater than 1/2 of finding at least one person
with this blood type?

Due: Tuesday (2/14)
Hand in at the classroom before class starts.
ECE-3720 Spring 2012 19 Y. D. Zhang

You might also like