1
$\begingroup$

I'm new to probabilistic programming, and have run into problems of this kind a few times now. Simply put: I often find myself wanting to model a random variable that mostly has some nice, continuous distribution, except that some of the time it falls on a particular fixed value, or is undefined.

Here is a toy example: We have a machine that predicts imminent tsunamis. For each actual tsunami we are interested in both whether or not a tsunami was predicted, as well as how far in advance it was predicted.

I could define a random variable $T$ which models the prediction lead time for any given tsunami. $T=2$ indicates that a tsunami was predicted two minutes in advance. If $T=0$, it means the tsunami was not predicted. I might use an exponentially distributed random variable to do this, but there will be a lot of weight at exactly zero that will break this model.

It seems like I'm after some kind of mixture, but it's not clear to me how to actually construct it either on paper, or in PyMC3. Should I be considering a completely different approach to modelling $T$?

$\endgroup$
  • $\begingroup$ Is this really an exponential model? Or does it return integers only? If so, you can use a zero-inflated Poisson model. $\endgroup$ – user2974951 Aug 23 '19 at 7:57
  • $\begingroup$ Sorry, that's wasn't clear from the examole. It really is an exponential model, or another continuous distribution more generally. $\endgroup$ – grge Aug 23 '19 at 8:02
  • $\begingroup$ One solution could be to use a mixture model, comparable to one form of zero inflated poisson model. You have one component of the mixture which is "not detected" and another component of the mixture which is "detected" with detection times given by the exponential distribution. There are more complex answers available in the survival literature. $\endgroup$ – Paul Hewson Aug 23 '19 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.