Sie sind auf Seite 1von 12

Why Probability ?

ECE/CSC 570

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

Probability Theory Review

Queueing 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

ECE/CSC 570, Fall 2014

Do Young Eun

More on Probability

Probability and Random Variables

Sample space : A set of all possible outcomes


sample points) of an experiment

Event: a subset of , denoted as A, B, C, etc.

Random variable
sample space, i.e.,

(or

Example: roll a dice = {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.

: a function of the outcome in a

E.g., X(k) = k2 square of the values

Probability: A measure of possibility an event of the sample space


happened
Probability Axiom

Probability: set function (mapping) from an event to [0,1]

Some properties of probability


If A B, then P(A) P(B)
P(A B) P(A) + P(B)

Do Young Eun

ECE/CSC 570, Fall 2014

Do Young Eun

ECE/CSC 570, Fall 2014

Discrete Random Variables

Infinite sample space

Discrete sample space, i.e., countable set: finite or


(countable) infinite outcomes
Finite sample space Roulette wheel

Count the number of telephone calls Y arrived at a server in time


interval [0,1] Repeating the experiment many times.

We have

Y is called a Poisson r.v. with parameter

Total N slots, each slot is marked with a label picked up from


(There are Ni slots marked with label xi

Now spin the wheel.

X is a r.v. that records the outcome of the


spin test. Probability pi that xi appears:

2
3

ECE/CSC 570, Fall 2014

Do Young Eun

(check!)

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

ECE/CSC 570, Fall 2014

Do Young Eun

Conditional Probability
A and B

An event A occurs given that event B has occurred


P( A B)
P( A | B)
for P(B) 0
P(B)
Examples:
A

1. Roulette Wheel Example


B={1, 2, 3}, A= {1,4}

Probability density function (pdf) of X:

Properties:

P{X A | X B}

P{X A B}
1
N1

P{X B}
N1 N 2 N 3 4

2. Let Y be a Poisson r.v.

P{Y 1 | Y 0}

Do Young Eun

ECE/CSC 570, Fall 2014

Do Young Eun

e
P{Y 1 and Y 0}
P{Y 1}

P{Y 0}
1 P{Y 0} 1 e
ECE/CSC 570, Fall 2014

Theorem of Total Probability

Conditional Probability (contd)


3. Let X be the lifetime of a communication link that is
exponentially distributed with rate 0 , we want to
estimate its probability that it will survive for at least t more
seconds, given that has been alive for a seconds.

Let Bi be a partition of , i.e., Bis are disjoint and

P{ X a t | X a}
_________ __________

B1

_________ __________ P{ X t }

B2

A B1

Note: This property is called memoryless, namely,

B3

P{ X a t | X a} P{ X t}
Do Young Eun

ECE/CSC 570, Fall 2014

Do Young Eun

Bayes Theorem

Let {Ei, i=1,2, , N} be a partition of

Then:

Updates prob. assigned to Ei in light of occurrence of F

F is regarded as new evidence

Widely used in inference systems

B4

ECE/CSC 570, Fall 2014

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} = ?
Further question: flip one more (any of three) costs $1;
pick the biased one you earn $2. Do you want to continue?

Do Young Eun

ECE/CSC 570, Fall 2014

Do Young Eun

ECE/CSC 570, Fall 2014

Moments of an RV

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?

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

Do Young Eun

ECE/CSC 570, Fall 2014

Instead, some partial information is OK

Moments of the PDF provide useful partial info.

Do Young Eun

Expected Value

ECE/CSC 570, Fall 2014

Higher Moments

E{X} denotes the expected value (average) of RV X:

E{Xn} denotes the n-th moment of RV X:

Definition:

Definition:

discrete RV:

discrete RV:

continuous 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 2014

First moment: expected value E{X}

Second moment: E{X2}

So on

Do Young Eun

ECE/CSC 570, Fall 2014

Variance

X2 or Var{X} denote the variance of RV X


Definition: X2 = E{(X-E{X})2}

Example

A r.v. X is geometrically distributed with parameter p (0,1)

Check if

the second moment around the mean


measure of the spread of X around its mean
extremely important, widely used in statistics
X2 = E{X2} E2{X}

Standard deviation, X: defined as

n 1

n 1

E{X} n pn n (1 p ) p n 1

same dimension (units) as the mean E{X}

n p n 1 n p n (n 1) p n n p n

more realistic measure of the spread of X

n 1

n 1

n 0

n 1

n 0

n 0

n 0

n 0

n pn pn n pn pn

Do Young Eun

ECE/CSC 570, Fall 2014

Do Young Eun

Exponentially distributed RV X with rate

ECE/CSC 570, Fall 2014

Independence of events

Example (2)

1
1 p

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

E{X} = ? Var{X} = ?

Poisson r.v. X with rate E{X} ? E{X2}=?

Do Young Eun

ECE/CSC 570, Fall 2014

We have

If A and B are independent,

Do Young Eun

ECE/CSC 570, Fall 2014

Independence of random variables

Two discrete r.v.s X and Y are independent

Independence implies E{ XY } E{ X }E{Y },

P( X xi, Y yi ) P( X xi )P(Y yi )

Consider two continuous r.v.s X and Y,


Joint density function:

f X ,Y ( x, y )

P{ X x, Y y}

Joint distribution function of X and Y:

Independence of random variables


uncorrelated

E{ XY } xy f X ,Y ( x, y )dxdy

But, the converse is not true!!

Example?

2
d P{ X x, Y y}
dxdy

The two r.v.s X and Y are independent

Do Young Eun

f X ,Y ( x, y ) f X ( x) f Y ( y )

ECE/CSC 570, Fall 2014

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

Arrival (or Counting) process

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

{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.
2.
3.
4.

the queue length changes as packets arrive or leave

ECE/CSC 570, Fall 2014

Do Young Eun

1.

N(0)=0
N(t) is integer valued.
N(t) is non-decreasing; i.e., if s t, then N(s) N(t).
For s < t, N(t) - N(s) = # of events (or arrivals) in (s,t] (right continuous
property).

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 2014

Do Young Eun

N(t)
t1 t2
ECE/CSC 570, Fall 2014

t3

Time

Independent Increments Property


N(t1)-N(s1)

s1

t1

Not so strong property: quite popular assumption!


For any t, s 0, the distribution of N(t+s) N(t) is
independent of t.

N(t2)-N(s2)

s2

t2

Stationary Increments Property

(s1,t1] and (s2,t2]: two non-overlapping time intervals


Y1 = N(t1) N(s1), Y2 = N(t2) N(s2): RVs representing # of events in
each interval
If arrivals in two intervals are independent, then RVs Y1 and Y2 are
also independent
the process has independent increments (very strong property)

P{N(t+s) N(t) = n}
= P{N(t1+s) N(t1) = n}

Do Young Eun

ECE/CSC 570, Fall 2014

= P{N(s) = n}

Note: N(t+s) N(t) N(s) in general: They have the


same distribution, but are not equal.

Do Young Eun

Poisson Process (contd)

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
What is P{N(h)=0} then?

Do Young Eun

ECE/CSC 570, Fall 2014

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 s and t 0,

Note:

ECE/CSC 570, Fall 2014

Do Young Eun

ECE/CSC 570, Fall 2014

Interarrival times of Poisson Process

Joint Distribution: Complete Characterization

For any increasing time instants (t1 , t2 , , tk ) and nondecreasing integers (n1 , n2 , , nk ), we want to compute

Consider a Poisson process with rate


X2

X1

X3

For instance, P{N(3)=4, N(5)=6, N(8)=10} = ?


t=0

t=1

t=2

t=3

Let Xn be the time between the (n-1)st and the nth event
(arrival). Then, {Xn, x 1} forms a sequence of interarrival
times.
Distribution ?

Do Young Eun

ECE/CSC 570, Fall 2014

Interarrival times of Poisson Process

First, what is the distribution of X1?

X1 has an exponential distribution with mean 1/.

Repeating the argument

In fact, Xn, n 1, are independent and identically


distributed (i.i.d.) exponential random variables with
mean 1/.

Another way of constructing a Poisson process?

ECE/CSC 570, Fall 2014

Do Young Eun

Sn: Time until the nth Arrival

Sn can be expressed as:

The event {Sn t}, the nth arrival before time t is


equivalent to the event {N(t) n}, the number of arrivals
occurring by time t is at least n.

Sn t

Do Young Eun

ECE/CSC 570, Fall 2014

Do Young Eun

ECE/CSC 570, Fall 2014

Memoryless Property

Paradox of Residual Life

Let { N(t), t 0} be a Poisson process with rate


Let t0 be the time since the last arrival
Q: what is the distribution of time till the next arrival?

t
Xn

Xn+1

Xn+2

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?

Exponential distribution is memoryless residual life paradox


Exponential dist. is the only one with the memoryless property!
ECE/CSC 570, Fall 2014

Do Young Eun

Two logical answers.

Do Young Eun

Answer 1: Average wait = 1/(2)

Note that average time between bus arrivals = 1/


Xn

Bus arrives

Xn+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?

On average, you will arrive exactly in the middle of an


inter-arrival time.
Your average wait for the next bus = E{Xi} = 1/(2)

Do Young Eun

Answer 2: Average wait = 1/

Xn+2

Bus arrives

ECE/CSC 570, Fall 2014

ECE/CSC 570, Fall 2014

Do Young Eun

ECE/CSC 570, Fall 2014

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.

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

Inspection Paradox: also applies to other arrival


processes

SN(t)

Do Young Eun

SN(t)+1

ECE/CSC 570, Fall 2014

Do Young Eun

Poisson as a Limit of Binomial Distribution

Binomial random variable


Xi: i.i.d., P{Xi=1} = 1 P{Xi=0} = p

Utilities of Poisson Processes

Bn has binomial distribution with parameters (n, p)

Now, n large, p=p(n) small, such that

Then, as n gets large, Bn 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))
Xk = 1 if there is a call arrival over I with probability p from kth source

