MaCh3  2.5.1
Reference Guide
Bayesian Analysis

Introduction

MCMC Processor is a class responsible for processing MCMC and producing validation plots.

Posteriors

Marginalised posterior is the standard output of MCMC. PDF is mean, Gauss indicates Gaussian fit to posterior while HPD (Highest Posterior Density Point). In most cases parameter posteriors are Gaussian, then all 3 values would give the same result. However, the strength of MCMC is that there is no assumption about gaussiantiy, and it can handle non-Gaussian parameters.

This plot will all be produced when running ProcessMCMC.

Parameter Plot

This plot is summarising 1D posteriors in more compact way. It is being printed by default. 1sigma errors are same as in 1D marginalised distribution.

Since these plots are often targeted for publication, there is a tool called GetPosftitParams which make this plot with ability group parameter in whatever fashion you like. You can read more here

Credible Intervals

This plot helps to tell which values are excluded based on X-credible intervals.

To produce, make sure the following field is true.

ProcessMCMC:
MakeCredibleIntervals: true

2D Posteriors

Up to this point, we discussed marginalisation of posterior distribution into 1D. It is possible to produce 2D marginalised posterior distribution. They are very useful to identify if parameters are correlated or not. In this example, there are strong correlations.

This can take some time, though. There are two ways: faster (using multithreading) but requiring lots of RAM, or slower but without RAM requirements. Once you obtain 2D posteriors, you can produce multiple additional plots.

To enable, this option must be on.

ProcessMCMC:
PlotCorr: true

Threshold

Not every 2D plot will be made. MaCh3 uses configurable threshold to print only more interesting plot. Threshold applies to correlation factor.

ProcessMCMC:
Post2DPlotThreshold: 0.2

Credible Region

ProcessMCMC:
PlotCorr: true
MakeCredibleRegions: true

Correlation Matrix

Based on 2D posterior distribution one can easily calculate correlation factor. By calculating correlation factor between each combination of parameters we create a correlation matrix etc.

Example of such a matrix can be seen below.

Since for many parameters such matrices are unreadable, we also produce correlation for each parameter. This allows more easily to see with what are the largest correlations for a given parameter.

Triangle plot

Triangle plot contains both 1D posterior and 2D posterior for a set of parameters.

TrianglePlot:
- ["Test", ["Norm_Param_0", "Norm_Param_1", "Spline_Param_0", "Spline_Param_1"]]

You can specify as many parameters as you like. But also as many combinations as you like

TrianglePlot:
- ["Test", ["Norm_Param_0", "Norm_Param_1", "Spline_Param_0", "Spline_Param_1"]]
- ["Test2", ["Norm_Param_0", "Norm_Param_1"]]

Violin plot

This plot includes posterior distribution and mirrored reflection for each parameter. Similar Parameter Plot, but it actually shows shape of distribution.

ProcessMCMC:
PlotCorr: true
MakeViolin: true

Ridgeline plot

This is yet another way of presents posteriors in a compact way. Very similar conceptually to violin plot. Matter of taste which you prefer.

Bayes factor and Savage-Dickey

It is possible to obtain the Bayes factor for different hypothesis

BayesFactor:
# Goes as follows: ParamName Name[Model 1, Model 2], Model1[lower, upper ], Model2[lower, upper ]
- ["sin2th_23", ["LO", "UO"], [0, 0.5], [0.5, 1]]

or calculate savage Dickey, which is Bayes factor for point-like hypothesis

SavageDickey:
- ["Alpha_q3", 0.0001, [0, 1]]

Parameter Evolution

ParameterEvolution:
- ["Norm_Param_0", 20]

Select parameter name and how many frames you want. The more, the longer it takes, so be careful

Bipolar plot

Reweighting

Chain reweighting is a technique allowing to test different priors without having to rerun fits. This is especially useful when we want to test the impact of priors coming from reactor constraints. Since we keep information on every step, reweight is calculated as ratio of new penalty term to original.

An example of default and original chain can be seen below. It should be noted that reweighting from PDG 2023 to flat prior is impossible, as we would be missing phase-space to reweight. Thus, it is safer to run flat prior and reweight to for example, 2023 PDG