def _make_joint_output()

in src/mozanalysis/frequentist_stats/linear_models/functions.py [0:0]


def _make_joint_output(alphas: list[float], uplift: Uplift) -> Estimates:
    """Constructs an empty pandas series to hold comparative results. The series
    will be multiindexed for backwards compatability with the bootstrap results.

    Parameters:
    - alphas (list[float]): the desired confidence levels
    - uplift (Uplift): either Uplift.ABSOLUTE or Uplift.RELATIVE for inferences on the
    absolute and relative differences between branches, respectively.

    Returns:
    - series (pd.Series): the empty series. Will have keys of (uplift.value, '0.5')
    and (uplift.value, 'exp'), as well as 2 keys, one for each alpha. For more info
    on keys, see `summarize_one_branch` and `stringify_alpha` above.
    """
    str_quantiles = ["0.5", "exp"]
    for alpha in alphas:
        str_quantiles.extend(_stringify_alpha(alpha))
    str_quantiles.sort()
    index = pd.MultiIndex.from_tuples([(uplift.value, q) for q in str_quantiles])
    series = pd.Series(index=index, dtype="float")

    return series