Posterior predictive sampling with data variance

Oh, sorry. My first reaction was to aggressively cut down on the big wall of code there, to focus on a very specific thing… I didn’t notice that variance comparison. So what do you mean by “except that the predictions always vary less than the actual data”?

Regarding find_MAP, my thoughts on it are to just forget it exists. To quote the PyMC3 documentation: “In summary, while PyMC3 provides the function find_MAP() , at this point mostly for historical reasons, this function is of little use in most scenarios. If you want a point estimate you should get it from the posterior.”

That extra dimension in the sampling output is the number of posterior samples for each input data point. So, the answer to your question depends on what is the kind of answer your are looking for. There isn’t one specific answer to that. If you care about confidence intervals, for example, you can try taking quantiles (or percentiles) from them.