Lecture 10 – Introduction to Probability

Slides:



Advertisements
Similar presentations
CS433: Modeling and Simulation
Advertisements

Discrete Uniform Distribution
2 Discrete Random Variable. Independence (module 1) A and B are independent iff the knowledge that B has occurred does not change the probability that.
Lecture (7) Random Variables and Distribution Functions.
Chapter 4 Probability and Probability Distributions
Lecture 10 – Introduction to Probability Topics Events, sample space, random variables Examples Probability distribution function Conditional probabilities.
1 Introduction to Stochastic Models GSLM Outline  course outline course outline  Chapter 1 of the textbook.
Lec 18 Nov 12 Probability – definitions and simulation.
1 Discrete Structures & Algorithms Discrete Probability.
Introduction to Probability and Statistics
Probability Distributions
TDC 369 / TDC 432 April 2, 2003 Greg Brewster. Topics Math Review Probability –Distributions –Random Variables –Expected Values.
Rensselaer Polytechnic Institute © Shivkumar Kalvanaraman & © Biplab Sikdar1 ECSE-4730: Computer Communication Networks (CCN) Network Layer Performance.
Probability Review ECS 152A Acknowledgement: slides from S. Kalyanaraman & B.Sikdar.
Great Theoretical Ideas in Computer Science.
Probability Theory: Counting in Terms of Proportions Great Theoretical Ideas In Computer Science Steven Rudich, Anupam GuptaCS Spring 2004 Lecture.
Chapter 21 Random Variables Discrete: Bernoulli, Binomial, Geometric, Poisson Continuous: Uniform, Exponential, Gamma, Normal Expectation & Variance, Joint.
Review of Probability Theory. © Tallal Elshabrawy 2 Review of Probability Theory Experiments, Sample Spaces and Events Axioms of Probability Conditional.
CMPE 252A: Computer Networks Review Set:
Lecture 10 – Introduction to Probability Topics Events, sample space, random variables Examples Probability distribution function Conditional probabilities.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 4 and 5 Probability and Discrete Random Variables.
QA in Finance/ Ch 3 Probability in Finance Probability.
Week 41 Continuous Probability Spaces Ω is not countable. Outcomes can be any real number or part of an interval of R, e.g. heights, weights and lifetimes.
CPSC 531: Probability Review1 CPSC 531:Probability & Statistics: Review Instructor: Anirban Mahanti Office: ICT Class.
 Review Homework Chapter 6: 1, 2, 3, 4, 13 Chapter 7 - 2, 5, 11  Probability  Control charts for attributes  Week 13 Assignment Read Chapter 10: “Reliability”
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}.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Review of Exam I Sections Jiaping Wang Department of Mathematical Science 02/18/2013, Monday.
Prob1 INTRODUCTION to PROBABILITY. prob2 BASIC CONCEPTS of PROBABILITY  Experiment  Outcome  Sample Space Discrete Continuous  Event.
Week 21 Conditional Probability Idea – have performed a chance experiment but don’t know the outcome (ω), but have some partial information (event A) about.
Computing Fundamentals 2 Lecture 6 Probability Lecturer: Patrick Browne
STA347 - week 31 Random Variables Example: We roll a fair die 6 times. Suppose we are interested in the number of 5’s in the 6 rolls. Let X = number of.
Chapter 01 Probability and Stochastic Processes References: Wolff, Stochastic Modeling and the Theory of Queues, Chapter 1 Altiok, Performance Analysis.
Stats Probability Theory Summary. The sample Space, S The sample space, S, for a random phenomena is the set of all possible outcomes.
Probability Review-1 Probability Review. Probability Review-2 Probability Theory Mathematical description of relationships or occurrences that cannot.
Sixth lecture Concepts of Probabilities. Random Experiment Can be repeated (theoretically) an infinite number of times Has a well-defined set of possible.
Natural Language Processing Giuseppe Attardi Introduction to Probability IP notice: some slides from: Dan Jurafsky, Jim Martin, Sandiway Fong, Dan Klein.
Conditional Probability Mass Function. Introduction P[A|B] is the probability of an event A, giving that we know that some other event B has occurred.
Random Variables Example:
Discrete Random Variables. Introduction In previous lectures we established a foundation of the probability theory; we applied the probability theory.
Lecture 7 Dustin Lueker.  Experiment ◦ Any activity from which an outcome, measurement, or other such result is obtained  Random (or Chance) Experiment.
Probability. Probability Probability is fundamental to scientific inference Probability is fundamental to scientific inference Deterministic vs. Probabilistic.
Great Theoretical Ideas in Computer Science for Some.
Chapter 2: Probability. Section 2.1: Basic Ideas Definition: An experiment is a process that results in an outcome that cannot be predicted in advance.
Great Theoretical Ideas in Computer Science.
ENGG 2040C: Probability Models and Applications Andrej Bogdanov Spring Continuous Random Variables.
3.1 Discrete Random Variables Present the analysis of several random experiments Discuss several discrete random variables that frequently arise in applications.
3. Random Variables (Fig.3.1)
ONE DIMENSIONAL RANDOM VARIABLES
Introduction to Probability Distributions
Random variables (r.v.) Random variable
Exponential Distribution & Poisson Process
Natural Language Processing
Introduction to Discrete Mathematics
What is Probability? Quantification of uncertainty.
Simulation Statistics
5. Continuous Random Variables
Business Statistics Topic 4
Appendix A: Probability Theory
Basic Probability aft A RAJASEKHAR YADAV.
Natural Language Processing
Discrete Probability Chapter 7 With Question/Answer Animations
Multinomial Distribution
Introduction to Probability
STA 291 Spring 2008 Lecture 7 Dustin Lueker.
Great Theoretical Ideas In Computer Science
Probability distributions
Some Discrete Probability Distributions
Discrete Random Variables: Basics
Discrete Random Variables: Basics
Discrete Random Variables: Basics
Presentation transcript:

