Probability Distribution Function
Learn to understand and implement probability distribution functions (PDFs) for continuous variables. This lesson covers the mathematical concepts behind PDFs, compares discrete and continuous distributions, and introduces type system definitions in C# for weighted distributions. Gain the foundation needed to sample from arbitrary PDFs and improve your handling of continuous probability distributions in programming.
We'll cover the following...
We’ve been mostly looking at small, discrete distributions in this course, but we started this series by looking at continuous distributions. Now that we have some understanding of how to solve probability problems on simple discrete distributions and Markov processes, let’s go back to continuous distributions and see if we can apply some of these learnings to them.
What is a Probability Distribution Function?
Let’s start with the basics. What exactly do we mean by a probability distribution function? So far in this course, we’ve mostly looked at the discrete analog, a non-normalized probability mass function. That is, for an IDiscreteDistribution<T> we have a weight function that gives us a value for each T. The probability of sampling a particular T is the weight divided by the total weight of all Ts.
Of course, had we decided to go with double weights instead of integers, we could have made a normalized probability mass function: that is, the “weight” of each particular T is automatically divided by the total weight, and we get the probability out. In ...