def _compute_treatment_effect_raw(
    sum_treated, n_treated, sum_untreated, n_untreated
):
    """Compute the average treatment effect.

    Computes the average treatment effect (ATE) using the sum of outcomes of
    treated and untreated observations (*sum_treated* and *sum_untreated*) and
    the number of treated and untreated observations (*n_treated* and
    *n_untreated*).

    Args:
        sum_treated (float): sum of outcomes of treatment individuals.
        n_treated (int): number of treated individuals.
        sum_untreated (float): sum of outcomes of untreated individuals.
        n_untreated (int): number of untreated individuals.

    Returns:
        out (float): the estimated treatment effect

    Example:
    >>> sum_t, n_t = 100, 10.0
    >>> sum_unt, n_unt = 1000, 20.0
    >>> _compute_treatment_effect_raw(sum_t, n_t, sum_unt, n_unt)
    -40.0

    """
    out = sum_treated / n_treated - sum_untreated / n_untreated
    return out