ECE/CSC 570, Fall 2014

Superposition of two independent Poisson processes are


again a Poisson process.
Let N1(t) be a Poisson process with rate 1, and N2(t) be a Poisson
process with rate 2, and they are independent.
Then, N1(t)+N2(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 !

Total n sources, while np

Do Young Eun

ECE/CSC 570, Fall 2014

Do Young Eun

ECE/CSC 570, Fall 2014

Other Arrival Processes

Renewal Process: A counting process for which


the interarrival times are i.i.d. with an arbitrary
distribution

Regenerative Method
Example 1: To transmit packets from source to destination.
Packet

Source

Destination

Note: if i.i.d. exponential dist. Poisson process !


SENDER

PACKET
CRC

SEQ. #

RECEIVER

acknowledge packet
if no errors

TIMEOUT
ACK
retransmit
if no ACK
time
ECE/CSC 570, Fall 2014

Do Young Eun

Do Young Eun

Assumptions:

X = # of flips until tail shows up

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. P{X n} pn-1 (1-p)

Y = # of transmissions needed for destination to get a


correct packet given that the first transmission is error.

ECE/CSC 570, Fall 2014

Coin Flip Analogy

Regenerative Method (2)

1
, with probabilit y ( 1-p)
X
1 Y , with probabilit y p
Do Young Eun

ECE/CSC 570, Fall 2014

time

Do Young Eun

ECE/CSC 570, Fall 2014

Regenerative Method (3)

Since Y and X have the same distribution (Y is statistical


replica of X):

E{ X } 1 ( 1-p) p( 1 E{Y })
1-p p( 1 E{ X })
E{ X } 1/( 1-p)

Note: The purpose of regenerative method is to introduce


a simple algebra calculation method instead of complex
calculation

Do Young Eun

ECE/CSC 570, Fall 2014

Example 2 (contd)
X:
# of days he takes to reach freedom
E{X}: average days he takes to reach freedom
Yi : # of days he takes if his previous choice is door-i other
than the one leads to freedom
In class exercise: E{X} = ?

Do Young Eun

ECE/CSC 570, Fall 2014

Example 2

Example description: A prison cell has 4 doors (see figure).

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.

Door-4

1 day

Door-3

Prison Cell
5 days

FREE

Door-2

Door-1
3 days

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.

Do Young Eun

ECE/CSC 570, Fall 2014

Das könnte Ihnen auch gefallen