def percent_difference(test_stat, ctrl_stat):
    """Calculates ratio between test and control. Useful when your statistics
        might be close to zero. Provides a symmetric result.
    Args:
        test_stat: numpy array of test statistics
        ctrl_stat: numpy array of control statistics
    Returns:
        (test_stat - ctrl_stat) / ((test_stat + ctrl_stat) / 2.0) * 100.0
    """
    return (test_stat - ctrl_stat) / ((test_stat + ctrl_stat) / 2.0) * 100.0
