1 performance evaluation of computer systems by behzad akbari tarbiat modares university spring 2009...

39
1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables These slides are based on the slides of Prof. K.S. Trivedi (Duke University) In the Name of the Most High

Upload: hilda-byrd

Post on 25-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

1

Performance Evaluation of Computer Systems

By

Behzad Akbari

Tarbiat Modares University

Spring 2009

Introduction to Probabilities: Discrete Random Variables

These slides are based on the slides of Prof. K.S. Trivedi (Duke University)

In the Name of the Most High

Page 2: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

2

Random Variables

Sample space is often too large to deal with directly Recall that in the sequence of Bernoulli trials, if we

don’t need the detailed information about the actual pattern of 0’s and 1’s but only the number of 0’s and 1’s, we are able to reduce the sample space from size 2n

to size (n+1). Such abstractions lead to the notion of a random

variable

Page 3: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

3

Discrete Random Variables

A random variable (rv) X is a mapping (function) from the sample space S to the set of real numbers

If image(X ) finite or countable infinite, X is a discrete rv Inverse image of a real number x is the set of all sample points that

are mapped by X into x:

It is easy to see that

Page 4: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

4

Probability Mass Function (pmf)

Ax : set of all sample points such that,

pmf

Page 5: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

5

pmf Properties

Since a discrete rv X takes a finite or a countable infinite set

values,

the last property above can be restated as,

Page 6: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

6

Distribution Function

pmf: defined for a specific rv value, i.e., Probability of a set

Cumulative Distribution Function (CDF)

Page 7: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

7

Distribution Function properties

Page 8: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

8

Equivalence: Probability mass function Discrete density function(consider integer valued random variable)

cdf:

