Вы находитесь на странице: 1из 12

ECE/CSC 570

Probability Theory Review


Do Young Eun ECE/CSC 570, Fall 2012
Why Probability ?
Extensive use in modeling network traffic
Area of mathematics most fundamentally related to
computer networking
Leads on to more powerful analysis tools and modeling
paradigms
Markov chains
Queuing theory, etc.
Deterministic approach is infeasible!
You cant rely on simulations/test-bed for every possible
scenarios
We need insight, to be able to predict, optimize system in a
systematic way
Do Young Eun ECE/CSC 570, Fall 2012
Probability and Random Variables
Sample space O: A set of all possible outcomes (or
sample points) of an experiment
Event: a subset of O, denoted as A, B, C, etc.
Random variable : a function of the outcome in a
sample space, i.e.,
Probability: A measure of possibility an event of the sample space
happened
Probability Axiom
Do Young Eun ECE/CSC 570, Fall 2012
More on Probability
Example: roll a dice O = {1,2,3,4,5,6}
Event: {2,4,6}, {1,5},
Random variable: e.g., x = 0 if it is even and =1 if odd.
E.g., X(k) = k
2
square of the values
Probability: set function (mapping) from an event to [0,1]
Some properties of probability
If A c B, then P(A) P(B)
P(A B) P(A) + P(B)
Do Young Eun ECE/CSC 570, Fall 2012
Discrete Random Variables
Discrete sample space, i.e., countable set: finite or
(countable) infinite outcomes
Finite sample space Roulette wheel
Total N slots, each slot is marked with a label picked up from
(There are N
i
slots marked with label x
i
1
2
4
3
1
4
Now spin the wheel.
Xis a r.v. that records the outcome of the
spin test. Probability p
i
that x
i
appears:
Do Young Eun ECE/CSC 570, Fall 2012
Infinite sample space
Count the number of telephone calls Y arrived at a server in time
interval [0,1] Repeating the experiment many times.
We have (check!)
Y is called a Poisson r.v. with parameter
Do Young Eun ECE/CSC 570, Fall 2012
Continuous Random Variables
Example: Exponentially distributed random variable X
with rate > 0 :
Probability distribution function of X :
Properties:
F(t) is non-decreasing in t, F(1) = 1

Probability density function (pdf) of X:


Properties:

Do Young Eun ECE/CSC 570, Fall 2012


An event A occurs given that event B has occurred
Examples:
1. Roulette Wheel Example
B={1, 2, 3}, A= {1,4}
0 ) P( for
) ( P
) ( P
) | ( P >

= B
B
B A
B A
A B
A and B
4
1
} { P
} { P
} | { P
3 2 1
1
=
+ +
=
e
e
= e e
N N N
N
B X
B A X
B X A X

=
=
=
=
>
> =
= > =
e
e
Y
Y Y Y
Y Y
1

} 0 { P 1
} 1 { P
0} P{Y
} 0 and 1 { P
} 0 | 1 { P
2. Let Y be a Poisson r.v.
Conditional Probability
Do Young Eun ECE/CSC 570, Fall 2012
3. Let X be the lifetime of a communication link that is
exponentially distributed with rate , we want to
estimate its probability that it will survive for at least t more
seconds, given that has been alive for a seconds.
} { P __________ _________
__________ _________
} | { P
t X
a X t a X
> = = =
= =
> + >
Note: This property is called memoryless, namely,
0 >
} P{ } | { P t X a X t a X > = > + >
Conditional Probability (contd)
Do Young Eun ECE/CSC 570, Fall 2012
Theorem of Total Probability
Let B
i
be a partition of O, i.e., B
i
s are disjoint and

1
B
2
B
3
B
4
B
1
B A
Do Young Eun ECE/CSC 570, Fall 2012
Bayes Theorem
Let {E
i
, i=1,2, , N} be a partition of O
Then:
Updates prob. assigned to E
i
in light of occurrence of F
F is regarded as new evidence
Widely used in inference systems
Do Young Eun ECE/CSC 570, Fall 2012
Example
3 coins are given: two of them are fair, one of them is
biased (P{H}=2/3, P{T}=1/3)
We dont know which one is biased; they all look the same
Flip three coins in a row and we have observed
The first and second coins both show heads, while the third one
shows tail
Class Exercise: Given the observation, P {the first coin is
the biased one} = ?
Do Young Eun ECE/CSC 570, Fall 2012
Another example: Monty Hall problem
3 doors; only one of them leads to prize; the other two have goats
(or no prize).
You choose one of three, and the other (Monty Hall) open one of the
other two (unselected) and show that there is a goat.
Monty asks you: Do you want to stay on your choice or switch to the
other unopened door?
Do Young Eun ECE/CSC 570, Fall 2012
Moments of an RV
The CDF (or PDF) provides complete info. about a r.v. X
determines probability of any event involving r.v. X
Often, we need/want a lot less info about an experiment:
We are not interested in all possible events.
We cannot provide/digest so much information
Instead, some partial information is OK
Moments of the PDF provide useful partial info.
Do Young Eun ECE/CSC 570, Fall 2012
Expected Value
E{X} denotes the expected value (average) of RV X:
Definition:
discrete RV:
continuous RV:
Expected value of X is the sum of the values of X weighted by
their probabilities
If Y = g(X):
discrete RV:
continuous RV:
Do Young Eun ECE/CSC 570, Fall 2012
Higher Moments
E{X
n
} denotes the n-th moment of RV X:
Definition:
discrete RV:
continuous RV:
First moment: expected value E{X}
Second moment: E{X
2
}
So on
Do Young Eun ECE/CSC 570, Fall 2012
Variance
o
X
2
or Var{X} denote the variance of RV X
Definition: o
X
2
= E{(X-E{X})
2
}
the second moment around the mean
measure of the spread of X around its mean
extremely important, widely used in statistics
o
X
2
= E{X
2
} E
2
{X}
Standard deviation, o
X
: defined as
same dimension (units) as the mean E{X}
more realistic measure of the spread of X
Do Young Eun ECE/CSC 570, Fall 2012
Example
A r.v. X is geometrically distributed with parameter p e (0,1)
Check if

p
p p n p p n
p n p n p n p n
p p n p n
n
n
n
n
n
n
n
n
n
n
n
n
n
n
n
n
n
n
n
n

= = + =
+ = =
= =


=
1
1

) 1 (
) 1 ( E{X}
0 0 0 0
1 0 1 1
1
1
1
1
Do Young Eun ECE/CSC 570, Fall 2012
Example (2)
Exponentially distributed RV X with rate
E{X} = ? Var{X} = ?
Poisson r.v. X with rate E{X} ? E{X
2
}=?
Do Young Eun ECE/CSC 570, Fall 2012
Independence of events
Two events A and B are said to be independent if and
only if P(A|B) = P(A).
Occurrence of B tells us nothing about occurrence of A
We have
If A and B are independent,
Do Young Eun ECE/CSC 570, Fall 2012
Two discrete r.v.s X and Y are independent
Consider two continuous r.v.s X and Y,
Joint distribution function of X and Y:
Joint density function:
The two r.v.s X and Y are independent
} , { P y Y x X s s
dxdy
y Y x X
d
y x
Y X
} , { P
) , (
f
2
,
s s
=
) ( P ) ( P ) , ( P i i i i y Y x X y Y x X = = = = =

) (
f
) (
f
) , (
f ,
y x y x
Y X Y X
=
Independence of random variables
Do Young Eun ECE/CSC 570, Fall 2012
dxdy y x xy XY
Y X
) , (
f
} { E
,
}
=
}, { E } { E } { E Y X XY =
Independence of random variables
Independence implies

But, the converse is not true!!


uncorrelated
Example?
Do Young Eun ECE/CSC 570, Fall 2012
Stochastic Dynamic Systems
Dynamic systems: those that evolve in time
Must describe the sequence of states a system enters
Example: the length of the queue at a router interface
the queue length changes as packets arrive or leave
need a model to describe these changes over time
Example: # of packet/call arrivals over time [0, t]
Stochastic process: models dynamic systems
combines the concept of RV with the notion of time
informally: a vector RV with infinite dimensions
Do Young Eun ECE/CSC 570, Fall 2012
Arrival (or Counting) process
{N(t), t 0} be a discrete-space, continuous time stochastic
process
Definition: {N(t); t 0} is a counting (or arrival) process if:
1. N(0)=0
2. N(t) is integer valued.
3. N(t) is non-decreasing; i.e., if s t, then N(s) N(t).
4. For s < t, N(t) - N(s) = # of events (or arrivals) in (s,t] (right continuous
property).
N(t)
Time t
1
t
2
t
3
1. N(t) = # of telephone
calls arrived in time
interval [0,t]
2. N(t) = # of packets
generated in time
interval [0,t], etc.
Do Young Eun ECE/CSC 570, Fall 2012
Independent Increments Property
(s
1
,t
1
] and (s
2
,t
2
]: two non-overlapping time intervals
Y
1
= N(t
1
) N(s
1
), Y
2
= N(t
2
) N(s
2
): RVs representing # of events in
each interval
If arrivals in two intervals are independent, then RVs Y
1
and Y
2
are
also independent
the process has independent increments (very strong property)
t
0 s
1
s
2 t
1
t
2
N(t
1
)-N(s
1
) N(t
2
)-N(s
2
)
Do Young Eun ECE/CSC 570, Fall 2012
Stationary Increments Property
Not so strong property: quite popular assumption!
For any t, s 0, the distribution of N(t+s) N(t) is
independent of t.
Note: N(t+s) N(t) N(s) in general: They have the
same distribution, but are not equal.
P{N(t+s) N(t) = n}
= P{N(t
1
+s) N(t
1
) = n}
= P{N(s) = n}
Do Young Eun ECE/CSC 570, Fall 2012
Poisson Process
Two Definitions:
Definition 1: An arrival process {N(t); t 0} is
said to be a Poisson Process with rate > 0, if
N(0)=0
It has stationary and independent increments
P{N(h) = 1} = h + o(h)
P{N(h) 2} = o(h): rules out simultaneous arrivals
Note:
What is P{N(h)=0} then?
Do Young Eun ECE/CSC 570, Fall 2012
Poisson Process (contd)
Equivalent Definition:
Definition 2: An arrival process {N(t), t 0} is said to
be a Poisson Process with rate , if
N(0)=0
The process has independent increments.
The number of arrivals in any interval of length s is Poisson
distributed with mean s. In other words, for all sand t 0,
Do Young Eun ECE/CSC 570, Fall 2012
Joint Distribution: Complete Characterization
For any increasing time instants (t
1
, t
2
, , t
k
) and non-
decreasing integers (n
1
, n
2
, , n
k
), we want to compute
For instance, P{N(3)=4, N(5)=6, N(8)=10} = ?
Do Young Eun ECE/CSC 570, Fall 2012
Interarrival times of Poisson Process
Consider a Poisson process with rate
Let X
n
be the time between the (n-1)
st
and the n
th
event
(arrival). Then, {X
n
, x 1} forms a sequence of interarrival
times.
Distribution ?
X
1
X
2
X
3
t=0 t=1 t=2 t=3
Do Young Eun ECE/CSC 570, Fall 2012
Interarrival times of Poisson Process
First, what is the distribution of X
1
?
X
1
has an exponential distribution with mean 1/.
Repeating the argument
In fact, X
n
, n 1, are independent and identically
distributed (i.i.d.) exponential random variables with
mean 1/.
Another way of constructing a Poisson process?
Do Young Eun ECE/CSC 570, Fall 2012
S
n
: Time until the n
th
Arrival
S
n
can be expressed as:
The event {S
n
t}, the n
th
arrival before time t is
equivalent to the event {N(t) n}, the number of arrivals
occurring by time t is at least n.
t
S
n

