Wednesday, 30 January 2019

probability - CDF and PDF of semaphore waiting time



Imagine we have a semaphore that alternates every 40 seconds between green and red.



Waiting time is 0 when the semaphore is green, and when it is red it is the remaining time until it turns green.



I want to model the distribution of waiting times on this semaphore.



Starting with the CDF I have:




F(x)={0if x<00.5if x=0half the time we don't need to wait0.5+0.540xif x>0 and x<=40all waiting times ]0-40] are equally likely1if x>40




Is the PDF of this distribution given by the following function?



PDF(x)={0if x<00.5if x=00.540if x>0 and x<=400if x>40



And is the expected time waiting on this semaphore given by:



400xf(x)dx=400x.0.540dx=10


Answer



Posting Henry's answer here for future reference.




This distribution's density is not defined at x=0, but instead we have a point probability P(X=0)=0.5.



The expected value is calculated with a mix of discrete and continuous calculation:



E[waiting time]=400xf(x)dx+0P(X=0)=0.540.x22|400+0=0.540.4022=10


No comments:

Post a Comment

real analysis - How to find limhrightarrow0fracsin(ha)h

How to find lim without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...