Perhaps this statsmodel example will make it easier to understand
import statsmodels.api as sm
import numpy as np
# The data to use for initial modeling
obs_load = [20, 40, 60, 80, 100, 120, 140]
obs_velocity = [0.9, 0.81, 0.8, 0.69, 0.59, 0.45, 0.37]
obs_velocity = sm.add_constant(obs_velocity)
# Frequentist OLS model
model = sm.OLS(obs_load, obs_velocity)
model_fit = model.fit()
model_alpha, model_beta = model_fit.params
# Generate predictions from model
pred_velocities = np.arange(0, 1, 0.01)
pred_velocities = sm.add_constant(pred_velocities)
load_estimates = model_fit.predict(pred_velocities)
load_estimates
array([222.03692383, 219.88018095, 217.72343807, 215.5666952 ,
213.40995232, 211.25320944, 209.09646656, 206.93972368,
204.7829808 , 202.62623793, 200.46949505, 198.31275217,
196.15600929, 193.99926641, 191.84252354, 189.68578066,
187.52903778, 185.3722949 , 183.21555202, 181.05880915,
178.90206627, 176.74532339, 174.58858051, 172.43183763,
170.27509475, 168.11835188, 165.961609 , 163.80486612,
161.64812324, 159.49138036, 157.33463749, 155.17789461,
153.02115173, 150.86440885, 148.70766597, 146.5509231 ,
144.39418022, 142.23743734, 140.08069446, 137.92395158,
135.76720871, 133.61046583, 131.45372295, 129.29698007,
127.14023719, 124.98349431, 122.82675144, 120.67000856,
118.51326568, 116.3565228 , 114.19977992, 112.04303705,
109.88629417, 107.72955129, 105.57280841, 103.41606553,
101.25932266, 99.10257978, 96.9458369 , 94.78909402,
92.63235114, 90.47560827, 88.31886539, 86.16212251,
84.00537963, 81.84863675, 79.69189387, 77.535151 ,
75.37840812, 73.22166524, 71.06492236, 68.90817948,
66.75143661, 64.59469373, 62.43795085, 60.28120797,
58.12446509, 55.96772222, 53.81097934, 51.65423646,
49.49749358, 47.3407507 , 45.18400782, 43.02726495,
40.87052207, 38.71377919, 36.55703631, 34.40029343,
32.24355056, 30.08680768, 27.9300648 , 25.77332192,
23.61657904, 21.45983617, 19.30309329, 17.14635041,
14.98960753, 12.83286465, 10.67612178, 8.5193789 ])
# Generate load prediction for MLE of MVT
# The goal is to set this to be Normal(0.25, 0.03) and estimate using possible values of mvt
mvt = 0.25
mvt_load = model_alpha + model_beta * mvt
mvt_load
168.11835187675757
# Convert model from load~velocity to intensity~velocity
intensities = load_estimates / mvt_load
intensities
array([1.32071794, 1.30788923, 1.29506051, 1.28223179, 1.26940307,
1.25657435, 1.24374564, 1.23091692, 1.2180882 , 1.20525948,
1.19243077, 1.17960205, 1.16677333, 1.15394461, 1.14111589,
1.12828718, 1.11545846, 1.10262974, 1.08980102, 1.07697231,
1.06414359, 1.05131487, 1.03848615, 1.02565744, 1.01282872,
1. , 0.98717128, 0.97434256, 0.96151385, 0.94868513,
0.93585641, 0.92302769, 0.91019898, 0.89737026, 0.88454154,
0.87171282, 0.85888411, 0.84605539, 0.83322667, 0.82039795,
0.80756923, 0.79474052, 0.7819118 , 0.76908308, 0.75625436,
0.74342565, 0.73059693, 0.71776821, 0.70493949, 0.69211077,
0.67928206, 0.66645334, 0.65362462, 0.6407959 , 0.62796719,
0.61513847, 0.60230975, 0.58948103, 0.57665232, 0.5638236 ,
0.55099488, 0.53816616, 0.52533744, 0.51250873, 0.49968001,
0.48685129, 0.47402257, 0.46119386, 0.44836514, 0.43553642,
0.4227077 , 0.40987899, 0.39705027, 0.38422155, 0.37139283,
0.35856411, 0.3457354 , 0.33290668, 0.32007796, 0.30724924,
0.29442053, 0.28159181, 0.26876309, 0.25593437, 0.24310566,
0.23027694, 0.21744822, 0.2046195 , 0.19179078, 0.17896207,
0.16613335, 0.15330463, 0.14047591, 0.1276472 , 0.11481848,
0.10198976, 0.08916104, 0.07633232, 0.06350361, 0.05067489])