Lecture 10 – Introduction to Probability Topics Events, sample space, random variables Examples Probability distribution function Conditional probabilities Exponential distribution Poisson distribution 8/14/04 J. Bard and J. W. Barnes Operations Research Models and Methods Copyright 2004 - All rights reserved

The Monte Hall Problem There is $1,000,000 behind one door & $0.00 behind the other two. #1 #2 #3 You “reserve” a door (say #1) but it remains closed. Then, Monte opens one of the other two doors (say #2). The door Monte opens will be empty! (Monte wants to keep the money.)

Stay with the original door we chose? What’s the best strategy? Stay with the original door we chose? Switch to the other unopened door? We are interested in probability as it relates to helping us make good or optimal decisions.

Another Example Coins & Drawers One drawer has 2 gold coins One drawer has 1 gold & 1 silver coins One drawer has 2 silver coins You select a drawer and randomly select one coin It turns out that your coin is gold What is the probability that the other coin is gold ?

Probability Overview The sample space, S = set of all possible outcomes of an experiment Events are subsets of the sample space. An event occurs if any of its elements occur when the experiment is run. Two events A & B are mutually exclusive if their intersection is null. Elements of S are called realizations outcomes, sample points, or scenarios The choice of the sample space depends on the question that you are trying to answer.

Roll Two Dice Two possible sample spaces are: S2 = { 2, 3, 4, . . . , 11, 12 } (sum of the two values) Examples of Events: A1 = “the sum of the face values is 3” Under S1 : A1 = { (1,2), (2,1) } ; Under S2 : A1 = { 3 } A2 = “one die has value 3 & the other value 1” Under S1 : A2 = { (1,3), (3,1) } ; Under S2 : not an event

