Week1 Lecture2 PDF

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

EE501 Stochastic Processes

Semester 191
Week-1, Lecture-2

Mohamed Abdul Haleem


Room B14-S-345
Tel: x2572
Email: m.haleem@uoh.edu.sa
Probability Space

S or Ω is called the certain event , its elements experimental


outcomes and its subsets events. The empty set  is the impossible
event , and the event i  of a single element is an elementary
event.
Example: Dice throw S   f 1 , f 2 , f 3 , f 4 , f 5 , f 6 .
The space has 26=64 subsets
The event {even} consists of the three outcomes f2, f4, and f6.
An alternative definition of elements (outcomes) S ={even, odd}
will lead to 22=4 subsets
Probability Space

Assuming that the probability pi  P(i ) of elementary


outcomes i of S are apriori defined, how does one assign
probabilities to more ‘complicated’ events such as A, B, AB,
etc., above?
The three axioms of probability defined below can be used to
achieve that goal.
Axioms of Probability

For any event A, we assign a number P(A), called the probability of


the event A. This number satisfies the following three conditions
that act as the axioms of probability.
(i) P (A )  0 (Probability is a nonnegative number)
(ii) P (S )  1 (Probability of the whole set [certain event] is unity)
(iii) If A  B   , then P (A  B )  P (A )  P (B ).
Note: Above (iii) states that if A and B are mutually exclusive
events, the probability of their union is the sum of their
probabilities.)
(iv) If Ai are pair wise mutually exclusive, then
   

 n 
P A   P( A n ).
 n 1  n 1
Axioms of Probability

The following conclusions follow from these axioms:


a. Since A  A   , we have using (ii) P (A  A )  P (S )  1.
But A  A   and
, using (iii),
P (A  A )  P (A )  P (A )  1 or P (A )  1  P (A ).
b. Similarly, for any A, A     A,
Hence it follows that P  A     P( A)  P( )  P  A   .
But A      , and thus P   0.
c. Suppose A and B are not mutually exclusive (M.E.).
P ( A  B )  P( A)  P ( B )  P ( AB ).
Axioms of Probability

-Field (Example): In a coin tossing experiment, where the same


coin is tossed indefinitely, define
A = “head eventually appears”.
Is A an event? Our intuitive experience surely tells us that A is an
event. Let
An  head appears for the 1st time on the nth toss
 {t
, t ,
t,  , t , h}
n 1

Clearly Ai  A j   . Moreover the above A is


A  A1  A2  A3    Ai .
Axioms of Probability

-Field (Example):

But A   An , and using the fourth probability axiom
n 1

   

  An
P ( A)  P  
  P( A n ).
 n 1  n 1

For a fair coin since only one in 2n outcomes is in favor of An ,


we have  
1 1
P ( An )  n and
2
 n  n  1 a geometric series converging to 1 ,
P
n 1
( A ) 
n 1 2
which agrees with the intuition since we know that if we keep
tossing a coin, eventually, a head must show up, i.e.,
P ( A)  1.
Thus the fourth axiom is ‘reasonable’ .
Summary

In summary, the triplet (S, F, P ) composed of a nonempty set S of


elementary events, a -field F of subsets of S, and a probability
measure P on the sets in F subject the following four axioms, form a
probability model.
(i) P (A )  0 (Probability is a nonnegative number)
(ii) P (S )  1 (Probability of the whole set [certain event] is unity)
(iii) If A  B   , then P (A  B )  P (A )  P (B ).
  
(iv) If A i are pair wise mutually exclusive, then P  A n    P (A n ).
 n 1  n 1

The probability of more complicated events must follow from this


framework by deduction.
Conditional Probability

In N independent trials, suppose NA, NB , NAB denote the number


of times events A, B and AB occur respectively. According to the
frequency interpretation of probability, for large N
NA N N
P( A)  , P( B )  B , P( AB )  AB .
N N N
Among the NA occurrences of A, only NAB of them are found also
among the NB occurrences of B. Thus the ratio
N AB N AB / N P ( AB )
 
NB NB / N P( B)
is a measure of “the event A given that B has already occurred”.
Conditional Probability

