CS 09 Lecture April 0th, 06
Four Prototypicl Trjectories Review
The Norml Distribution is Norml Rndom Vrible: ~ Nµ, σ Probbility Density Function PDF: f x e σ π E[ ] µ Vr σ x µ / σ Also clled Gussin Note: fx is symmetric bout µ where < x f x < µ x
Simplicity is Humble µ probbility σ vlue * A Gussin mximizes entropy for given men nd vrince
Antomy of beutiful eqution N µ, exponentil the distnce to the men fx p e x µ probbility density t x constnt sigm shows up twice
And here we re N µ, CDF of Stndrd Norml: A function tht hs been solved for numericlly F x x µ The cumultive density function CDF of ny norml Tble of Φz vlues in textbook, p. 0 nd hndout
Symmetry of Phi ɸ- ɸ ɸ- µ 0 ɸ -
Intervl of Phi µ 0 ɸc ɸd c d
Intervl of Phi ɸd - ɸc µ 0 ɸc ɸd c d
Four Prototypicl Trjectories Gret in clss questions
Four Prototypicl Trjectories 68% rule only for Gussins?
68% Rule? Wht is the probbility tht norml vrible Nµ, hs vlue within one stndrd devition of its men? µ µ µ µ + µ P µ <<µ+ P < < P <Z< [ ] [0.843] 0.683 Only pplies to norml
68% Rule? Counter exmple: Uniform Uni, Vr p Vr p P µ <<µ+ pple p p pple p 0.58
Four Prototypicl Trjectories How do you smple from Gussin?
How Does Computer Smple Norml? Inverse Trnsform Smpling pick uniform number y between 0, CDF of the Stndrd Norml x -5 0 Find the x such tht x y 5 Further reding: Box Muller trnsform
Four Prototypicl Trjectories Where we left off
Norml Approximtes Binomil There is deep reson for the Binomil/Norml pproximtion
Stnford Admissions Stnford ccepts 480 students Ech ccepted student hs 68% chnce of ttending # students who will ttend. ~ Bin480, 0.68 Wht is P > 745? np 686.4 np p 539.65 np p 3.3 Use Norml pproximtion: Y ~ N686.4, 539.65 P Y > 745.5 P P > 745 P Y > 745.5 Y 686.4 745.5 686.4 > Φ.54 0. 0055 3.3 3.3 Using Binomil: P > 745 0.0053
Chnges in Stnford Admissions Stnford Dily, Mrch 8, 04 Clss of 08 Admit Rtes Lowest in University History by Alex Zivkovic Fewer students were dmitted to the Clss of 08 thn the Clss of 07, due to the increse in Stnford s yield rte which hs incresed over 5 percent in the pst four yers, ccording to Colleen Lim M.A. 80, Director of Undergrdute Admission. 68% 0 yers go 80% lst yer
Four Prototypicl Trjectories Next distribution: Exponentil
Exponentil Rndom Vrible is n Exponentil RV: ~ Expλ Rte: λ > 0 Probbility Density Function PDF: λe f x 0 E[ ] Cumultive distribution function CDF, F P x: Represents time until some event o λ Vr λx λ if x 0 where < x < if x < 0 λx F x e where x f x x Erthquke, request to web server, end cell phone contrct, etc. 0
time until some event occurs ~ Expλ Wht is P > s + t > s? After initil period of time s, P > t for witing nother t units of time until event is sme s t strt Memoryless no impct from preceding period s nd s P t s P s P s t s P s t s P > + > > > + > > + > t P t F e e e s F t s F s P t s P t s t s > + > + > + λ λ λ So, t P s t s P > > + > Exponentil is Memoryless
Four Prototypicl Trjectories E[] nd Vr for exponentil
A Little Clculus Review Product rule for derivtives: d u v Derivtive nd integrl of exponentil: d e dx du dx Integrtion by prts: u e u du v + u dv e u du e u d u v u v v du + u dv u dv u v v du
Compute n-th moment of Exponentil distribution Step : don t pnic, think hppy thoughts, recll... Step : find u nd v nd du nd dv: Step 3: substitute.k.. plug nd chug 0 ] [ dx e x E x n n λ λ x n e v x u λ dx e dv dx nx du n λx λ + dx e nx e x du v v u dx e x dv u x n x n x n λ λ λ λ ] [ 0 ] [ 0 + + n x n x n x n n E dx e x dx e nx e x E n n λ λ λ λ λ λ,... ] [ ] [ so, [] ] [ cse : Bse 0, λ λ λ λ E E E E And Now, Clculus Prctice
Visits to Website Sy visitor to your web site leves fter minutes On verge, visitors leve site fter 5 minutes Assume length of sty is Exponentilly distributed ~ Expλ /5, since E[] /λ 5 Wht is P > 0? P > 0 F0 e λ0 e 0.353 Wht is P0 < < 0? P0 < < 0 F0 F0 e 4 e 0.70
Replcing Your Lptop # hours of use until your lptop dies On verge, lptops die fter 5000 hours of use ~ Expλ /5000, since E[] /λ 5000 P You use your lptop 5 hours/dy. Wht is Pyour lptop lsts 4 yers? Tht is: P > 53654 7300 > 7300 F7300 e 7300/ 5000 e.46 0.3 Better pln hed... especilly if you re coterming: P > 95 F95 e.85 0.6 5yer pln P > 0950 F0950 e.9 0.9 6yer pln
Continuous Rndom Vribles Uniform Rndom Vrible Uni, All vlues of x between lph nd bet re eqully likely. Norml Rndom Vrible N µ, Ak Gussin. Defined by men nd vrince. Goldilocks distribution. Exponentil Rndom Vrible Exp Time until n event hppens. Prmeterized by lmbd sme s Poisson. Alph Bet Rndom Vrible How mysterious nd curious. You must wit few clsses J.
Four Prototypicl Trjectories Joint Distributions
Four Prototypicl Trjectories Events occur with other events
Discrete Joint Mss Function For two discrete rndom vribles nd Y, the Joint Probbility Mss Function is: p Y Mrginl distributions:,, b P, Y b p P p, Y, y Exmple: vlue of die D, Y vlue of die D y p b P Y b p x, b Y, Y x 6 6 p, Y, y y y 36 P 6
Probbility Tble Sttes ll possible outcomes with severl discrete vribles Often is not prmetric If #vribles is >, you cn hve probbility tble, but you cn t drw it on slide All vlues of A All vlues of B b PA, B b Remember, mens nd Every outcome flls into bucket
It s Complicted Demo Go to this URL: https://goo.gl/znrsqd
A Computer or Three In Every House Consider households in Silicon Vlley A household hs C computers: C Mcs + Y PCs Assume ech computer eqully likely to be Mc or PC Y 0 3 p Y y P C c 0.6 0.4 0.8 0.3 c 0 c c c 3 0 0.6 0.? 0.04 0. 0.4 0. 0 0.07 0. 0 0 3 0.04 0 0 0 p x
A Computer or Three In Every House Consider households in Silicon Vlley A household hs C computers: C Mcs + Y PCs Assume ech computer eqully likely to be Mc or PC Y 0 3 p Y y P C c 0.6 0.4 0.8 0.3 c 0 c c c 3 0 0.6 0. 0.07 0.04 0. 0.4 0. 0 0.07 0. 0 0 3 0.04 0 0 0 p x
A Computer or Three In Every House Consider households in Silicon Vlley A household hs C computers: C Mcs + Y PCs Assume ech computer eqully likely to be Mc or PC Y 0 3 p Y y P C c 0.6 0.4 0.8 0.3 c 0 c c c 3 0 0.6 0. 0.07 0.04 0.39 0. 0.4 0. 0 0.38 0.07 0. 0 0 0.9 3 0.04 0 0 0 0.04 p x 0.39 0.38 0.9 0.04.00 Mrginl distributions
Joint This is joint A joint is not mthemticin It did not strt doing mthemtics t n erly ge It is not the reson we hve joint distributions And, no, Chrlie Sheen does not look like joint o o But he does hve them He lso hs joint custody of his children with Denise Richrds
Four Prototypicl Trjectories Wht bout the continuous world?
Jointly Continuous Rndom vribles nd Y, re Jointly Continuous if there exists PDF f,y x, y defined over < x, y < such tht: P <, b < Y b f, b b Y x, y dy dx Let s look t one:
Jointly Continuous < <,, P, b b Y dx dy y x f b Y b b b f,y x, y x y
Cumultive Density Function CDF: Mrginl density functions: b Y Y dx dy y x f b F,,,,,,,, b F b f Y Y b dy y f f Y,, dx b x f b f Y Y,, Jointly Continuous
For two continuous rndom vribles nd Y, the Joint Cumultive Probbility Distribution is: Mrginl distributions: < < b b Y P b F b F Y, where,,,,,, P, < F Y P F Y,, P, b F b Y b Y P b F Y Y < Continuous Joint Distribution Functions
Joint Drt Distribution 900 y 0 x 900
Drts! y -Pixel Mrginl x Y-Pixel Mrginl N 900, 900 Y N 900 3, 900 5
Multiple Integrls Without Ters Let nd Y be two continuous rndom vribles where 0 nd 0 Y We wnt to integrte gx,y xy w.r.t. nd Y: First, do innermost integrl tret y s constnt: xy dx dy xy dx dy 0 y 0 x 0 y 0 x 0 y 0 y 0 x y dy y dy Then, evlute remining single integrl: y 0 y dy y 4 0 0
Computing Joint Probbilities Let F,Y x, y be joint CDF for nd Y P >, Y > b P >, Y > bc c c P > Y > b P Y b P + PY b P, Y b F FY b + F,Y, b
,,,,, P b F b F b F b F b Y b + < < b b The Generl Rule Given Joint CDF Let F,Y x, y be joint CDF for nd Y
Y is non-negtive continuous rndom vrible Probbility Density Function: f Y y Alredy knew tht: But, did you know tht:?!? Anlogously, in the discrete cse, where,,, n dy y f y Y E Y ] [ dy y P Y Y E > 0 ] [ n i i P E ] [ Lovely Lemm
In the discrete cse, where,,, n E[ ] How this lemm ws mde n i n P i i P i Ech row is n expnsion of P + P + P 3 + + P n + P + P 3 + + P n + P 3 + + P n +... P n P + P + + np n E[]
Four Prototypicl Trjectories Life gives you lemms, mke lemmnde!
Disk surfce is circle of rdius R f, Y Imperfections on Disk A single point imperfection uniformly distributed on disk if x + y R x, y π R where < x,y < 0 if x + y > R Z f x f,y x, ydy Z Zx R dy +y ppler Z p Z p R x R p p R p R x R x dy pple Only integrte over the support rnge Mrginl of Y is the sme by symmetry
Disk surfce is circle of rdius R Imperfections on Disk A single point imperfection uniformly distributed on disk Distnce to origin: D + Y Wht is E[D]? R Z Z R E[D] Z 0 pple pple 0 Z R π π R P D P D >d R d 3 R 3R 0 Z R 3 Z Z R 0 R P Dpplepple d Becuse of eqully likely outcomes