Do Young Eun ECE/CSC 570, Fall 2012


Memoryless Property
Let { N(t), t 0} be a Poisson process with rate
Let t
0
be the time since the last arrival
Q: what is the distribution of time till the next arrival?
Exponential distribution is memoryless residual life paradox
Exponential dist. is the only one with the memoryless property!
Do Young Eun ECE/CSC 570, Fall 2012
Paradox of Residual Life
Suppose that buses arrive at a stop according to a
Poisson process with rate .
Assume that you arrive at that bus-stop at some arbitrary
point in time.
Question: How long would you expect to wait?
Two logical answers.
t
X
n
X
n+2
X
n+1
Do Young Eun ECE/CSC 570, Fall 2012
Answer 1: Average wait = 1/(2)
Note that average time between bus arrivals = 1/
On average, you will arrive exactly in the middle of an
inter-arrival time.
Your average wait for the next bus = E{X
i
} = 1/(2)
t
X
n
X
n+2
X
n+1
Bus arrives Bus arrives
Do Young Eun ECE/CSC 570, Fall 2012
Answer 2: Average wait = 1/
Since buses arrive according to a Poisson process with rate ,
the time you have to wait is independent of how long it has
taken since the last bus, i.e., the average wait = 1/.
In fact, by the second argument, if buses have been
operational for a long time, then by the memory-less property,
the expected time since the last bus arrival is also 1/.
This implies that the expected time between the last bus and
the next bus arrival in your interval = 2/
So, which answer is correct?
Do Young Eun ECE/CSC 570, Fall 2012
Paradox of Residual Life
Answer 2 is in fact correct!
This is because the interval that you arrive in is not a typical
interval, i.e., it is in fact more likely that you will arrive in a larger
time interval.
In the case of a Poisson process, if you are sufficiently far from the
origin, this interval that you arrive is in fact two times as long as
the average interval.
Inspection Paradox: also applies to other arrival
processes
t S
N(t)
S
N(t)+1
Do Young Eun ECE/CSC 570, Fall 2012
Utilities of Poisson Processes
It has been shown that the number of call (or connection)
arrivals received in a network system in a time interval
[0,t] is well modeled by a Poisson process.
Connection with Binomial distribution
Many nice properties
Do Young Eun ECE/CSC 570, Fall 2012
Poisson as a Limit of Binomial Distribution
Binomial random variable
X
i
: i.i.d., P{X
i
=1} = 1 P{X
i
=0} = p
B
n
has binomial distribution with parameters (n, p)
Now, n large, p=p(n) small, such that
Then, as ngets large, B
n
converges to a Poisson random
variable with mean
# of phone call (packet) arrivals at central switch over small
time interval I (of size O(1/n))
X
k
= 1 if there is a call arrival over I with probability pfrom k
th
source
Total nsources, while np ~
Do Young Eun ECE/CSC 570, Fall 2012
Utilities of Poisson Processes
Superposition of two independent Poisson processes are
again a Poisson process.
Let N
1
(t) be a Poisson process with rate
1
, and N
2
(t) be a Poisson
process with rate
2
, and they are independent.
Then, N
1
(t)+N
2
(t) is also a Poisson process with rate
1
+
2
Statistically splitting Poisson arrival into two arrival
processes (using a Bernoulli r.v. for splitting) Poisson
processes !
Do Young Eun ECE/CSC 570, Fall 2012
Other Arrival Processes
Renewal Process: A counting process for which
the interarrival times are i.i.d. with an arbitrary
distribution
Note: if i.i.d. exponential dist. Poisson process !
Do Young Eun ECE/CSC 570, Fall 2012
Example 1: To transmit packets from source to destination.
SENDER RECEIVER
SEQ. # CRC
PACKET
ACK
TIMEOUT
retransmi t
i f no ACK
acknowl edge packet
i f no errors
time
time
Source
Destination
Packet
Regenerative Method
Do Young Eun ECE/CSC 570, Fall 2012
Regenerative Method (2)
Assumptions:
When destination receives a correct packet, an ACK would be
generated, otherwise a NACK would be generated and sent back
to source.
A packet is correctly transmitted with probability (1-p)
A packet in error must be retransmitted.
Transmission of packets is independent
X = # of transmissions needed for destination to get a
correct packet.
Y = # of transmissions needed for destination to get a
correct packet given that the first transmission is error.
-p) ( p n} {X
n-
1 P
1
= =

+
=
-p) (
p Y
X
1 y probabilit with , 1
y probabilit with , 1
Do Young Eun ECE/CSC 570, Fall 2012
Regenerative Method (3)
Since Y is independent of X and has the same distribution
as X,
Note: The purpose of regenerative method is to introduce
a simple algebra calculation method instead of complex
calculation
-p) /( X
X p( -p
Y p( -p) ( X
1 1 } E{
}) E{ 1 1
}) E{ 1 1 1 } E{
=
+ + =
+ + =
Do Young Eun ECE/CSC 570, Fall 2012
Example 2
Example description: A prison cell has 4 doors (see figure).
Assumptions:
It takes a prisoner 1 day to get to each door.
A prisoner immediately forgets which door he takes every time.
A prisoner chooses each door with equal probability.
Only 1 door lets to freedom,
the other 3 doors, if a
prisoner enters, he would be
trapped and kept inside for 1
day, 3 days, 5 days each.
Prison Cell
FREE
1 day
3 days
5 days
Door-4
Door-1
Door-2
Door-3
Do Young Eun ECE/CSC 570, Fall 2012
X: # of days he takes to reach freedom
E{X}: average days he takes to reach freedom
Y
i
: # of days he takes if his previous choice is door-i other
than the one leads to freedom
In class exercise: E{X} = ?
Example 2 (contd)

Вам также может понравиться