Can a probability distribution have negative values

Similar to discussions such as this, I was wondering about the possible values a probability density can have. I get the mathematical reason of why values greater than 1 are possible. However, recently I came across a probability distribution that looked like this:

.

Note the dip below zero. The distribution is the result of modeling work that used MCMC sampling to generate parameter estimates. I suspect that there are some problems with the sampling, convergence, or the underlying model, because I don't think negative values were possible, but I am not very certain about it.

Has anyone ever seen something like this and knows whether probability densities with values below zero are possible.

• No, it can't. How exactly did you obtain this plot? What does it show? It's unlikely the distribution like this was generated by MCMC because then MCMC would need to generate values with negative probabilities (take away already sampled values?). More likely, you have a bug in the code that generated the plot, or it simply does not show the distribution but something else.
– Tim
Commented Oct 7, 2022 at 14:03
• This dip is likely an artifact of an inappropriate interpolation algorithm for plotting the density.
– whuber
Commented Oct 7, 2022 at 14:16
• Tim, I am using the library HDDM, and haven't dived into how exactly the plots are produced. @whuber indeed, I just found an old discussion on google groups saying the same thing. Would you mind elaborating how interpolation can cause such a phenomenon? Edit: So the occurrence of such a dip is no evidence for an underlying problem? Commented Oct 7, 2022 at 14:23
• Some interpolators are splines. Imagine placing pins at a few points corresponding to data--so all pins are at or above the horizontal axis. Take a springy piece of wire and bend it to touch all the pins. If, say, it is diving down from the left to touch a pin near $0$ and then has to turn to touch another pin near $0$ at its right, the wire will dip below $0.$ Using such a method is a poor choice for plotting a density! For a detailed analysis of other interpolators that can behave like this, see my post at gis.stackexchange.com/a/14361/664.
– whuber
Commented Oct 7, 2022 at 14:56
• Thanks for the explanation! Commented Oct 7, 2022 at 15:01