import math


def __get_pooled_standard_deviation(s1: float, s2: float,
                                    n1: int, n2: int) -> float:
    """Calcultes pooled standard deviation

    Args:
        s1 (float): standard deviation of sample 1
        s2 (float): standard deviation of sample 2
        n1 (int): no observations of sample 1
        n2 (int): no observations of sample 2

    Returns:
        float: pooled standard deviation
    """
    s_pool = math.sqrt((s1**2 * (n1 - 1) + s2**2 * (n2 - 1)) /
                       (n1 + n2 - 2))
    return s_pool