I was reading about the probability density function when I suddenly realised what the histogram sink in GNU Radio can be used for. I knew very well what a histogram is and how it used in e.g. physics, I just didn’t quite know what to use it for in a software radio.
The histogram sink in GNU Radio will plot the amplitude distribution of the incoming samples organised in bins (see histogram on Wikipedia if you don’t know what a histogram is). A good way to demonstrate this is feeding a random noise source directly into a histogram sink. A random noise source in GNU Radio can generate samples with four different distributions: Uniform, Gaussian, Laplacian and Impulse.
So when we use the default Gaussian noise generator and feed it to the histogram sink, the histogram will approximate a Gaussian curve. Using a uniform noise source we get a uniform distribution and so on – see the video below.
Watch video on YouTube.
Now, the cool thing is that the distribution we see on the histogram is actually an approximation of the Probability Density Function for the incoming signal, just the same way as the spectrum plot is an approximation for the Power Spectral Density for the signal. Of course, for the probability density function to be true probability it would have to be normalized to 1.0, which can not be done with the current histogram sink.