def _select_rej_stat(rej_stat, ewmean, ewsdev, uwmean, uwsdev, uwmed, uwmad):
    """
    Select and return the desired rejection statistic.
    """
    if rej_stat == 'ew':
        return ewmean, ewsdev
    if rej_stat == 'uw':
        return uwmean, uwsdev
    if rej_stat == 'ro':
        return uwmed, uwmad

    raise ValueError('rej_stat must be ew, uw, or ro.')