Probability Review CSE430 – Operating Systems. Overview of Lecture Basic probability review Important distributions Poison Process Markov Chains Queuing.

Slides:



Advertisements
Similar presentations
MOMENT GENERATING FUNCTION AND STATISTICAL DISTRIBUTIONS
Advertisements

CS433: Modeling and Simulation
Acknowledgement: Thanks to Professor Pagano
Lecture 10 – Introduction to Probability Topics Events, sample space, random variables Examples Probability distribution function Conditional probabilities.
Discrete Probability Distributions
Probability, Statistics, and Traffic Theories
TCOM 501: Networking Theory & Fundamentals
The Binomial Probability Distribution and Related Topics
TDC 369 / TDC 432 April 2, 2003 Greg Brewster. Topics Math Review Probability –Distributions –Random Variables –Expected Values.
1 Performance Evaluation of Computer Networks Objectives  Introduction to Queuing Theory  Little’s Theorem  Standard Notation of Queuing Systems  Poisson.
A random variable that has the following pmf is said to be a binomial random variable with parameters n, p The Binomial random variable.
Discrete Probability Distributions
Queueing Theory.
7/3/2015© 2007 Raymond P. Jefferis III1 Queuing Systems.
Class notes for ISE 201 San Jose State University
Review of important distributions Another randomized algorithm
Discrete Random Variables: The Binomial Distribution
Chapter 21 Random Variables Discrete: Bernoulli, Binomial, Geometric, Poisson Continuous: Uniform, Exponential, Gamma, Normal Expectation & Variance, Joint.
Lecture 10 – Introduction to Probability Topics Events, sample space, random variables Examples Probability distribution function Conditional probabilities.
Prof. SankarReview of Random Process1 Probability Sample Space (S) –Collection of all possible outcomes of a random experiment Sample Point –Each outcome.
ELE 511 – TELECOMMUNICATIONS NETWORKS
Introduction to Queuing Theory
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 4 and 5 Probability and Discrete Random Variables.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Discrete Random Variables Chapter 4.
General information CSE : Probabilistic Analysis of Computer Systems
Queueing Theory I. Summary Little’s Law Queueing System Notation Stationary Analysis of Elementary Queueing Systems  M/M/1  M/M/m  M/M/1/K  …
PBG 650 Advanced Plant Breeding
Chapter 6: Probability Distributions
Probability Review Thinh Nguyen. Probability Theory Review Sample space Bayes’ Rule Independence Expectation Distributions.
Modeling and Simulation CS 313
Lecture 4 1 Discrete distributions Four important discrete distributions: 1.The Uniform distribution (discrete) 2.The Binomial distribution 3.The Hyper-geometric.
Theory of Probability Statistics for Business and Economics.
Random Variables. A random variable X is a real valued function defined on the sample space, X : S  R. The set { s  S : X ( s )  [ a, b ] is an event}.
Network Design and Analysis-----Wang Wenjie Queueing System IV: 1 © Graduate University, Chinese academy of Sciences. Network Design and Analysis Wang.
Queuing Theory Basic properties, Markovian models, Networks of queues, General service time distributions, Finite source models, Multiserver queues Chapter.
Modeling and Analysis of Computer Networks
Binomial Experiment A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the following properties:
Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Chapter 5 Discrete Random Variables.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 5 Discrete Random Variables.
King Saud University Women Students
Probability Theory for Networking Application Rudra Dutta ECE/CSC Fall 2010, Section 001, 601.
CS433 Modeling and Simulation Lecture 03 – Part 01 Probability Review 1 Dr. Anis Koubâa Al-Imam Mohammad Ibn Saud University
Generalized Semi- Markov Processes (GSMP). Summary Some Definitions The Poisson Process Properties of the Poisson Process  Interarrival times  Memoryless.
Chapter 01 Probability and Stochastic Processes References: Wolff, Stochastic Modeling and the Theory of Queues, Chapter 1 Altiok, Performance Analysis.
Random Variable The outcome of an experiment need not be a number, for example, the outcome when a coin is tossed can be 'heads' or 'tails'. However, we.
Sampling and estimation Petter Mostad
Chapter 2 Probability, Statistics and Traffic Theories
4 - 1 © 2003 Pearson Prentice Hall Chapter 4 Discrete Random Variables.
Binomial Distributions Chapter 5.3 – Probability Distributions and Predictions Mathematics of Data Management (Nelson) MDM 4U.
Stochastic Processes1 CPSC : Stochastic Processes Instructor: Anirban Mahanti Reference Book “Computer Systems Performance.
1 Part Three: Chapters 7-9 Performance Modeling and Estimation.
Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Chapter 5 Discrete Random Variables.
Chapter 6 Large Random Samples Weiqi Luo ( 骆伟祺 ) School of Data & Computer Science Sun Yat-Sen University :
Chap 2 Network Analysis and Queueing Theory 1. Two approaches to network design 1- “Build first, worry later” approach - More ad hoc, less systematic.
Binomial Distributions Chapter 5.3 – Probability Distributions and Predictions Mathematics of Data Management (Nelson) MDM 4U Authors: Gary Greer (with.
Random Variables r Random variables define a real valued function over a sample space. r The value of a random variable is determined by the outcome of.
Random Variables Lecture Lecturer : FATEN AL-HUSSAIN.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics Seventh Edition By Brase and Brase Prepared by: Lynn Smith.
Probability Review Georgios Varsamopoulos School of Computing and Informatics Arizona State University.
CS723 - Probability and Stochastic Processes. Lecture No. 09.
4. Overview of Probability Network Performance and Quality of Service.
Chapter Five The Binomial Probability Distribution and Related Topics
Random variables (r.v.) Random variable
Business Statistics Topic 4
Lecture on Markov Chain
ECE 358 Examples #1 Xuemin (Sherman) Shen Office: EIT 4155
Probability distributions
STATISTICAL MODELS.
Presentation transcript:

Probability Review CSE430 – Operating Systems

Overview of Lecture Basic probability review Important distributions Poison Process Markov Chains Queuing Systems

Basic Probability concepts

Basic Probability concepts and terms Basic concepts by example: dice rolling –(Intuitively) coin tossing and dice rolling are Stochastic Processes –The outcome of a dice rolling is an Event –The values of the outcomes can be expressed as a Random Variable, which assumes a new value with each event. –The likelihood of an event (or instance) of a random variable is expressed as a real number in [0,1]. Dice: Random variable instances or values: 1,2,3,4,5,6 Events: Dice=1, Dice=2, Dice=3, Dice=4, Dice=5, Dice=6 Pr{Dice=1}= Pr{Dice=2}= –The outcome of the dice is independent of any previous rolls (given that the constitution of the dice is not altered)

Conditional Probabilities The likelihood of an event can change if the knowledge and occurrence of another event exists. Notation: Usually we use conditional probabilities like this:

Conditional Probability Example Problem statement (Dice picking): –There are 3 identical sacks with colored dice. Sack A has 1 red and 4 green dice, sack B has 2 red and 3 green dice and sack C has 3 red and 2 green dice. We choose 1 sack randomly and pull a dice while blind-folded. What is the probability that we chose a red dice? Thinking: –If we pick sack A, there is 0.2 probability that we get a red dice –If we pick sack B, there is 0.4 probability that we get a red dice –If we pick sack C, there is 0.6 probability that we get a red dice –For each sack, there is probability that we choose that sack Result ( R stands for “picking red”):

Probability Distributions

Geometric Distribution Expresses the probability of number of trials needed to obtain the event A. –Example: what is the probability that we need k dice rolls in order to obtain a 6? Formula: (for the dice example, p= 1 / 6 )

Binomial Distribution Expresses the probability of some events occurring out of a larger set of events –Example: we roll the dice n times. What is the probability that we get k 6’s? Formula: (for the dice example, p= 1 / 6 )

Solve this Problem We roll a regular dice and we toss a coin as many times as the roll indicates. –What is the probability that we get no tails? –What is the probability that we get 3 heads? Using the same process, we are asked to get 6 tails in total. If we don’t get 6 tails with the first roll, we roll again and repeat as needed. What is the probability that we need more than 1 rolls to get 6 tails?

Continuous Distributions Continuous Distributions have: –Probability Density function –Distribution function:

Continuous Distributions Normal Distribution: Uniform Distribution: Exponential Distribution:

Poisson Process It expresses the number of events in a period of time given the rate of occurrence. Formula A Poisson process with parameter has expected value and variance. The time intervals between two events of a Poisson process have an exponential distribution (with mean 1/ ).

Poisson dist. example problem An interrupt service unit takes t o sec to service an interrupt before it can accept a new one. Interrupt arrivals follow a Poisson process with an average of interrupts/sec. What is the probability that an interrupt is lost? –An interrupt is lost if 2 or more interrupts arrive within a period of t o sec.

Markov Chains

The Markov Process Discrete time Markov Chain: is a process that changes states at discrete times (steps). Each change in the state is an event. The probability of the next state depends solely on the current state, and not on any of the past states: Pr{X n+1 =j|X o =i o, X 1 =i 1, …, X n =i n } = Pr{X n+1 =j| X n =i n }

Numeric Example No matter where you start, after a long period of time, the probability of being in a state will not depend on your initial state.

Example Problem A variable bit rate (VBR) audio stream follows a bursty traffic model described by the following two-state Markov chain: In the LOW state it has a bit rate of 50Kbps and in the HIGH it has a bit rate of 150Kbps. What is the average bit-rate of the stream? LOWHIGH

Example Problem (cont’d) We find the stationary probabilities Using the stationary probabilities we find the average bitrate:

Queuing Systems

Little’s Law Little’s Law: Average number of tasks in system = Average arrival rate x Average response time ArrivalsDepartures System

Queuing System Queue Server Queuing System What is the system performance? –average number of tasks in server –average number of tasks in queue –average turnaround time in whole system –average waiting time in the queue Arrival Process Service Process

Different Queuing Models M/M/1 M/M/m M/G/1 G/M/1 G/G/1

Results for M/M/1 Queue Average number in system = λ/(μ- λ) Average number in system = λ 2 /μ(μ- λ) Average waiting time in system = 1/(μ- λ) Average waiting time in system = λ/μ(μ- λ) Queue Server Queuing System Poisson Process (rate = λ) Poisson Process (rate = μ)

Additional Slides

Basic Probability Properties The sum of probabilities of all possible values of a random variable is exactly 1. –Pr{Coin=HEADS}+Pr{Coin=TAILS} = 1 The probability of the union of two events of the same variable is the sum of the separate probabilities of the events –Pr{ Dice=1  Dice=2 } = Pr{Dice=1}+Pr{Dice=2} = 1 / 3

Properties of two or more random variables The tossing of two or more coins (such that each does not touch any of the other(s) ) simulateously is called (statistically) independent processes (so are the related variables and events). The probability of the intersection of two or more independent events is the product of the separate probabilities: –Pr{ Coin1=HEADS  Coin2=HEADS } = Pr{ Coin1=HEADS}  Pr{Coin2=HEADS}

Moments and expected values mth moment: Expected value is the 1 st moment:  X =E[X] mth central moment: 2 nd central moment is called variance (Var[X],  X )

Geometric distribution example A wireless network protocol uses a stop-and-wait transmission policy. Each packet has a probability p E of being corrupted or lost. What is the probability that the protocol will need 3 transmissions to send a packet successfully? –Solution: 3 transmissions is 2 failures and 1 success, therefore: What is the average number of transmissions needed per packet?

Binomial Distribution Example Every packet has n bits. There is a probability p Β that a bit gets corrupted. What is the probability that a packet has exactly 1 corrupted bit? What is the probability that a packet is not corrupted? What is the probability that a packet is corrupted?

Transition Matrix Putting all the transition probabilities together, we get a transition probability matrix: –The sum of probabilities across each row has to be 1.

Stationary Probabilities We denote P n,n+1 as P (n). If for each step n the transition probability matrix does not change, then we denote all matrices P (n) as P. The transition probabilities after 2 steps are given by P  P=P 2 ; transition probabilities after 3 steps by P 3, etc. Usually, lim n  P n exists, and shows the probabilities of being in a state after a really long period of time. Stationary probabilities are independent of the initial state

Finding the stationary probabilities

Markov Random Walk Hitting probability (gambler’s ruin) u i =Pr{X T =0|X o =i} Mean hitting time (soujourn time) v i =E[T|X o =k]

Example Problem A mouse walks equally likely in the following maze Once it reaches room D, it finds food and stays there indefinitely. What is the probability that it reaches room D within 5 steps, starting in A? Is there a probability it will never reach room D? AD

Example Problem (cont’d)

Poisson Distribution Poisson Distribution is the limit of Binomial when n  and p  0, while the product np is constant. In such a case, assessing or using the probability of a specific event makes little sense, yet it makes sense to use the “rate” of occurrence (λ=np). –Example: if the average number of falling stars observed every night is λ then what is the probability that we observe k stars fall in a night? Formula:

Poisson Distribution Example In a bank branch, a rechargeable Bluetooth device sends a “ping” packet to a computer every time a customer enters the door. Customers arrive with Poisson distribution of customers per day. The Bluetooth device has a battery capacity of m Joules. Every packet takes n Joules, therefore the device can send u= m / n packets before it runs out of battery. Assuming that the device starts fully charged in the morning, what is the probability that it runs out of energy by the end of the day?

Markov Random Walk A Random Walk Is a subcase of Markov chains. The transition probability matrix looks like this: p 3 r q p 5 p q rr 1 q