We denote this conditional probability by


P(A|B) = Probability of “the event A given
that B has occurred”.
We define
P ( AB )
P( A | B )  ,
P( B )
provided P ( B )  0. As we show below, the above definition
satisfies all probability axioms discussed earlier.
Conditional Probability

P( AB )  0
We have (i) P( A | B )   0,
P( B )  0
P (SB ) P (B )
(ii) P (S | B )    1, since SB = B.
P (B ) P (B )
(iii) Suppose A C  0. Then
P(( A  C )  B ) P( AB  CB )
P( A  C | B )   .
P( B ) P( B )
But AB  AC   , hence P ( AB  CB )  P ( AB )  P(CB ).
P( AB ) P(CB )
P( A  C | B )    P( A | B )  P(C | B ),
P( B ) P( B )
satisfying all probability axioms. Thus conditional probability is
a legitimate probability measure.
Conditional Probability

Properties of Conditional Probability:


P( AB ) P( B)
a. If B  A, AB  B, and P( A | B)   1
P( B) P( B)
since if B  A, then occurrence of B implies automatic
occurrence of the event A.
Example: In a dice tossing experiment,
A  {outcome is even}, B={outcome is 2},
Here B  A, and P( A | B )  1.
P( AB ) P( A)
b. If A  B, AB  A, then P( A | B )    P( A).
P( B ) P( B )

12
Bayes’ Theorem

From conditional probability, P( AB )  P( A | B ) P( B ).


Similarly, from P( BA) P( AB )
P( B | A)   ,
P( A) P( A)
or P( AB )  P( B | A) P( A).
From which we get P ( A | B ) P ( B )  P ( B | A) P ( A).
or P( B | A)
P( A | B )   P( A)
P( B )
Above equation is known as Bayes’ theorem.
P (A) represents the a-priori probability of the event Ai.
P (A|B) a-posteriori probability of A given B
Total Probability and Bayes’ Theorem

Let A1 , A2 ,, An are pair wise disjoint and their union is S. Thus
Ai Aj   , and
n

A i  .
i 1
Thus
B  B( A1  A2    An )  BA1  BA2    BAn .

But Ai  Aj    BAi  BAj   , so that A1


A2
n n B Ai
P( B )   P( BA )   P( B | A ) P( A ).
i 1
i
i 1
i i Aj An
Thus Baye’s theorem can be re-written as
P (B | Ai )P (A i ) P (B | A i )P (A i )
P (A i | B )   n
.
 P (B | A
P (B )
i )P (A i )
i 1
Independence

A and B are said to be independent events, if


P ( AB )  P ( A)  P ( B ).
Notice that the above definition is a probabilistic
statement, not a set theoretic notion such as mutually
exclusiveness.
Suppose A and B are independent, then
P( AB ) P( A) P( B )
P( A | B )    P( A).
P( B ) P( B )
Thus if A and B are independent it makes no difference to A
whether B has occurred or not.
Independence

Example: A box contains 6 white and 4 black balls. Remove


two balls at random without replacement. What is the
probability that the first one is white and the second one is
black?
Let W1 = “first ball removed is white”
B2 = “second ball removed is black”
Independence

We need P(W1  B2 )  ? We have W1  B2  W1B2  B2W1.


Using the conditional probability rule,
P(W1B2 )  P( B2W1 )  P( B2 | W1 ) P(W1 ).
6 6 3
But P (W1 )    ,
6  4 10 5

4 4
and P ( B2 | W1 )   ,
54 9
3 4 12
and hence P (W1 B2 )     0.267.
5 9 45
Independence

Are the events W1 and B2 independent? Our common sense says


No. To verify this we need to compute P(B2). The first ball has two
options: W1 = “first ball is white” or B1= “first ball is black”.
Note that W1  B1   , and W1  B1  . Hence W1 together
with B1 form a partition. Thus
P( B2 )  P( B2 | W1 ) P(W1 )  P( B2 | B1 ) P( B1 )
4 3 3 4 4 3 1 2 42 2
          ,