Probability Intuitive: The proportion of time that an event occurs when the same experiment is repeated Mathematical: A probability measure P is defined on the set of all events satisfying the following: P(A) ³ 0 " A  S P(S) = P(A1 È A2 È · · · ) = 1 (3) Mutually exclusive events Ai imply that P(A1 È A2 È · · · ) = P(A1) + P(A2 ) + · · · (4) P(A) = 1 - P(A) where A = complement of A (5) P(AÈB) = P(A) + P(B) - P(AB) (6) If A & B are independent, then P(AB) = P(A)P(B) _

(6) The conditional probability of event A given B is P(A|B) = P(AB) P(B) (7) If A & B are independent events then In this case B gives “no information” as to whether A will occur P(A | B) = P(A B) P(B) = P(A)P(B) = P(A).

Probability Calculations Example: roll a balanced dice Sample space : S = { (H), (T) } Event H: head appears (H) S = H  T and H)  T =  Event T: tail appears (T) Intuitively: P(H) = P(T) = ½. How to prove it mathematically? Proof: 1 = P(S) = P ( H  T ) According to (2) According to (3) = P (H) + P (T) Equal chance P (H) = P (T) = 1/2

Basic Conditional Probabilities Example: You roll 2 dice and were told that the sum is 7. What is probability that the first die is 2? Define Event B: the sum of the two dice is 7 Event A: the first dice is 2 The conditional probability of event A given B is P(A|B) = P(AB) P(B) B = { (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) } and A  B = { (2,5) } P(A | B) = P (A  B ) P(B) 1/36 6/36 = 1 6

Computing Conditional Probabilities You roll 2 dice and double your money if the sum is ³ 8 and lose if the sum is £ 7 However, the rolls occur in sequence and you do not get to observe the first roll. You are simply told either “the value is ³ 4” or “the value is £ 3”. After being told this you get to place your bet. A = event that you win = { (2,6), (3,5), (3,6), (4,4), (4,5), (4,6), (5,3), (5,4), (5,5), (5,6), (6,2), (6,3), (6,4), (6,5), (6,6) } B = you are told “³ 4” after the first roll = { (4,1), (4,2), (4,3), (4,4), (4,5), (4,6), (5,1), (5,2), (5,3), (5,4), (5,5), (5,6), (6,1),(6,2), (6,3), (6,4), (6,5), (6,6) }

