640 likes | 885 Views
Chapter 2 Probability, Statistics and Flow Theory. 曾志成 國立宜蘭大學 電機工程學系 tsengcc@niu.edu.tw. Introduction. Several factors influence the performance of wireless systems Density of mobile users Cell size Moving direction and speed of users (Mobility models) Call rate, call duration
E N D
Chapter 2Probability, Statistics and Flow Theory 曾志成 國立宜蘭大學 電機工程學系 tsengcc@niu.edu.tw EE of NIU
Introduction • Several factors influence the performance of wireless systems • Density of mobile users • Cell size • Moving direction and speed of users (Mobility models) • Call rate, call duration • Interference, etc. • Probability, statistics theory and traffic patterns, help make these factors tractable EE of NIU
Random Variables (RV) • If S is the sample space of a random experiment, then a RV X is a function that assigns a real number X(s) to each outcomes that belongs to S. • RVs have two types • Discrete RVs:probability mass function, pmf. • Continuous RVs:probability density function, pdf. EE of NIU
Discrete Random Variables (1) • A discrete RV is used to represent a finite or countable infinite number of possible values. • E.g., throw a 6-sided dice and calculate the probability of a particular number appearing. Probability 0.3 0.2 0.2 0.1 0.1 0.1 Number 2 5 6 3 4 1 EE of NIU
Discrete Random Variables (2) • For a discrete RV X, the pmfp(k) of X is the probability that the RV X is equal to k and is defined below: p(k)= P(X = k),for k = 0, 1, 2, ... • It must satisfy the following conditions • 0 p(k)1, for every k • p(k) =1, for all k EE of NIU
Continuous Random Variables • The pdffX(x) of a continuous RV X is a nonnegative valued function defined on the whole set of real numbers (-∞, ∞) such that for any subset S (-∞, ∞) where x is simply a variable in the integral. • It must satisfy following conditions • fX(x) 0, for all x; EE of NIU
Cumulative Distribution Function (CDF) • The CDFof a RV is represented by P(k)(or FX(x)), indicating the probability that the RV X is less than or equal to k (or x). • For discrete RV • For continuous RV EE of NIU
fX(x) CDF Area x Probability Density Function (pdf) • The pdffX(x) of a continuous RV X is the derivative of the CDF FX(x): EE of NIU
Discrete RV --- Expected Value • The expected value or mean value of a discrete RV X • The expected value of the function g(X) of discrete RV Xis the mean of another RV Y that assumes the values of g(X) according to the probability distribution of X EE of NIU
Discrete RV --- nth Moment • The n-th moment • The first moment of X is simply the expected value. EE of NIU
Discrete RV --- nth Central Moment • The nth central moment is the moment about the mean value • The first central moment is equal to 0. EE of NIU
Discrete RV --- Variance • The varianceor the 2nd central moment where s is called the standard deviation EE of NIU
Continuous RV --- Expected Value • Expected value or mean value • The expected value of the function g(X) of a continuous RV Xis the mean of another RV Y that assumes the values of g(X) according to the prob. distribution of X EE of NIU
Continuous RV --- nth Moment, nth Central Moment and Variance • The nth moment • The nth central moment • Variance or the 2nd central moment EE of NIU
Distributions of Discrete RVs (1) • Poisson distribution • A Poisson RV is a measure of the number of events that occur in a certain time interval. • The probability distribution of having k events is k=0,1,2,…, and >0 • E[X]=l • Var(X)=l http://en.wikipedia.org/wiki/Poisson_distribution EE of NIU
Distributions of Discrete RVs (2) • Geometric distribution • A geometric RV indicate the number of trials required to obtain the first success. • The probability distribution of a geometric RV Xis • p is the probability of success • E[X]=1/p • Var(X)=(1-p)/p2 • The only discrete RV with the memoryless property. http://en.wikipedia.org/wiki/Geometric_distribution EE of NIU
Distributions of Discrete RVs (3) • Binomial distribution • A binomial RV represents the presence of k, and only k, out of n items and is the number of successes in a series of trials. k=0, 1, 2, …, n, n=0, 1, 2,… • p is a success prob., and • E[X]=np • Var(X)=np(1-p) http://en.wikipedia.org/wiki/Binomial_distribution EE of NIU
Distributions of Discrete RVs (4) • When n is large and p is small, the binomial distribution approaches to the Poisson distribution with the parameter given by l = np EE of NIU
Distributions of Continuous RVs (1) • Normal distribution • The pdf of the normal RV X is • The CDF can be obtained by EE of NIU
Distributions of Continuous RVs (2) • In general • X~N(m,s2) is used to represent the RV Xas a normal RVwith the mean and variance m and s2 respectively. • The case when m=0and s= 1 is called the standard normal distribution. http://en.wikipedia.org/wiki/Normal_distribution EE of NIU
Distributions of Continuous RVs (3) • Uniform Distribution • The values of a uniform RV are uniformly distributed over an interval. • pdf of a uniform distributed RV X is • CDF of a uniform distributed RV Xis • E[X]=(a+b)/2and Var(X)=(b-a)2/12 http://en.wikipedia.org/wiki/Uniform_distribution EE of NIU
Distributions of Continuous RVs (4) • Exponential distribution • Generally used to describe the time interval between two consecutive events • pdf is • CDF is • lis the average rate. • E[X]=1/l • Var(X)=1/l2 http://en.wikipedia.org/wiki/Exponential_distribution EE of NIU
Multiple RVs (1) • In some cases, the result of one random experiment is dictated by the values of several RVs, where these values may also affect each other. • A joint pmf of the discrete RVs X1, X2, …, Xnis and represents the prob. that X1=x1, X2 = x2, …, Xn = xn. EE of NIU
Multiple RVs (2) • joint CDF • joint pdf EE of NIU
Conditional Probability • A conditional prob. is the prob. that X1=x1 given X2=x2, …, Xn=xn • For discrete RVs • For continuous RVs EE of NIU
Bayes’ Theorem • P(Ai│B) (read as:the prob. of B, given Ai)is • P(Ai) and P(B) are the unconditional probabilities of Ai and B. EE of NIU
Stochastically Independence (or Independence) • Two events are independent if one may occur irrespective of the other. • A finite set of events is mutually independentif and only if (iff)every event is independent of any intersection of the other events. • If the RVs X1, X2,…, Xnare mutually independent • Discrete RVs • Continuous RVs EE of NIU
Important Properties (1) • Sum property of the expected value • Expected value of the sum of RVs X1, X2, …, Xn • Product property of the expected value • Expected value of product of independent RVs EE of NIU
Important Properties (2) • Sum property of the variance • Variance of the sum of RVs X1, X2,…, Xnis • Cov[Xi,Xj] is the covariance of RVs Xi and Xj • If Xi and Xj are indep., • Cov[Xi,Xj]=0 for i≠j EE of NIU
Central Limit Theorem • Whenever a random sample(X1, X2,…, Xn) of size n is taken from any distribution with expected value E[Xi] =mand varianceVar(Xi)=s2where i = 1, 2, …, n, then their arithmetic mean (or sample mean) is defined by • The sample mean is approximated to a normal distribution with E[Sn] =mand Var(Sn)=s2/n • The larger the value of the sample size n, the better the approximation to the normal EE of NIU
Poisson Arrival Model • A Poisson processis a sequence of events randomly spaced in time. • For a time interval [0,t],the probability of n arrivals in t units of time is • The rate lof a Poisson process is the average number of events per unit of time (over a long time). • The number of arrivals in any two disjoint intervals are independent. EE of NIU
Interarrival Times of Poisson Process • Interarrival times of a Poisson process • We pick an arbitrary starting point t0 in time. Let T1 be the time until the next arrival. We have P(T1>t)=P0(t)=e-t. • The CDF of T1 is (t)=P(T1≤ t)=1-e-t • The pdf of T1 is (t)=e-t. • Therefore, T1 has an exponential distribution with mean rate . EE of NIU
Exponential Distribution • Similarly, • T2 is the time between first and second arrivals • T3 as the time between the second and third arrivals • T4 as the time between the third and fourth arrivals and so on. • The random variables T1, T2, T3,… are called the interarrival times of the Poisson process. • T1, T2, T3,… are mutually independent and each has the exponential distribution with mean arrival rate . EE of NIU
Memoryless and Merging Properties • Memoryless property • A random variable X is said to be memoryless if • The exponential/geometric distribution is the only continuous/discrete RV with the memoryless property. • Merging property • If we merge n Poisson processes with distributions for the interarrival times where i = 1, 2,…, n into one single process, then the result is a Poisson process for which the interarrival times have the distribution 1-e-t with mean =1+2+…+n. EE of NIU
Basic Queuing Systems • What is queuing theory? • Queuing theory is the study of queues (sometimes called waiting lines). • It can be used to describe real world queues, or more abstract queues, found in many branches of computer science, such as operating systems. • Queuing theory can be divided into 3 sections • Traffic flow • Scheduling • Facility design and employee allocation EE of NIU
Kendall’s Notation (1) • D. G. Kendall in 1951 proposed a standard notation A/B/C/D/E for classifying queuing systems into different types. EE of NIU
Kendall’s Notation (2) • A and B can take any of the following distributions types EE of NIU
Little’s Law • Assuming a queuing environment to be operated in a steady state where all initial transients have vanished, the key parameters characterizing the system are • l─ the mean steady-state customer arrival rate • N ─ the average no. of customers in the system • T ─ the mean time spent by each customer in the system (time spent in the queue plus the service time) • Little’s law: N = lT EE of NIU
Markov Process • A Markov process is one in which the next state of the process depends only on the present state, irrespective of any previous states taken by the process. • The knowledge of the current state and the transition probabilities from this state allows us to predict the next state. • A Markov chain is a discrete state Markov process. EE of NIU
Birth-Death Process (1) • Special type of Markov process • If the population (or jobs) in the queue has n, • birth of another entity (arrival of another job) causes the state to change to n+1. • a death (a job removed from the queue for service) would cause the state to change to n-1. • Any state transitions can be made only to one of the two neighboring states. EE of NIU
0 1 2 n-2 n-1 n n+1 …… … 0 1 2 n-1 n n+1 n+2 n n+1 1 2 3 n-1 Birth-Death Process (2) • The state transition diagram of the continuous birth-death process P(n-1) P(n) P(n+1) P(0) P(1) P(2) P(i) is the steady state probability in state i. EE of NIU
Birth-Death Process (3) • In state n, we have • P(i) is the steady state prob. of the state i. • li (i=0, 1, 2, …)is the average arrival rate in the state i. • mi (i=0, 1, 2, …) is the average service rate in the state i. EE of NIU
Birth-Death Process (4) • For state 0, • For state 1, • For state n, EE of NIU
M/M/1/∞ Queuing System (1) • M/M/1/∞ = M/M/1/∞/∞ = M/M/1 • When a customer arrives in this system, it will be served if the server is free, otherwise the customer is queued. • In this system, customers arrive according to a Poisson distribution and compete for the service in a FIFO (first-in-first-out) manner. • Service times are independent identically distributed (iid) random variables, the common distribution being exponential. EE of NIU
M/M/1 Queuing System (2) • The M/M/1queuing model • The state transition diagram of the M/M/1queuing system Server Queue System P(i-1) P(i) P(i+1) P(2) P(0) P(1) …… … 0 1 2 i-1 i i+1 EE of NIU
M/M/1 Queuing System (3) • The equilibrium state equations are given by • So, r =l/m is the flow intensity andr< 1 EE of NIU
M/M/1 Queuing System (4) • The normalized condition is given by • Since, • Therefore, EE of NIU
M/M/1 Queuing System (5) • The average number of customers in the system is given by Typo in Eq. (2.64) EE of NIU
M/M/1 Queuing System (6) • By using the Little’s Law, the average dwell time (or system time) of customers is EE of NIU
M/M/1 Queuing System (7) • The average queue length EE of NIU