Lecture 2 31 Jan Logistics: see piazza site for bootcamps, ps0, bashprob

Similar documents
Lecture 3 : Probability II. Jonathan Marchini

Set Notation and Axioms of Probability NOT NOT X = X = X'' = X

Math for Liberal Studies

Do in calculator, too.

10.1. Randomness and Probability. Investigation: Flip a Coin EXAMPLE A CONDENSED LESSON

12.1. Randomness and Probability

Chapter 1 Problem Solving: Strategies and Principles

Discrete Probability Distributions

Discrete Probability Distributions

Finding extremal voting games via integer linear programming

discrete probability distributions

9/2/2009 Comp /Comp Fall

Lecture 4: DNA Restriction Mapping

8/29/13 Comp 555 Fall

Lecture 4: DNA Restriction Mapping

Lecture Notes 1 Basic Probability. Elements of Probability. Conditional probability. Sequential Calculation of Probability

Econ 325: Introduction to Empirical Economics

PROBABILITY THEORY. Prof. S. J. Soni. Assistant Professor Computer Engg. Department SPCE, Visnagar

2. Counting and Probability

arxiv: v1 [math.ra] 11 Aug 2010

Introduction to Probability 2017/18 Supplementary Problems

Stat 198 for 134 Instructor: Mike Leong

4/17/2012. NE ( ) # of ways an event can happen NS ( ) # of events in the sample space

STAT 430/510 Probability

Mathematics for large scale tensor computations

Fundamentals of Probability CE 311S

STA Module 4 Probability Concepts. Rev.F08 1

CMPSCI 240: Reasoning about Uncertainty

Chap 1: Experiments, Models, and Probabilities. Random Processes. Chap 1 : Experiments, Models, and Probabilities

1 INFO Sep 05

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 16. Random Variables: Distribution and Expectation

Mutually Exclusive Events

MATH MW Elementary Probability Course Notes Part I: Models and Counting

Notes 10.1 Probability

Lecture Lecture 5

MP203 Statistical and Thermal Physics. Problem set 7 - Solutions

Statistical Inference

The probability of an event is viewed as a numerical measure of the chance that the event will occur.

Lecture 4: Probability and Discrete Random Variables

HW MATH425/525 Lecture Notes 1

HW1 Solutions. October 5, (20 pts.) Random variables, sample space and events Consider the random experiment of ipping a coin 4 times.

Math 493 Final Exam December 01

CS 484 Data Mining. Association Rule Mining 2

Lecture 1. ABC of Probability

ELEG 3143 Probability & Stochastic Process Ch. 1 Experiments, Models, and Probabilities

CIVL Why are we studying probability and statistics? Learning Objectives. Basic Laws and Axioms of Probability

Chapter 14. From Randomness to Probability. Copyright 2012, 2008, 2005 Pearson Education, Inc.

Binomial Probability. Permutations and Combinations. Review. History Note. Discuss Quizzes/Answer Questions. 9.0 Lesson Plan

Probabilistic Systems Analysis Spring 2018 Lecture 6. Random Variables: Probability Mass Function and Expectation

Monty Hall Puzzle. Draw a tree diagram of possible choices (a possibility tree ) One for each strategy switch or no-switch

Physics 1140 Lecture 6: Gaussian Distributions

Name: Exam 2 Solutions. March 13, 2017

12 1 = = 1

Topic -2. Probability. Larson & Farber, Elementary Statistics: Picturing the World, 3e 1

LECTURE 1. 1 Introduction. 1.1 Sample spaces and events

Lecture 3: Probability

Probability- describes the pattern of chance outcomes

Outline Conditional Probability The Law of Total Probability and Bayes Theorem Independent Events. Week 4 Classical Probability, Part II

secretsaremadetobefoundoutwithtime UGETGVUCTGOCFGVQDGHQWPFQWVYKVJVKOG Breaking the Code