pmf:

)( kXPpk

x

kkpxF

0)(

Discrete Random Variables

)1()( kFkFpk

Page 9: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

9

Common discrete random variables

Constant Uniform Bernoulli Binomial Geometric Poisson

Page 10: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

10

Constant Random Variable

pmf

CDF

c

1.0

1.0

c

Page 11: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

11

Discrete Uniform Distribution

Discrete rv X that assumes n discrete value with equal probability 1/n

Discrete uniform pmf

Discrete uniform distribution function:

Page 12: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

12

Bernoulli Random Variable

RV generated by a single Bernoulli trial that has a binary valued outcome {0,1} Such a binary valued Random variable X is called the indicator or Bernoulli random variable so that

Probability mass function:

)0(1

)1(

XPpq

XPp

Page 13: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

13

Bernoulli Distribution

CDF

x0.0 1.0

q

p+q=1

Page 14: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

14

Binomial Random Variable

Binomial rv a fixed no. n of Bernoulli trials (BTs) RV Yn: no. of successes in n BTs Binomial pmf b(k;n,p)

Binomial CDF

Page 15: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

15

Binomial Random Variable

In fact, the number of successes in n Bernoulli trials can be seen as

the sum of the number of successes in each trial:

where Xi ’s are independent identically distributed Bernoulli random

variables. nn XXXY ...21

Page 16: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

16

Binomial Random Variable: pmf

pk

Page 17: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

17

0

0.2

0.4

0.6

0.8

1

1.2

0 1 2 3 4 5 6 7 8 9 10

x

CD

FBinomial Random Variable: CDF

Page 18: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

18

Reliability of a k out of n system

Series system:

Parallel system:

Applications of the binomial

njnjn

j

njparallel

njnjn

nj

njseries

jnjn

kj

nj

n

kjkofn

RRRRnbR

RRRRnnbR

RRRnjbRnkBR

]1[1]1[])[(),;0(1

][]1[])[(),;(

]1[])[(),;(),;1(1

1

Page 19: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

19

Transmitting an LLC frame using MAC blocks p is the prob. of correctly transmitting one block Let pK(k) be the pmf of the rv K that is the number of

LLC transmissions required to transmit n MAC blocks correctly; then

Applications of the binomial

nknkK

nnK

nK

ppkp

and

ppp

ppnnbp

])1(1[])1(1[)(

])1(1[)2(

),;()1(

1

2

Page 20: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

20

Geometric Distribution

Number of trials upto and including the 1st success.

In general, S may have countably infinite size

Z has image {1,2,3,….}. Because of independence,

Page 21: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

21

Geometric Distribution (contd.)

Geometric distribution is the only discrete distribution that exhibits MEMORYLESS property.

Future outcomes are independent of the past events. n trials completed with all failures. Y additional trials are performed

before success, i.e. Z = n+Y or Y=Z-n

Page 22: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

22

Geometric Distribution (contd.)

Z rv: total no. of trials upto and including the 1st success. Modified geometric pmf: does not include the successful

trial, i.e. Z=X+1. Then X is a modified geometric random variable.

Page 23: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

23

The number of times the following statement is executed:

repeat S until B

is geometrically distributed assuming …. The number of times the following statement is

executed:

while B do S

is modified geometrically distributed assuming ….

Applications of the geometric

Page 24: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

24

Negative Binomial Distribution

RV Tr: no. of trials until rth success.

Image of Tr = {r, r+1, r+2, …}. Define events: A: Tr = n B: Exactly r-1 successes in n-1 trials. C: The nth trial is a success.

Clearly, since B and C are mutually independent,

Page 25: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

25

Poisson Random Variable

RV such as “no. of arrivals in an interval (0,t)” In a small interval, Δt, prob. of new arrival= λΔt. pmf b(k;n, λt/n); CDF B(k;n, λt/n)=

What happens when

Page 26: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

26

Poisson Random Variable (contd.)

Poisson Random Variable often occurs in situations, such as, “no. of packets (or calls) arriving in t sec.” or “no. of components failing in t hours” etc.

Page 27: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

27

Poisson Failure Model

Let N(t) be the number of (failure) events that occur in the time interval (0,t). Then a (homogeneous) Poisson model for N(t) assumes:

1.The probability mass function (pmf) of N(t) is:

Where > 0 is the expected number of event occurrences per unit time

2.The number of events in two non-overlapping intervals are mutually independent

/ !k

tP N t k kt e

,2,1,0k

Page 28: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

28

Note:

For a fixed t, N(t) is a random variable (in this case a discrete random variable known as the Poisson random variable). The family {N(t), t 0} is a stochastic process, in this case, the homogeneous Poisson process.

Page 29: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

29

Poisson Failure Model (cont.)

The successive interevent times X1, X2, … in a homogenous Poisson model, are mutually independent, and have a common exponential distribution given by:

To show this:

Thus, the discrete random variable, N(t), with the Poisson distribution, is related to the continuous random variable X1, which has an exponential distributionThe mean interevent time is 1/, which in this case is the mean time to failure

eXttP 11 0t

tetNPtXP )0)(()( 1

Page 30: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

30

Probability mass function (pmf) (or discrete density function):

Distribution function (CDF):

k!

)( )(

ktektNPp t

k

k!)(

0

k

x

k

t texF

Poisson Distribution

Page 31: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

31

pk

t=1.0

Poisson pmf

Page 32: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

32

t1 2 3 4 5 6 7 8 9 10

0.5

0.1

CDF1

t=1.0

Poisson CDF

Page 33: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

33

t=4.0

pk

t=4.0

Poisson pmf

Page 34: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

34

t

CDF

1 2 3 4 5 6 7 8 9 10

0.5

0.1

1

t=4.0

Poisson CDF

Page 35: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

35

Probability Generating Function (PGF)

Helps in dealing with operations (e.g. sum) on rv’s Letting, P(X=k)=pk , PGF of X is defined by,

One-to-one mapping: pmf (or CDF) PGF See page 98 for PGF of some common pmfs

Page 36: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

36

Discrete Random Vectors

Examples: Z=X+Y, (X and Y are random execution times) Z = min(X, Y) or Z = max(X1, X2,…,Xk)

X:(X1, X2,…,Xk) is a k-dimensional rv defined on S

For each sample point s in S,

Page 37: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

37

Discrete Random Vectors (properties)

Page 38: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

38

Independent Discrete RVs

X and Y are independent iff the joint pmf satisfies:

Mutual independence also implies:

Pair wise independence vs. set-wide independence

Page 39: 1 Performance Evaluation of Computer Systems By Behzad Akbari Tarbiat Modares University Spring 2009 Introduction to Probabilities: Discrete Random Variables

39

Discrete Convolution

Let Z=X+Y . Then, if X and Y are independent,

In general, then,