a
play

A Xz Of fixed points 3 Students HW example: # = For every - PowerPoint PPT Presentation

Questions Example: Returning HW (From notes.) I If I flip 20 coins, how many are heads ? Let X 3 = the number of fixed points Intro to Random Variables I If I enter a raffle with 9 other people every Permutation X 3 outcomes day, when will


  1. Questions Example: Returning HW (From notes.) I If I flip 20 coins, how many are heads ? Let X 3 = the number of fixed points Intro to Random Variables I If I enter a raffle with 9 other people every Permutation X 3 outcomes → day, when will I first win ? after returning X 3 ABC 3 ' HW CS 70, Summer 2019 ACB 1 I ! :;÷÷ I If I pick a random woman from the US = BAC 1 population, what is her height ? BCA 0 . . Lecture 18, 7/24/19 - Wp 'T nice gets . . . - to CAB 0 I If I mix up Alice, Bob, and Charlie’s HW ' 's Charlie Bob gets CBA 1 before returning them, how many of them A 's gets Charlie will get their own HW back ? 1 / 26 2 / 26 3 / 26 Definition: Random Variable Connections to Probability Intro Definition: Distribution probabilities ← Let Ω , P correspond to a probability space. The distribution of a random variable X consists Probability Space: Random Variable X : a of two things: outcomes A random variable X is a function ! I The values X can take on. I Events are sets of I Events are sets of A Xz Of fixed points 3 Students HW example: # = For every outcome, X assigns it a real number. outcomes given the outcomes. , , 3 } { O I same value by X , Discrete random variable : I P [ A ] = P ! 2 A P [ ! ] { ! 2 Ω : X ( ! ) = a } X assigns a countable number of values. X I w ) I The probability of each value. r p I P [ X = a ] = - - HW example: 3 f- ABC - Z - I → P w ! if X ( ! )= a P [ ! ] O ] { IP C Xz H W EI : I A CB - t - - - 6 {115-1} event is an p [ X , I ] BAC I I 1 = = 6 BAC ACB CBA ; =3 ) outcomes I ⇒ . P [ X 3 , , - - ( 4 / 26 5 / 26 6 / 26

  2. Sanity Check! Working with RVs Functions of RVs Let X be a random variable with the following Same definition for X I What should the probabilities sum to, across distribution: all values X can take on? 1 8 1 wp 0.4 > 8 < 1 wp 0.4 1 X = wp 0.25 > 2 < 1 X = wp 0.25 I Can X take on negative values? Yes ! − 1 > wp 0.35 : 2 2 − 1 > wp 0.35 : 2 Write the distribution of f ( X ) , where f : R ! R . I Can X take on an infinite number of values? What is the probability that X is positive ? 0.4 Wp the - I ] for Raffle win can O ] DEX =L ] : PEX > PEX t = I Countable values? after # first any time aisoa.tv?Yt-f#Ywpo.zsfftz Of days 0.65 0.25 0.4 = t = I Uncountable values? 0.35 w p ) population Height in a → Is continuous RVs arts ! Later , ( 7 / 26 8 / 26 9 / 26 Functions of RVs Bernoulli Random Variable Bernoulli Example: Indicators Same definition for X Models whether one biased coin flip is a head. If X ∼ Bernoulli( p ) , and X = 1 corresponds to an = ) Models a yes/no -type question or event event A in an experiment: 8 1 wp 0.4 " Yes { 0,25 " = ) We say that X is an indicator for A . > < 1 Possible values of X : X = wp 0.25 2 not − 1 " > wp 0.35 : 2 I P [ X = ] = p Each day, if it is sunny in Berkeley with probability - p PEX 03=1 Write the distribution of X 2 . = 0 . 8 and cloudy with probability 0 . 2. . ⇐ Indicator for a sunny day? Parameters : p ÷÷¥ 1¥ : : : day for a sunny S indicator * = Notation: X ∼ Bernoulli( p ) S= { to 0.8 Wp . . . w p 0.2 . 10 / 26 11 / 26 12 / 26

  3. Binomial Random Variable Binomial Example: Weather I Binomial Example: Weather II Models how many heads are in n biased coin flips Each day, it is sunny in Berkeley with probability What is the probability that over a 10 day period, Ftp 0 . 8 and cloudy with probability 0 . 2. there are at least two sunny days? I ] complement = ) Models a sum of independent, identically Weather across days is independent. Pf SE 1 c- IPCSZ 2) - = distributed ( i.i.d ) Bernoulli( p ) RVs. - PCS =D What is the probability that over a 10 day period, O ] PCS 1- , n } - { 0 = - Possible values of X : 1 there are exactly 5 sunny days? , , . - , 0.8 ) . . BINGO days - - i S sunny over 10 # distribution - f 7) pill = . IP fatter - PJ Enos ] use ? n = 10 , p = 0.8 P [ X = i ] = - Binh , p ) S IP [5--0]=(18/10.8)%0.2110--9 ~ PCS ; ' f) . - ( IF ? ] 0.29 - - 17=(1,0×0.8/40.2) Parameters : n , p 10.850.25 9 0.8 10 - PCS = - - w - i - - pgn pi ( ni ) a Notation: X ∼ Bin( n , p ) 1010.8/10.239 " 223=1-0.2 ) PCS + Sat - tsn 5=5 . 8) Iif Si Berto Si is , Let - day i - - . - - . sunny . 13 / 26 14 / 26 15 / 26 Break Geometric Random Variable Probabilities Sum To 1 ? pcx=i Geomlp ) X - Models how many biased coin flips I need until Not obvious that the probabilities sum to 1. - up ] PCH ] ) P my first head. - . 1 ~ - p5pt - p ) X ( 1 − p ) i − 1 p = ptcl Ptu . . = ) Models time until a “success” when . i = 1 performing i.i.d. trials with success probability p What is your real favorite movie, and what movie Each term is the previous × the same multiplier. positive do you pretend is your favorite to sound cultured? Possible values of X : 1) 2,3 { a , ar , ar 2 , ar 3 , . . . } is a geometric sequence . integers , . . . . stgtafigge Fratto win pfi fall " I 1 - , P [ X = i ] = a ar i − 1 = X mens%fe.gs/=H-PXtp7...Ci-p)p--Ci-p)i-lp ftp.ya.FI#..1 1 − r need 0 i = 1 . Parameters : Success probability p Notation: X ∼ Geometric( p ) 16 / 26 17 / 26 18 / 26

  4. Aside: The Formula Geometric Example: Ra ffl e I Geometric Example: Ra ffl e II Dfw -581=1 iorartsfetime . An easy way to recreate the formula? I enter a ra ffl e with 9 other people every day. What is the probability that I win the ra ffl e some Each day, a winner is chosen independently, and time on or before the 8th day?? all Of SUM Let S = a + ar + ar 2 + . . . - pfWZ9 ] ← with equal probability. terms . r distributing Key Idea: - lpftogsersfordays ) =L → What is the probability that I win for the first d → r · S = ar + ar 2 + ar 3 + · · · = S a time on the 5th day? - ' = day C Fol of first WIN =L W - . Solve for S ! p = ÷ r S S a - - - If X ∼ Geometric( p ) , then: Fr s = " I I S S ( fo )4( wt ) r 5 ] a = - PC iwtses ] - p ) Ipfw Ci - = P [ X i ] = - I - r , - sci a = - " " doesn't I r I work If 21 S → a = . , 19 / 26 20 / 26 21 / 26 Poisson Random Variable Probabilities Sum To 1 ? Poisson Example: Typos Models number of rare events over a time period Again, not obvious that the probabilities sum to 1. (Notes.) We make on average 1 typo per page. " €7 of xme = ) Use the “rate” of event per unit time. The number of typos per page is modeled by a 1 λ i i ! e − λ = X / ' Poisson( λ ) random variable. e no innings :S at 2 Possible values of X : , , . . i = 0 Tiki , . . et P [ X = i ] = λ i What is the probability that a single page has i ! e − λ a exactly 5 typos? - X . e I " page e = typos per # T . = = λ = I Parameters : Rate λ Taylor Series for e x : = if , = Toe = to ' s ] e- ' Notation: X ∼ Poisson( λ ) e- BET 1 x i = e x = X i ! i = 0 22 / 26 23 / 26 24 / 26

  5. Poisson Example: Typos Summary We type 200 pages. The pages are all I Random variables assign numbers to independent. What is the probablity that at least outcomes. one page has exactly 5 typos? . ] p [ of F) ? n teas f- ! p [ Pg I Treat X = i as any ordinary event. at z - = " I Ya g es 200 I Bernoulli, Binomial, and Geometric RVs have fazes y ) . [ p [ 1 I - = nice interpretations via biased coin flips . - [ I " ° # I Practice modeling real world events as I = - , previous Bernoulli, Binomial, Geometric, Poisson. I page 25 / 26 26 / 26

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend