Unformatted text preview: Probability and Stochastic
Processes Dr. Khawar Khurshid
School of Electrical Engineering & Computer Science
National University of Sciences & Technology (NUST) Copyright © Syed Ali Khayam 2009 Course Information Lecture Timings: Office Hours Monday: 7:30pm‐8:20pm Wednesday: 5:30‐7:20pm All queries can be communicated through email [email protected] The course will be managed through LMS www.lms.nust.edu.pk Copyright © Syed Ali Khayam 2008 2 Textbook Copyright © Syed Ali Khayam 2008 3 Course Outline Syllabus Introduction to Probability Theory Random Variables Limits and Inequalities Stochastic Processes Prediction and Estimation Markov Chain and Processes (time permitting) Copyright © Syed Ali Khayam 2008 4 Grading (subject to change) Final Exam: 45% Midterm Exam: 30% Quizzes: 15% Homework Assignments: 10% Lot’s of extra credit for extra effort Copyright © Syed Ali Khayam 2008 5 Policies Quizzes will be unannounced Exams will be closed book, but you will be allowed to bring an A4‐sized cheat sheet to the exam Late homework submissions will not be accepted Strong disciplinary action will be taken in case of plagiarism or cheating in exams, homework or quizzes Attendance: whatever are the rules and regulations of the institute. Copyright © Syed Ali Khayam 2008 6 What will we cover in this lecture? This lecture is intended to be an introduction to elementary probability theory We will cover: Random Experiments and Random Variables Axioms of Probability Mutual Exclusivity Conditional Probability Independence Law of Total Probability Bayes’ Theorem Copyright © Syed Ali Khayam 2008 7 Definition of Probability Probability: 1 : the quality or state of being possible 2 : something (as an event or circumstance) that is possible 3 : the ratio of the number of outcomes in an exhaustive set of equally likely outcomes that produce a given event to the total number of possible outcomes, the chance that a given event will occur Copyright © Syed Ali Khayam 2008 8 Definition of a Random Experiment A random experiment comprises of: A procedure An outcome Procedure
(e.g., flipping a coin) Outcome
(e.g., the value
observed [head, tail] after
flipping the coin) Copyright © Syed Ali Khayam 2008 Sample Space
(Set of All Possible
Outcomes) 9 Definition of a Random Experiment: Outcomes, Events and the Sample Space An outcome cannot be further decomposed into other outcomes {s1 = the value 1}, …, {s6 = the value 6} An event is a set of outcomes that are of interest to us A = {s: such that s is an even number} The set of all possible outcomes, S, is called the sample space S = {s1, s2, s3, s4, s5, s6} Copyright © Syed Ali Khayam 2008 10 Definition of a Random Experiment: Outcomes, Events and the Sample Space s1 s5
s6
s4 s2 s3 S Copyright © Syed Ali Khayam 2008 11 Definition of a Random Experiment: Outcomes, Events and the Sample Space Example of a Random Experiment: Experiment: Roll a fair dice once and record the number of dots on the top face S = {1, 2, 3, 4, 5, 6} A = “the outcome is even” = {2, 4, 6} B = “the outcome is greater than 4” = {5, 6} Copyright © Syed Ali Khayam 2008 12 Axioms of Probability Probability of any event A is non‐negative: Pr{A} ≥ 0 The probability that an outcome belongs to the sample space is 1: Pr{S} = 1 The probability of the union of mutually exclusive events is equal to the sum of their probabilities: If A1 ∩ A2=Ø, => Pr{A1 U A2} = Pr{A1} + Pr{A2} Copyright © Syed Ali Khayam 2008 13 Mutual Exclusivity For mutually exclusive events A1, A2 … AN, we have: A1 s1 s5
s6 A2 s2 s4 Find Pr{A1 U A2}
and Pr{A1}+Pr{A2}
in the fair dice
example s3 S Copyright © Syed Ali Khayam 2008 14 Mutual Exclusivity In general, we have: Pr{A1 U A2} = ?? s5 s1 s6
s4 s2 s3 S
Copyright © Syed Ali Khayam 2008 15 Mutual Exclusivity In general, we have: Pr{A1 U A2} = Pr{A1} + Pr{A2} – Pr{A1 ∩ A2} s5 s1 s6
s4 s2 s3 S
Copyright © Syed Ali Khayam 2008 16 Conditional Probability Given that event B has already occurred, what is the probability that event A will occur? Given that event B has already occurred, reduces the sample space of A s5 s1 s2 Event B has
already occurred s4 S Copyright © Syed Ali Khayam 2008 s3 s6 => s2, s4, s3
cannot occur s5 s1 s2 S s4 s6 s3 17 Conditional Probability Given that event B has already occurred, we define a new conditional sample space that only contains B’s outcomes The new event space for A is the intersection of A and B: Event space ‐> EAB = A ∩ B s5 s1 s2 s4 S s6 Event B has
already
occurred s3 What’s missing here?
Copyright © Syed Ali Khayam 2008 s5 s1 s4 s2 S s6 s3 SB = {s1, s5, s6}
EAB= A ∩ B = {s6}
18 Conditional Probability The probability of an event A in the conditional sample space is: Pr{AB} = Pr{A∩B}/Pr{B} = Pr{s6}/Pr{B} = (1/6)/(3/6) = 1/3 s5 s1 s2 s4 S s3 s5 s1
s6 Event B has
already
occurred s4 s2 S s6 s3 SB = {s1, s5, s6}
Copyright © Syed Ali Khayam 2008 19 Independence Two events are independent if they do not provide any information about each other P(AB) = P(A) In other words, the fact that B has already happened does not affect the probability of A’s outcomes Copyright © Syed Ali Khayam 2008 20 Independence: Example Are events A and C independent? Assume that all outcomes are equally likely s2
s6 s4 s1 s3 s5 S Copyright © Syed Ali Khayam 2008 21 Independence: Example Are events A and C independent? s2
s6 s4 s1 s3 s5 S
Copyright © Syed Ali Khayam 2008 22 Independence: Example Are events A and C independent? Yes: Pr{A ∩ C} = Pr{s5} = 1/6 Pr{A}Pr{C} = (3/6)x(2/6) = 1/6 s2
s6 s4 s1 s3 s5 S
Copyright © Syed Ali Khayam 2008 23 Independence: Example Are events A and B independent? Assume that all outcomes are equally likely s2
s6 s4 s1 s3 s5 S Copyright © Syed Ali Khayam 2008 24 Independence: Example Are events A and B independent? NO: Pr{A ∩ B} = Pr{s5} = 1/6 Pr{A}Pr{B} = (3/6)x(3/6) = 1/4 s2
s6 s4 s1 s3 s5 S
Copyright © Syed Ali Khayam 2008 25 Mutual Exclusivity and Independence Experiment: Roll a fair dice twice and record the dots on the top face: S = { (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2), (2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), (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) Copyright © Syed Ali Khayam 2008 } 26 Mutual Exclusivity and Independence Define three events: A1 = “first roll gives an odd number” A2 = “second roll gives an odd number” C = “the sum of the two rolls is odd” Find the probability of C using probability of A1 and A2 Copyright © Syed Ali Khayam 2008 27 Mutual Exclusivity and Independence A2 S = { (1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2), (2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,3), (3,4), (3,5), (3,6), A1 (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) } Copyright © Syed Ali Khayam 2008 28 Mutual Exclusivity and Independence Copyright © Syed Ali Khayam 2008 29 Mutual Exclusivity and Independence Copyright © Syed Ali Khayam 2008 30 Recap 1. 2. 3. Outcomes, events and sample space: For mutually exclusive events A1, A2,…, AN, we have: In general, we have: Copyright © Syed Ali Khayam 2008 31 Recap 4. 5. 6. Conditional probability reduces the sample space: Two events A and B are independent only if For independent events: Copyright © Syed Ali Khayam 2008 32 Four “Rules of Thumb” 1. Whenever you see two events which have an OR relationship (i.e., event A or event B), their joint event will be their union, {A U B} Example: On a binary channel, find the probability of error? An error occurs when A: “a 0 is transmitted and a 1 is received” OR B: “a 1 is transmitted and a 0 is received” Thus probability of error is: Pr{A U B} Pr{R0T0}
R0 T0 T1 Copyright © Syed Ali Khayam 2008 Pr{R1T1} R1 33 Four “Rules of Thumb” 2. Whenever you see two events which have an AND relationship (i.e., both event A and event B), their joint event will be their intersection, {A ∩ B} Example: On a binary channel, find the probability that a 0 is transmitted and a 1 is received? An error occurs when A: “a 0 is transmitted” AND B: “a 1 is received” Thus probability of above event is: Pr{A ∩ B} Pr{R0T0}
R0 T0 T1 Copyright © Syed Ali Khayam 2008 Pr{R1T1} R1 34 Four “Rules of Thumb” 3. Whenever you see two events which have an OR relationship (i.e., A U B), check if they are mutually exclusive. If so, set Pr{A U B} = Pr{A} + Pr{B} Example: On a binary channel, find the probability of error? An error occurs when A: “a 0 is transmitted and a 1 is received” OR B: “a 1 is transmitted and a 0 is received” Thus probability of error is: Pr{error} = Pr{A U B} Are A and B are mutually exclusive? Pr{R0T0}
R0 T0 T1 Copyright © Syed Ali Khayam 2008 Pr{R1T1} R1 35 Four “Rules of Thumb” 3. Whenever you see two events which have an OR relationship (i.e., A U B), check if they are mutually exclusive. If so, set Pr{A U B} = Pr{A} + Pr{B} Example: On a binary channel, find the probability of error? An error occurs when A: “a 0 is transmitted and a 1 is received” OR B: “a 1 is transmitted and a 0 is received” Thus probability of error is: Pr{error} = Pr{A U B} YES! A and B are mutually exclusive; transmission of a 0 precludes the possibility of transmission of a 1, and vice versa. Therefore, we can set Pr{error} = Pr{A U B} = Pr{A} + Pr{B} Pr{R0T0} R0 T0 T1 Copyright © Syed Ali Khayam 2008 Pr{R1T1} R1 36 Four “Rules of Thumb” 4. Whenever you see two events which have an AND relationship (i.e., A ∩ B), check if they are independent. If so, set Pr{A ∩ B} = Pr{A}Pr{B} Example: On a binary channel, find the probability that a 0 is transmitted and a 1 is received? A: “a 0 is transmitted” AND B: “a 1 is received” Probability of above event is: Pr{A ∩ B} Are A and B independent? Pr{R0T0}
R0 T0 T1 Copyright © Syed Ali Khayam 2008 Pr{R1T1} R1 37 Four “Rules of Thumb” 4. Whenever you see two events which have an AND relationship (i.e., A ∩ B), check if they are independent. If so, set Pr{A ∩ B} = Pr{A}Pr{B} Example: On a binary channel, find the probability that a 0 is transmitted and a 1 is received? A: “a 0 is transmitted” AND B: “a 1 is received” Probability of above event is: Pr{A ∩ B} Are A and B independent? YES. Pr{R0T0}
R0 T0 T1 Copyright © Syed Ali Khayam 2008 Pr{R1T1} R1 38 Total Probability B1, B2,…, BN form a partition of a sample space we have: S = B1 U B2 U … U BN Bi ∩ Bj = Ø, i ≠ j B2 B1 s1
B3 B4 s2 s5 s4 s6 s3 Copyright © Syed Ali Khayam 2008 39 Total Probability If B1, B2,…, BN form a mutually exclusive partition: What does this imply? B2
s1
B1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3
40 Total Probability If B1, B2,…, BN form a mutually exclusive partition: What does this imply? B1 ∩ B2 ∩ ….. ∩ Bn = Ø and B1 U B2 U ….. U Bn = S B2
s1 B1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3
41 Total Probability If B1, B2,…, BN form a mutually exclusive partition: What does this imply? B1 ∩ B2 ∩ ….. ∩ Bn = Ø and B1 U B2 U ….. U Bn = S How to express A in term of Bi? B1 B2
s1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3
42 Total Probability If B1, B2,…, BN form a mutually exclusive partition: What does this imply? B1 ∩ B2 ∩ ….. ∩ Bn = Ø and B1 U B2 U ….. U Bn = S How to express A in term of Bi? A = (A ∩ B1) U (A ∩ B2) U … U (A ∩ BN) B1 B2
s1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3
43 Total Probability If B1, B2,…, BN form a mutually exclusive partition: What does this imply? B1 ∩ B2 ∩ ….. ∩ Bn = Ø and B1 U B2 U ….. U Bn = S How to express A in term of Bi? A = (A ∩ B1) U (A ∩ B2) U … U (A ∩ BN) What is the probability of A? B1 B2
s1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3
44 Total Probability If B1, B2,…, BN form a mutually exclusive partition: What does this imply? B1 ∩ B2 ∩ ….. ∩ Bn = Ø and B1 U B2 U ….. U Bn = S How to express A in term of Bi? A = (A ∩ B1) U (A ∩ B2) U … U (A ∩ BN) What is the probability of A? Pr{A} = Pr{A ∩ B1} + Pr{A ∩ B2} + … + Pr{A ∩ BN} B2 B1 s1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3
45 Total Probability Using the definition of conditional probability: Pr{A Bi} = Pr{A ∩ Bi} / Pr{Bi} => Pr{A ∩ Bi} = Pr{A Bi} Pr{Bi} B2
s1
B1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3 46 The Law of Total Probability The Law of Total Probability states: If B1, B2,…, BN form a partition then for any event A Pr{A} = Pr{AB1} Pr{B1} + Pr{AB2} Pr{B2} + … + Pr{ABN} Pr{BN} B2
s1
B1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3 47 Bayes’ Theorem Based on the Law of Total Probability, Thomas Bayes decided to look at the probability of a partition given a particular event, the so‐called inverse probability. B2
s1
B1 A
B3 Copyright © Syed Ali Khayam 2008 s5 A
B4 s2 s4 s6 s3 48 Bayes’ Theorem Based on the Law of Total Probability, Thomas Bayes decided to look at the probability of a partition given a particular event Pr{BiA} = Pr{A ∩ Bi} / Pr{A} => Pr{A ∩ Bi} = Pr{ABi} Pr{Bi} => Pr{BiA} = Pr{ABi} Pr{Bi} / Pr{A} B2 s1
B1 A s5 A
B4 s2 s4 s6 B3
s3 Copyright © Syed Ali Khayam 2008 49 Bayes’ Theorem Pr{BiA} = Pr{ABi} Pr{Bi} / Pr{A} From the Law of Total Probability, we have: Pr{A} = Pr{AB1} Pr{B1} + Pr{AB2} Pr{B2} + … + Pr{ABN} Pr{BN} Bayes’ Rule
B2
s1
B1 A s5 A
B4 s2 s4 s6 B3
s3 Copyright © Syed Ali Khayam 2008 50 ...
View
Full Document
 Spring '08
 STAFF
 Zürich Hauptbahnhof, Syed Ali Khayam

Click to edit the document details