PROBABILITY VITTORIA SILVESTRI

ORF 245 Fundamentals of Engineering Statistics. Midterm Exam 1

Probability Theory Review

Probability Basics Review

PROBABILITY. Contents Preface 1 1. Introduction 2 2. Combinatorial analysis 5 3. Stirling s formula 8. Preface

STAT Chapter 3: Probability

CS70: Jean Walrand: Lecture 16.

MAT2377. Ali Karimnezhad. Version September 9, Ali Karimnezhad

CS 441 Discrete Mathematics for CS Lecture 19. Probabilities. CS 441 Discrete mathematics for CS. Probabilities

Chapter 2 Class Notes

University of California, Berkeley, Statistics 134: Concepts of Probability. Michael Lugo, Spring Exam 1

Lecture 1. Chapter 1. (Part I) Material Covered in This Lecture: Chapter 1, Chapter 2 ( ). 1. What is Statistics?

4.2 Probability Models

Compound Events. The event E = E c (the complement of E) is the event consisting of those outcomes which are not in E.

(6, 1), (5, 2), (4, 3), (3, 4), (2, 5), (1, 6)

Topic 5 Basics of Probability

Combinatorial Analysis

Lecture 9b: Events, Conditional Probability, Independence, Bayes' Rule Lecturer: Lale Özkahya

Problems from Probability and Statistical Inference (9th ed.) by Hogg, Tanis and Zimmerman.

Lecture 1 Introduction to Probability and Set Theory Text: A Course in Probability by Weiss

Introduction to Probability

Chapter 2: Probability Part 1

Relative Risks (RR) and Odds Ratios (OR) 20

EE 178 Lecture Notes 0 Course Introduction. About EE178. About Probability. Course Goals. Course Topics. Lecture Notes EE 178

Essential Statistics Chapter 4

Stochastic processes and stopping time Exercises

Probability the chance that an uncertain event will occur (always between 0 and 1)

Chapter 2 PROBABILITY SAMPLE SPACE

Introduction to Probability. Ariel Yadin. Lecture 1. We begin with an example [this is known as Bertrand s paradox]. *** Nov.

I - Probability. What is Probability? the chance of an event occuring. 1classical probability. 2empirical probability. 3subjective probability

Discrete Probability

Discrete Random Variables. David Gerard Many slides borrowed from Linda Collins

Lecture 8: Probability

What is Probability? Probability. Sample Spaces and Events. Simple Event

Venn Diagrams; Probability Laws. Notes. Set Operations and Relations. Venn Diagram 2.1. Venn Diagrams; Probability Laws. Notes

Probability Theory and Applications

Dragan Mašulović. The Discrete Charm of Discrete Mathematics

RANDOM WALKS AND THE PROBABILITY OF RETURNING HOME

Chapter 6: Probability The Study of Randomness

CS4705. Probability Review and Naïve Bayes. Slides from Dragomir Radev

Lecture 1 : The Mathematical Theory of Probability

Transcription:

Lecture 2 31 Jan 2017 Logistics: see piazza site for bootcamps, ps0, bashprob

Discrete Probability and Counting A finite probability space is a set S and a real function p(s) ons such that: p(s) 0, s S, and s S p(s) =1. S We refer to S as the sample space, subsetsofs as events, andp as the probability distribution. The probability of an event A S is p(a) = a A p(a). (Note that p( ) = 0.) S A

Example: Flip a fair coin. S = {H, T} Fair implies that it is equally likely to come up H (heads) or T (tails), and therefore p(h) =p(t )=1/2. Note: when all elements of S have same probability, then p is the uniform distribution. Example: Flip a biased coin where the probability of H is twice the probability of T. Since p(h)+p(t ) = 1, this implies p(h) =2/3 andp(t )=1/3. Example: Flip a fair coin twice. What is the probability of getting one H and one T? Possible outcomes are S = {HH,HT, TH,TT}. Two out of the possible 4 outcomes give one H and one T, each outcome has probability 1/4, so the total probability is 1/4+1/4 =1/2

