Paired Bootstrap Win Rate

~12 mincode completion

Implement paired_bootstrap_win_rate(scores_a, scores_b, resamples) returning the fraction of resamples in which A's mean score is strictly greater than B's.

Where this shows up

~12 min

8 employers weight this skill

4 quant funds, 2 health and bio companies, 2 big tech firms. Top match scores 93.

Python
import numpy as np


def paired_bootstrap_win_rate(scores_a, scores_b, resamples):
    """
    Fraction of paired bootstrap resamples in which system A beats system B.

    Args:
        scores_a:  (n,) per-example scores of system A
        scores_b:  (n,) per-example scores of system B
        resamples: (R, n) integer example indices, one row per resample

    Returns:
        float in [0, 1]
    """
    # YOUR CODE HERE
    pass

Run your code to see results

⌘↵ runs against the visible tests

Loading docs…

The AI Mentor needs an account

It reads your code and the failing tests and nudges you toward the fix without handing you the answer. Free accounts get it on every problem you're working on today.