5  4 5 6  3 10 9 5 3 5 15 5
and
2 3 6 12
P ( B2 ) P (W1 )     P ( B2W1 )  .
5 5 25 45
As expected, the events W1 and B2 are dependent.
More on Independence

 The event of zero probability is independent of every other event!


If P(A) = 0, then since the event AB  A always, we have
P (AB )  P (A )  0  P (AB )  0,
Independent events obviously cannot be mutually exclusive, since
P ( A)  0, P ( B )  0 and A, B independent implies P ( AB )  0.
Thus if A and B are independent, the event AB cannot be the null
set, whereas if A and B are mutually exclusive, AB is the null set.
More generally, a family of events Ai  are said to be independent,
if for every finite sub collection Ai1 , Ai2 , , Ain ,
 n  n
P  Aik    P ( Aik ).
we have
 k 1  k 1
More on Independence

 Let A  A1  A2  A3    An ,
a union of n independent events. Then by De-Morgan’s law and using
their independence A  A1 A2  An
n n
P ( A)  P ( A1 A2  An )   P ( Ai )   (1  P ( Ai )).
i 1 i 1

n
P ( A)  1  P ( A)  1   (1  P ( Ai )),
Thus
i 1

We can use these results to solve an interesting number theory problem.


It is applied in packet error rate calculation in data communication.
Bit Error Rate (BER) and Packet Error Rate (PER)

Example: In data communications, a packet is declared


incorrect if at least one bit is in error. The packet error
probability (rate) is related to the bit error probability (rate).
Let pe be the bit error probability. If there are n bits in a
packet, find an expression for packet error probability pp.
Solution: The event Ai of an error in any bit i=1,2,…,n is an
independent from the events of any other bit being in error.
Further, probability of a bit error is same for all bits. Thus
P( Ai )  pe , i  1, 2, ,n
n
P ( A)  1   (1  P ( Ai )) or
i 1

p p  1  (1  pe ) n
Bit Error Rate (BER) and Packet Error Rate (PER)

Numerical example: In a data communication system, 1% of


the bits are in error. If a data packet has 8 bits (a byte) find the
packet error rate.
pe=1% (0.01). pp = 1- (1-0.01)8=0.07726

Programing exercise: Write a MATLAB program to compute


and plot pp versus pe curves for 1, 2, 4, 8, 16, 32 byte packets,
all in the same figure. (Submit the report on Blackboard)
Repeated Trials (Ch. 3)

Example : An event A has probability p of occurring in a single


trial. Find the probability that A occurs exactly k times, k  n in n
trials.
Solution: Let (, F, P) be the probability model for a single trial. The
outcome of n experiments is an n-tuple
  1 , 2 ,,  n  0 ,
where every i   and 0         . Events in this
combined space are of the form A1  A2    An .
The event A occurs at trial # i , if  i  A.Suppose A occurs exactly k
times in .
Repeated Trials (Ch. 3) A.

Then k of the i say  i ,  i ,  ,  i , belong to A, and the remaining


1 2 k

n  k are contained in its compliment A.

P( A1  A2   An )  P1 ( A1 ) P2 ( A2 ) Pn ( An ).

P0 ( )  P({i1 ,i2 ,,ik ,,in })  P({i1 }) P({i2 }) P({ik }) P({in })
 P( A) P( A) P( A) P( A) P( A) P( A)  p k qnk .
     
k n k
Repeated Trials – Example cont…
However the k occurrences of A can occur in any particular
location inside . Let 1 ,  2 ,,  N represent all such events in
which A occurs exactly k times where N   k   n ! . Then the
n
  (n  k )!k !
event of interest is
" A occurs exactly k times in n trials"  1  2     N .
But, all these  i s are mutually exclusive, and equi-probable.
Therefore P (" A occurs exactly k times in n trials" )
N
 n  k n k
  P0 (i )  NP0 ( )    p q , k  0,1, 2, , n.
i 1 k 
a formula, due to Bernoulli.
Bernoulli Trials Cont…

Let X k  " exactly k occurrences in n trials" .


Since the number of occurrences of A in n trials must be an
integer k  0,1,2,, n, either X 0 or X 1 or X 2 or  or X n must
occur in such an experiment. Thus
P( X 0  X 1    X n )  1.