Example: flip a fair coin 4 times. What is the probability of getting exactly two heads? The set of all possibilities S = {HHHH,HHHT,HHTH, HHTT,HTHH,HTHT,HTTH,HTTT THHH,THHT, THTH,THTT,TTHH,TTHT,TTTH,TTTT} has size S =2 4 =16 There are six ways of getting exactly two heads, E = {HHTT, HTHT, HTTH, THHT, THTH, TTHH}, so p(e) = a E p(a) = E / S =6/16=3/8. Example: Suppose we flip a fair coin 10 times. What is the probability of getting exactly 4 Hs? Wait, this is getting tedious...

Learn to Count I The number of ways of rearranging k objects is called k factorial : k! =k(k 1)(k 2) 2 1 because there are k choices for the first, k 1forthesecond,andsoon (and where by definition 0! = 1) Example: There are 4! = 4 3 2 1 = 24 ways of rearranging four objects abcd abdc acbd acdb adbc adcb bacd badc bcad bcda bdac bdca cabd cadb cbad cbda cdab cdba dabc dacb dbac dbca dcab dcba

Learn to Count II Permutations: The number of ways to choose k objects from a set of n objects is given by n(n 1) (n k +1)= n! (n k)! since there are n choices for the first object down to n k + 1 choices for the k th object (after having chosen the first k 1objects). Example: There are 4 3=4!/2! = 12 ways of choosing two objects from four. ab ac ad ba bc bd ca cb cd da db dc

Learn to Count III Combinations: If the order in which the objects are chosen does not matter, then the number of ways (combinations) to choose k objects from a set of n is given by dividing the above by k! (the number of ways of rearranging those k objects). The number of ways to choose k objects from n, independent of order, is thus given by: ( ) n k = n! (n k)!k! because we now divide by the k choices for the first object, k 1 choices for the second, and so on, down to two choices for the last two, and a single choice for the last remaining. ( ) n k is called the binomial coefficient, and pronounced n choose k Example: There are 4 3/2 =4!/2!2! = 6 ways of choosing two objects from four, if order doesn t matter (ab = ba): ab ac ad ba bc bd ca cb cd da db dc

Natural example of the distinction between permutations and combinations: Deal from a standard 52 card deck If one card to each of four players, then the number of possibilities is 52 51 50 49 = 52!/48! = 6497400. If instead four cards to a single player, then the hand doesn t depend what order they re dealt, and the number of distinct possibilities is 52 51 50 49/4 3 2 1=52!/48!4! = ( 52 4 ) =270725.

( ) ( ) n k = n! (n k)!k! Binomial Coefficients is the number of ways of choosing k objects from n, independent of order ( ) n ( n ) Note that k = n k (same count if we re choosing the n k to exclude) These numbers are called binomial coefficients, becausetheyappearascoefficients in the expansion of binomials (expressions of the form (x + y) n ). Consider (x + y) 2 = x 2 +2xy + y 2. The coefficients of this polynomial are {1, 2, 1}, i.e., the numbers ( 2 0), ( 2 1), ( 2 2). In general, (x + y) n ( ) = n x n ( ) + n x n 1 ( ) y + n x n 2 y 2 ( ) +...+ n xy n 1 ( ) + n y n 0 1 2 n 1 n (each term contains a total of nx s and y s, and the number of times the term x k y n k occurs in the expansion is given by the number of combinations of nx s and y s with exactly kx s)

Repeat Example: flip a fair coin 4 times. What is the probability of getting exactly two heads? The set of all possibilities has size S =2 4 =16 There are ( 4 2) =4!/2!2! = 4 3/2 = 6 ways of getting exactly two heads, E = {HHTT, HTHT, HTTH, THHT, THTH, TTHH}, so p(e) = a E p(a) = E / S =6/16=3/8.

Example: Flip a fair coin 10 times. What is the probability of getting exactly four Hs? First compute ( ) 10 4 = 10 9 8 4 3 2 =210 (counts all E = {T T T T T T HHHH,..., HT T HT HT T T H,...HHHHT T T T T T } places that the four Hs canoccur) The total number of outcomes is 2 10 =1024. The probability of getting exactly four Hs is E / S =210/1024.205.

In General: Flip a fair coin n times. How many possible outcomes? Two choices for each flip of the coin, so 2 n possible outcomes. Each coin flip an independent event (notion soon to be made precise), so the probability of any one of these is 1/2 n. Now suppose we want the probability of getting exactly khs. ( ) How many of the 2 n strings have exactly khs? n n! = counts number of ways the kh s can be distributed among the n tosses. k k!(n k)! ( ) / n 2 n. So the probability of kh s in n flips is k

Slightly more generality: If the coin is biased, with probability p for H (and hence probability 1 p for T), then probability(k Hs in N flips) = ( N k ) p k (1 p) N k where p k is the probability of khs, (1 p) N k is the probability of N kts, and ( N k ) ( ) counts the number of ways that khs can be distributed among the N flips. (or if p =1/6, counts the number of ways that k 6s can be distributed among N rolls of a die)

Independent Events: joint probability is equal to the product of independent probabilities Suppose event A in sample space S 1 has A = m equal probability elements, and S 1 = M, so p(a) =m/m (examples: roll a fair die, flip a fair coin) Suppose event B in sample space S 2 has B = n equal probability elements, and S 1 = N, so p(b) =n/n Then the combined sample space S 1 S 2 has MN elements. [Recall S 1 S 2 is the set of all pairs (s 1,s 2 )fors 1 S 1 and s 1 S 2 ] Of those, there are mn elements with s 1 A and s 2 B, so p(a B) = mn MN = m M n N = p(a) p(b)

Example: Roll four dice, what is the probability of at least one six? a) Consider the complement problem: there is a 5/6 probability of not rolling a six for any given die, and since the four dice are independent, the probability of not rolling a six is (5/6) 4 =5 4 /6 4 =625/1296. The probability of rolling at least one six is therefore 1 625/1296 = 671/1296.517

Example: Roll four dice, what is the probability of at least one six? b) Alternatively, recall that the number of ways of choosing r objects from a collection of N is ( N r ) = N!/r!(N r)!. Any of the four dice can be the one that comes up six, and the other three don t, so the number of ways that exactly one of the four dice is six is ( 4 1) 5 3 =4 5 3 =500 exactly two sixes: ( 4 2) 5 2 =(4 3/2) 5 2 =150 exactly three sixes: ( 4 3) 5=4 5=20 exactly four sixes: ( 4 4) =1 The total number of possibilities is 500 + 150 + 20 + 1 = 671, and hence the probability is 671/6 4 = 671/1296, as on previous slide.

Recall that events are sets. Two events are disjoint if their intersection is empty. Example: In the example of flipping 2 coins, the events A = getting exactly one H A B B = getting exactly 2Hs are disjoint. But, A is not disjoint from the event C = getting exactly one T. In fact, events A and C are the same in this case.

Principle of inclusion - exclusion: A B A B = A + B A B. This gives p(a B) =p(a)+p(b) p(a B) because a A B p(a) = a A p(a)+ a B p(a) a A B p(a) Therefore, for (and only for) disjoint events we have: p(a B) =p(a)+p(b)

Example: Flip a coin 10 times. What is the probability that the first flip is a T or the last flip is a T? The number of outcomes with the first flip T is 2 9. The number of outcomes where the last flip is a T is 2 9. The number of strings with both properties is 2 8. Hence, the number of strings with either property is 2 9 +2 9 2 8 =768, and the probability of first or last T is 768/1024 =.75.