Probability and Statistics ì for Computer Science Can we call the e exci-ng ? e � n � 1 + 1 e = lim n n →∞ Credit: wikipedia Hongye Liu, Teaching Assistant Prof, CS361, UIUC, 9.29.2020
the number ? what is N am Kk " = I e x k - - o e ^ = ? ¥ an s = ex ' (E) ex
How shots ? empty many slots , IN " k ) k N items Hashing to and will allowed be collisions are , che What linked is list . handled by slots ? number of empty td remains empty Xi = f slot in l otherwise 0 ECM " = ( I - tf ) . . remains empty ) =EKxi ) p ( slot T.xpcxi-i.pcisutimpyito.ci/-P'=k.ltIEIeiI - - [ ( Xd ) = u - Fas " =
Last time Bernoulli Distribution Dpistribution ) Benfield ; Binomial istribwtion Geometric
Objectives Poisson Distribution Variable Random continuous Function probability Density Distribution Exponential
Motivation for Disa Poisson incidences in time could a interval . data these rate all → wanting process in a .
Motivation for a model called Poisson Distribution � What’s the probability of the number of incoming customers (k) in an hour? � It’s widely applicable in physics and engineering both for modeling of -me and space. Degroot Pg 287 Simeon D. Poisson Credit: wikipedia - 288 (1781-1840)
Poisson Distribution � A discrete random variable X is called Poisson with intensity λ (λ>0) if P ( X = k ) = e − λ λ k k ! for integer k ≥ 0 λ is the average rate of Simeon D. Poisson x the event ′ s occurrence (1781-1840)
Poisson Distribution � Poisson distribu-on is a valid pdf for pcxekl = -2¥ " ∞ ∞ λ i λ k e − λ k ! � i ! = e λ ⇒ � = 1 k e Ik ' k ! ' e- i =0 k =0 = k ! PC f) =/ k - a a P ( X = k ) = e − λ λ k - e = e O = e k ! - =/ for integer k ≥ 0 λ is the average rate of Simeon D. Poisson x the event ′ s occurrence (1781-1840)
Expectations of Poisson Distribution � The expected value and the variance are wonderfully the same! That is λ * P ( X = k ) = e − λ λ k EM k ! = -2 x pox tank warm = -2k¥ for integer k ≥ 0 .is : - I - An .dk ⇒ e¥ ! E [ X ] = λ ⇒ Ee : - x - l ) ? var [ X ] = λ Simeon D. Poisson Kal de (1781-1840) =D - -_
- T ak e Plxtk ) - KT . - Easy Efx 'T vwCxI= = -2 kkY ' n ' - - = A
Examples of Poisson Distribution � How many calls does a call center get in an hour? � How many muta-ons occur per 100k nucleo-des in an DNA strand? � How many independent incidents occur in an interval? P ( X = k ) = e − λ λ k k ! for integer k ≥ 0
Poisson Distribution: call center � If a call center receives 10 calls per hour on average, what is the probability that it receives 15 calls in a given hour? - � What is λ here? = I 0 I - E Paek , - da k � What is P(k=15)? K -0 pixels , = e Ti k= 15 15 - lo A - lo Ic I , I ÷ o.o 3 = 15 ! - 16 k ! K - Credit: wikipedia
Q. Poisson Distribution: call center If a call center receives 4 calls per hour on average. What is intensity λ here for an hour? A. 1 e B. 4 C. 8 Credit: wikipedia
Q. Poisson Distribution: call center A If a call center receives 4 calls per hour on average. What is probability the center receives 0 calls in ECXI - a - an hour? uns Cx7= T M A. e -4 - a = 4 B. 0.5 - e÷"I C. 0.05 - o no = , - ki K p ex - - - = o ! = I K ! K - - o Credit: wikipedia
Q. Poisson Distribution: call center � Given a call center receives 10 calls per hour on average, =-D what is the intensity λ of the distribu-on for calls in Two hours? = 20 proof : Deere ; gao Credit: wikipedia
Example of a continuous random variable � The spinner θ θ ∈ (0 , 2 π ] t - 0 � The sample space for all outcomes is not countable
che probability of * What is in a constant p ( O = Oo ) ? do is UT ] ( o , . o I the probability of what is * " ÷÷÷÷÷÷÷÷÷ ? - O . -180 ) PL Oo - o
Probability density function (pdf) � For a con-nuous random variable X, the probability that X = x is essen-ally zero for all (or most) x , so we can’t define P ( X = x ) � Instead, we define the probability density func;on (pdf) over an infinitesimally small interval dx, p ( x ) dx = P ( X ∈ [ x, x + dx ]) � b � For a < b p ( x ) dx = P ( X ∈ [ a, b ]) a
A putt X=4 ' ¥I → X=x fab pdtixdx b) Pfaff = -
Properties of the probability density function � resembles the probability func-on p ( x ) of discrete random variables in that � for all x p ( x ) ≥ 0 � The probability of X taking all possible values is 1. � ∞ p ( x ) dx = 1 per ) = I −∞
Area under the Pdf curve pdt ' ÷ " / c ' tie
Properties of the probability density function - - � differs from the probability p ( x ) distribu-on func-on for a discrete random variable in that � is not the probability that X = x p ( x ) � can exceed 1 p ( x ) " r
Probability density function: spinner � Suppose the spinner has equal chance stopping at any posi-on. What’s the pdf of the angle θ of the spin posi-on? c � if θ ∈ (0 , 2 π ] c p ( θ ) = 0 otherwise 0 2π θ � For this func-on to be a pdf, Then � ∞ - IF p ( θ ) d θ = 1 c- - −∞
Probability density function: spinner � What the probability that the spin angle θ is within [ ]? 12 , π π 7 - II ) c- f o pi : LT tor Pcos , OG lo , 24 ) are pies = no = o If UT O
Q: Probability density function: spinner � What is the constant c given the spin angle θ has the following pdf? p ( θ ) A. 1 I B. 1/π C. 2/π c ' D. 4/π E. 1/2π π 0 2π θ
Expectation of continuous variables � Expected value of a con-nuous random variable X • S weight � ∞ E [ X ] = xp ( x ) dx x −∞ � Expected value of func-on of con-nuous random variable Y = f ( X ) � ∞ E [ Y ] = E [ f ( X )] = f ( x ) p ( x ) dx −∞
Probability density function: spinner � Given the probability density of the spin angle θ � 1 if θ ∈ (0 , 2 π ] p ( θ ) = 2 π 0 otherwise � The expected value of spin angle is It � ∞ =) . 6¥ , do E [ θ ] = θ p ( θ ) d θ . OY . " −∞ = LT = # I = I
Properties of expectation of continuous random variables � The linearity of expected value is true for con-nuous random variables. � � � And the other proper-es that we derived for variance and covariance also hold for con-nuous random variable
home at do Q. � Suppose a con-nuous variable has pdf � 2(1 − x ) x ∈ [0 , 1] p ( x ) = 0 otherwise What is E[X]? A. 1/2 B. 1/3 C. 1/4 D. 1 E. 2/3 � ∞ E [ X ] = xp ( x ) dx −∞
Continuous uniform distribution � A con-nuous random variable X is O uniform if p ( x ) 1 b − a 1 0 a b X -
Continuous uniform distribution � A con-nuous random variable X is p ( x ) uniform if 1 b − a 1 1 � for x ∈ [ a, b ] p ( x ) = b − a 0 a 0 b X otherwise ÷a¥Ii ⇐ & var [ X ] = ( b − a ) 2 E [ X ] = a + b 2 12 - eix , ? 'Fa¥x Efx 's tax ? pcxidxefak Eat !
Continuous uniform distribution � A con-nuous random variable X is p ( x ) uniform if 1 b − a 1 1 � for x ∈ [ a, b ] p ( x ) = b − a 0 a 0 b X otherwise & var [ X ] = ( b − a ) 2 E [ X ] = a + b 2 12 � Examples: 1) A dart’s posi-on thrown on the target
Continuous uniform distribution � A con-nuous random variable X is p ( x ) uniform if 1 b − a 1 1 � for x ∈ [ a, b ] p ( x ) = b − a 0 a 0 b X otherwise & var [ X ] = ( b − a ) 2 E [ X ] = a + b 2 12 � Examples: 1) A dart’s posi-on thrown on the target 2) Ojen associated with random sampling
Cumulative distribution of continuous uniform distribution � Cumula-ve distribu-on func-on (CDF) � x P ( X ≤ x ) = p ( x ) dx −∞ of a uniform random variable X is: CDF p ( x ) 1 1 b − a 1 0 a 0 a b X b X
Additional References � Charles M. Grinstead and J. Laurie Snell "Introduc-on to Probability” � Morris H. Degroot and Mark J. Schervish "Probability and Sta-s-cs”
Qs for discrete distributions
Q. � A store staff mixed their fuji and gala apples and they were individually wrapped, so they are indis-nguishable. Given there are 70% of fuji, if I want to know what is the probability I get 7 fuji in 20 apples? What is the distribu-on I should use? A. Bernoulli B. Binomial C. Geometric D. Poisson E. Uniform
Q. � A store staff mixed their fuji and gala apples and they were individually wrapped, so they are indis-nguishable. Given there are 70% of fuji, if I want to know what is the probability I get 7 fuji in 20 apples? What is the distribu-on I should use? What is the probability ?
Q. � A store staff mixed their fuji and gala apples and they were individually wrapped, so they are indis-nguishable. Given there are 70% of fuji, if I want to know the probability of picking the first gala on the 7 th -me (I can put back ajer each pick). What is the distribu-on I should use? A. Bernoulli B. Binomial C. Geometric D. Poisson E. Uniform
Recommend
More recommend