But X i , X j are mutually exclusive. Thus


n n
 n  k n k
P ( X 0  X 1    X n )   P ( X k )     p q .
k 0 k 0  k 
n
 n  k n k
Also note   k a b  (a  b ) n  1, when a+b=1
k 0  
(Binomial expansion) which is in agreement with the
probability of certain event.
Bernoulli Trials Cont…

Pn (k )
n  12, p  1 / 2.

For a given n and p what is the most likely value of k ? From


Fig., the most probable value of k is that number which
maximizes Pn (k ) . To obtain this value, consider the ratio
Pn ( k  1) n! p k 1q n k 1 ( n  k )! k! k q
 k n k
 .
Pn ( k ) ( n  k  1)!( k  1)! n! p q n  k 1 p

Thus Pn (k )  Pn (k  1), if k (1  p )  (n  k  1) p or k  ( n  1) p.
Thus Pn (k ) as a function of k increases until k  (n  1) p 
Bernoulli Trials Cont…

Programming exercise:
Write a MATLAB program to compute the probability of k out of
n success in Bernoulli trial and to plot probability versus k.
Weak Law of Large Numbers (WLLN)
Strong Law of Large Numbers (SLLN)
Let X i be independent, identically distributed Bernoulli random
Variables such that
P( X i  1)  p, P( X i  0)  1  p  q,
and let k  X 1  X 2    X n represent the number of “successes”
in n trials. Then the weak law due to Bernoulli states that [see
Theorem 3-1, page 58, Text]

P n  p   2.
k
n

pq

i.e., the ratio “total number of successes to the total number of


trials” tends to p in probability as n increases. This is the weak law
of large numbers (WLLN - Jacob Bernoulli 1713). A stronger
version of this result states that the above ratio k/n tends to p not
only in probability, but with probability 1. This is the strong law of
large numbers (SLLN – Borel and Cantelli 1909).
Weak Law of Large Numbers (WLLN)
[Bernoulli’s Therorem]
Proof of WLLN:
n n n
n! n!

k 0
kpn ( k )  
k 1
k
 n  k !k !
p k nk
q  
k 1  n  k  ! k  1 !
p k n k
q


n 1
n! i 1 n  i 1
p q
n 1
 np 
 n  1 !
p i q n i 1
i 1  n  i  1 !i ! i 1  n  i  1 !i !

 np  p  q 
n 1
 np
Similarly,
n n
n!
 k pn (k )   k
k 0
2

k 1  n  k ! k  1!
p k q nk


n
n!
p q 
k nk
n 1
 n  1 !
p i q n i 1
k  2  n  k  ! k  2  ! 1  n  i  1 !i !

 n 2 p 2  npq
Weak Law of Large Numbers (WLLN)
[Bernoulli’s Therorem]
    n2 2 which is equivalent to
2
k p  is equivalent to k np
n n n

  k  np  p  k    n  p  k   n 
2 2 2 2 2
n (1) n
n k 0 n k 0 n

  k  np  pn  k    k 2 pn  k   2np  kpn  k   n 2 p 2
2

k 0 k 0 k 0

 n 2 p 2  npq  2np  np  n 2 p 2  npq (2)


Alternatively,
n

  k  np  pn  k      k  np  pn  k      k  np  pn  k 
2 2 2

k 0 k  np  n k  np  n

   k  np  pn  k   n 2 2   p k 
2
From (1) n
k  np  n k  np  n

 n 2 2 P  k  np  n  (3)
k  pq
From (2) and (3) P  n  p    n 2 , the desired result.
 
Strong Law of Large Numbers (SLLN)
The strong law of large numbers states that if { n } is a
sequence of positive numbers converging to zero, then
 k  p     .

 n
P n
n 1
From Borel-Cantelli lemma [see (2-69) Text], when above
inequality is satisfied the events An =  kn  p   n  can occur
only for a finite number of indices n in an infinite sequence,
or equivalently, the events  kn  p   n  occur infinitely
often, i.e., the event k/n converges to p almost-surely.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy