Search⌘ K
AI Features

Probability Distribution Monad (Continued)

Explore the continued implementation of the probability distribution monad in C# with discrete distributions. Understand how to combine prior and conditional distributions using weighted integers, and how to compute exact resulting distributions efficiently for probabilistic workflows.

In the previous lesson, we achieved two significant results in our effort to build better probability tools. First, we demonstrated that the SelectMany implementation, which applies a likelihood function to a prior probability is the bind operation of the probability monad. Second, we gave an implementation of a wrapper object that implements it. Its action can be summed up as:

  1. Sample from the prior
...