...

/

Problems with Discrete Probability Distributions

Problems with Discrete Probability Distributions

In this lesson, we will discuss some of the issues with discrete probability distributions.

Some Issues with Discrete Probability Distributions

So… we have good news and bad news.

The good news is:

  • We’ve described an interface for discrete probability distributions and implemented several distributions.
  • We’ve shown how projecting a distribution is logically equivalent to the LINQ Select operator.
  • We’ve shown how conditional probabilities of the form P(BA)P(B|A) "probability of BB given AA" are likelihood functions.
  • We’ve shown that combining a prior with a likelihood to form a joint distribution is the application of the monadic bind operator on the probability monad, and implemented this as SelectMany.
  • We’ve shown that computing the posterior distribution from the joint distribution can be done by applying a Where clause.
  • We’ve sketched out a statement-based workflow DSL that can be compiled down to our LINQ operators, and that lowering and then executing programs written in this DSL can compute a “sampling-loop-free” distribution automatically.
  • And that distribution object can then be efficiently sampled.

This is all great. But the bad news is that there are some problems; let’s list them in order roughly from smallest to largest:

First Problem

It’s often inconvenient to express weights as integers, particularly when you end up with largish co-prime weights; we’re risking integer overflow when we multiply or add them, and we lack facilities for common operations like “make me a ...