36 _ The goal is to calculate: win = P(A|B) and lose = P(A|B). P(A I P(B) A  B = { (4,4), (4,5), (4,6), (5,3), (5,4), (5,5), (5,6), (6,2), (6,3), (6,4), (6,5), (6,6) } Each realization (i,j ) is equally likely P(A|B) = |AB| |B| = 12/36 18/36 = 2/3. 36 In a similar manner, we can show that _ P(A | B)= 6/18 = 1/3 However, P(A|B) = 1 – P(A|B).

More Conditional Probability Calculations P(A  B) P(A|B) = P(B  A) and P(B|A) = P(B) P(A) P(A  B) = P(A|B)P(B) and P(B  A) = P(B|A)P(A) This leads to Bayes’ Theorem P(A|B)P(B) = P(B|A)P(A) or P(A|B) = P(B|A)P(A) P(B)

Example: Coins & Drawers 1 2 3 Example: Coins & Drawers Drawer 1 has 2 gold coins Drawer 2 has 1 gold & 1 silver coin Drawer 3 has 2 silver coins D1 = event that we pick drawer 1 G1 = event that the first coin we select is gold P(D1|G1) = probability that both coins are gold given that the first is gold

Coin & Drawer Computations P(Di) = 1/3, i = 1, 2, 3 P(G1) = (1)(1/3) + (1/2)(1/3) + (0)(1/3) P(D1|G1) = P(G1 | D1) P(D1) P(G1) = (1)(1/3) (1)(1/3) + (1/2)(1/3) + (0)(1/3) = 2/3

Example: The Monte Hall Problem #1 #2 #3 There is $1,000,000 behind one of the doors & $0.00 behind the others. Say you pick door #1 and then Monte opens one of the other two doors. If you don’t switch, P(Win) = 1/3. Optimal Strategy: Switch to the door that remains closed.

Events: D1 = you end up choosing door 1 D2 = you end up choosing door 2 D3 = you end up choosing door 3 L = prize is behind door 1 M = prize is behind door 2 R = prize is behind door 3 Event you win: W = (D1Ç L) È (D2 Ç M) È (D3 Ç R) These are mutually exclusive so P(W) = P(D1Ç L) + P(D2 Ç M) + P(D3 Ç R) = P(D1|L) P(L) + P(D2|M) P(M) + P(D3|R) P(R) = (0) (1/3)+ (1) (1/3) + (1) (1/3) = 2/3

Random Variables Sample space: (1,1), …(6,6) R.V. is a real-valued functions defined on the sample space Example: toss two dice, Sample space: (1,1), …(6,6) Quantity of interest: sum of the two dices, 2, 3, … 12 RV: function that maps sample space to the quantity of interest Define : X  the RV, which is defined as the sum of 2 fair dice P{X = 2} = P{ (1,1) } = 1/36 P(X = 3} = P{ (1,2), (2,1)} = 2/36 P{X = 4} = P{ (1,3), (2,2), (3,1) } = 3/36 ... P{X = 7} = P{ (1,6), (2,5), (3,4), (4,3), (5,2), (6,1) } = 6/36 … P{X = 12} = P{ (6,6) } = 1/36

Classification of Random Variables Discrete random variables: take finite or a countable num of possible values Probability mass function (pmf): Probability of an outcome, p(a) = P{X = a} Examples: Bernoulli , Binomial, Geometric and Poisson Continuous random variables: takes uncountable number of possible values Probability density function (pdf): f(a) = P{X  a } = ò- f(x)dx Examples: Uniform, Exponential, Gamma, Normal a

Expected Value Continuous RV, X: E[X] = ò x f(x)dx - ¥ Discrete random varible, X: E[X] = xS x p(x )

The Exponential Distribution This is the most frequently used distribution for modeling interarrival and service times in queueing systems. In many applications, it is regarded as doing a good job of balancing realism and mathematical tractability. Time between customer arrivals at ATM Time until a machine in work center breaks Time between calls to reservation system

Exponential Random Variable, T Let  be parameter of the exponential distribution. f(t ) = { e –t, t ³ 0 0, t < 0 probability density function (pdf) f Pr{T £ t) = ò t e –u du = 1 – e –t (t ³ 0) Expected value of T: E[T] = ò uf(u)du = ò ue –u du = 1/ ¥ ¥ Variance of T: Var[T] = E[T – 1/]2 = ò (u – 1/)2e –u du = 1/2

Memoryless Property of an Exponential Random Variable Pr{T  a + b | T  b} = Pr{T  a} a, b  0 This says that if we’ve already waited b units of time and the event has not occurred (e.g., the next customer hasn’t arrived) then the probability distribution governing the remaining time until its occurrence is the same as it would be if the system were restarted. That is, the process “forgets” that the event has not yet occurred. This is often a good assumption when the time of the next arrival is not “influenced” by the last arrival.

= e –(a+b) = e –ae –b = e –a Proof: P(A I B) = P(AB) P(B) P(T > a + b | T > b) = P(T > b) = P(T > a + b and T > b) P(T > a + b) = e –(a+b) = e –ae –b = e –a e –b e –b = P(T > a)

Using the Exponential Distribution Calls arrive at an emergency hotline switchboard at a rate of 3 per hour. It is now 8 AM. (a) What is the probability that the first call arrives after 8:30 AM? (b) What is the probability that the first call arrives between 8:15 and 8:45 AM? (c) Given that no calls have arrived by 8:30 AM what is the probability that one or more calls arrive by 9 AM?

Solutions ¬ memoryless property Let T = interarrival time random variable. Assume T is exponentially distributed with  = 3, so F(t) = P(T £ t) = 1 – e –3t and f(t) = 3e –3t (a) P(T > ½) = e –3(1/2) = 0.223 (b) P(¼ < T < ¾) = 3e -3u du = F(¾) – F(¼) ò 1/4 3/4 = [ 1 - e -9/4 ] [ 1 -3/4 = e = 0.367 (c) P(T £ 1 | T ³ ½) = 1 - P(T > 1 | T ³ ½) = 1 - P(T > ½) ¬ memoryless property = 1 - e –3(1/2) = 0.777

Relationship between Exponential Distribution and the Poisson “Counting” Distribution The exponential distribution is a continuous (time) distribution that, in our setting, models the waiting time until the next event (e,g., next customer arrival). The Poisson distribution is a discrete (counting) distribution which governs the total number of events (e.g., arrivals) in the time interval (0, t ). FACT: If inter-event times are independent exponential rv’s with rate  then the number of events that occur in the interval (0, t ) is governed by a Poisson distribution with rate . And vice-versa.

Poisson Distribution Xt = # of events (e.g., arrivals) in the interval (0, t ) is governed by the following probability mass function Pr{ Xt = n } = (t)ne –t/n! , n = 0, 1, . . . E[ Xt ] =  t arrival rate length of interval Note: Pr{ Xt = 0 } = Pr{ T > t } = e –t

Example (revisited) Calls arrive at an emergency hotline switchboard once every 20 minutes on average. It is now 8:00 AM. Use the Poisson distribution to answer the following questions. What is the probability that the first call arrives after 8:30 AM? Solution: Xt ~ Poisson(3t); X½ ~ Poisson(3/2), where = # of arrivals in first ½ hour. P(X½ = 0) = (3/2)0e –3/2 = e –3/2 = 0.223

(b) What is the probability that the first call arrives between 8:15 AM and 8:45 AM. Solution: Let Y1 = #of arrivals in first 15 minutes Y2 = # of arrivals between 8:15 and 8:45 AM We must determine: Pr{ Y1 = 0 and Y2 ³ 1 } However, Y1 ~ Poison(3/4), Y2 ~ Poisson(3/2) and the events {Y1 = 0} and {Y2 ³ 1} are independent. P(Y1 = 0 and Y2 ³ 1) = P(Y1 = 0)P(Y2 ³ 1) = P(Y1 = 0)[1 - P(Y2 = 0)] = (3/4) 0! [1 - (3/2) e –3/4 e –3/2 ] = e –3/4 - e –9/4 = 0.367

(c) Given that no calls have arrived by 8:30 AM what’s the probability that one or more calls arrive by 9:00 AM? Solution: Pr{ Y2 ³ 1 | Y1 = 0 }, where Y1 = #of arrivals between 8:00 and 8:30 AM Y2 = # of arrivals between 8:30 and 9:00 AM and Y1 ~ Poisson(3/2), Y2 ~ Poisson(3/2) Y1 and Y2 are independent because they are defined on non-overlapping time intervals. = 1 - (3/2) 0. l e –3/2 = 1 - e –3/2 = 0.777 P(Y2 ³ 1 | Y1 = 0 ) = P(Y2 ³ 1) = 1 - P(Y2 = 0)

Multiple Arrival Streams If customers of type 1 arrive according to a Poisson process with rate 1 and customers of type 2 arrive according to an independent Poisson process with rate 2 then customers arrive, regardless of type, according to a Poisson process with rate  = 1 + 2. Generalization: Let Ti ~ exp(i), i = 1,…,n and define T = min{ T1,…,Tn }. Then T ~ exp(), where  = 1 + 2 + · · · + n Restated: The minimum of several independent exponential rv’s is an exponential random variable with a rate that is the sum of the individual rates.

What you Should Know about Probability How to identify events and the corresponding sample space How to work with conditional probabilities How to work with probability functions (e.g., normal, exponential, uniform, discrete) How to work with the Poisson distribution