b = trace['beta']
x = np.linspace(0, 1, N)
fig = plt.figure(figsize=(12, 4))
ax = fig.add_subplot(1, 2, 1)
plt.scatter(X, Y, color='g', alpha=0.3)
for i in range(500):
    y = a[i] + b[i] * x
plt.plot(x, y, 'b', alpha=0.02)
ax = fig.add_subplot(1, 2, 2)
for i in range(500):
    y = a[i] + b[i] * x
plt.plot(x, y, 'b', alpha=0.02)
plt.show()
Линейная регрессия с pymc3 и верой