def convert_intercept(x_data, y_data, zb0_sample, zb1_sample):
    '''Converts normalized b0 sample back to original scale.

    :Arguments:
    x_data: original predictor data list.
    y_data: original predicted data list.
    zb0_sample: normalized parameter samples.
    zb1_sample: normalized parameter samples.

    '''

    y_sd = np.sqrt(np.var(y_data))
    y_mean = np.mean(y_data)

    x_sd = np.sqrt(np.var(x_data))
    x_mean = np.mean(x_data)

    b0 = zb0_sample * y_sd + zb1_sample * (y_sd * x_mean) / x_sd - y_mean
    return b0
dataset/ETHPy150Open erikson84/BayesDataAnalysisWithPyMC/BayesDataAnalysisWithPymc/normalize.py/convert_intercept/swapped operands of `-`