import pymc3 as pm import arviz as az import numpy as np import matplotlib.pyplot as pltSuppose you measure two sets of data, $x_1$ and $x_2$: x1 = np.array([3.25466863, 2.97370402, 2.91113498, 3.4574893 , 3.17937048, 3.03048094, 3.21812428, 2.81350504, 2.9976349 , 2.97788408, 3.1813029 , 2.87498481, 2.90372449, 3.46095383, 3.11570786, 2.69100383, 2.97142051, 2.72968174, 2.48244642, 2.8584929 ]) x1x2 = np.array([3.58365047, 3.04506491, 3.35190893, 2.76485786, 3.8494015 , 3.17593123, 3.03499338, 2.31533078, 2.58647626, 3.47397813, 2.9985396 , 3.46170964, 3.23908075, 2.78904992, 3.000179 , 3.23386923, 3.10856455, 3.24167989, 2.92353227, 3.09131427]) x2They appear to have different means:x1_mean = x1.mean() x2_mean = x2.mean() print("<x1>=%4.3f <x2>=%4.3f -> <x2-x1> = %4.3f" % (x1_mean, x2_mean, x2_mean-x1_mean))Use Bayesian inference to find the posterior distribution of the difference. How likely is it that $x_2$ is really larger than $x_1$?