Module L2-M07 quiz

Study time
≈ 30 min (estimate)
Updated
2026-11-04
Draft · reviewed by AI, not yet by a person. Content may change. English translation: AI-assisted, not human-reviewed.
On this page

12 questions, 20 points (Parts A and B: 1 point/question; Parts C and D: 3 points/question), 30 minutes. Pass mark: 14/20 (70%). The solutions are for instructors only. A calculator and code-labs/l2-m07 (lab.design, lab.stats, lab.compare, lab.tradeoff, lab.gate) are allowed. The systems, numbers and names in the questions are fictional (simulated) data and do not describe a real model, vendor or product.

Part A - Multiple choice (1 point/question)

Q1. A team's comparison plan has been frozen and its hash has been written into the ticket. After seeing p = 0.07, someone edits the alpha field in the plan file from 1/20 to 1/10 and changes nothing else. For the edited file, the lab's correct result is:

  • A. lint_plan reports BAD_ALPHA, because 1/10 is larger than the 1/20 value the lab accepts
  • B. plan_hash differs from the hash recorded in the ticket, while lint_plan still returns an empty list
  • C. plan_hash and lint_plan both stay the same, because alpha is not in the part that is checked
  • D. lint_plan reports OPTIONAL_STOPPING, because alpha was loosened after the result was seen

Q2. The 95% paired bootstrap interval for (candidate minus baseline) is [0.03; 0.09]; the plan recorded a practical margin of 0.03. By the lab's practical_verdict, the verdict is:

  • A. better, because the difference is positive and the lower bound has reached the practical margin of this plan
  • B. equivalent, because the lower bound equals the margin so the interval lies inside the acceptance band
  • C. small_difference, because the interval excludes 0 and lies inside the acceptance band of the margin
  • D. unclear, because the lower bound only equals the margin and does not exceed it, and the upper bound exceeds the margin

Q3. Four simulated systems are measured on three dimensions: pass rate (higher is better), cost per request and p95 (lower is better). P has 0.69; 2400 cu; 3900 ms. Q has 0.69; 2400 cu; 3800 ms. R has 0.58; 3300 cu; 4600 ms. U has 0.47; 900 cu; 1700 ms. By the lab's pareto_front, the Pareto front consists of:

  • A. Q and U, because Q equals P on two dimensions and is faster, so P and R are dominated
  • B. P, Q and U, because the 100 ms gap in p95 is too small for P to be dropped from the front
  • C. P and U, because P has the highest pass rate and leads on two dimensions
  • D. Q, R and U, because each system needs a different cost to belong to the Pareto front

Q4. A regression gate has a non-inferiority policy with margin 0.04. The paired bootstrap interval of (candidate minus baseline) over the whole dataset is [-0.06; 0.02]; the input is valid, has the full number of items and every slice is PASS. The gate's exit code in the lab is:

  • A. 0, because the upper bound is positive so there is no significant regression
  • B. 1, because the lower bound is below -0.04 so the candidate is worse by more than the margin
  • C. 2, because the interval contains both the acceptance region and the region worse than the margin
  • D. 3, because a lower bound below -0.04 is an invalid input

Q5. An experiment report has a manifest. check_manifest returns an empty list and reproduce(manifest) returns (True, []). What can be concluded with certainty is:

  • A. The conclusion of the report is correct, because re-running gives exactly the reported result
  • B. Re-running from the manifest's configuration, on the current machine and the current code, gives the same hash
  • C. The dataset reflects real users correctly, because the fingerprint matches its pinned version
  • D. The manifest has never been forged, because recomputing manifest_id gives the recorded hash value

Part B - True/False (1 point/question)

Q6. A plan has three candidates, Bonferroni correction, n_items equal to 190, a smallest difference to detect of 0.09, a per-item variance of the difference of 0.17, power 0.8 and alpha 0.05; lint_plan returns an empty list. Because the lint does not report UNDERPOWERED, 190 items are also enough when each candidate is compared at alpha divided by 3.

Q7. Four p-values 0.012; 0.016; 0.020 and 0.900 belong to four null hypotheses, with alpha 0.05. Holm rejects the first three hypotheses, while Bonferroni rejects only one.

Q8. On 80 items, two systems give different results on only 6 items, and all 6 items lean toward B; on the other 74 items the two sides are the same. The exact two-sided sign test rejects "no difference" at alpha 1/20.

Part C - Short answer (3 points/question)

Q9. A paired comparison of A and B on 40 items, each item scored once (pass or fail), gives the following table:

B pass B fail
A pass 14 9
A fail 2 15

(a) Compute the two-sided p-value from the binomial distribution of the McNemar test, as a reduced fraction. (b) Does it reject "no difference" at alpha 1/20, and what about alpha 1/10? (c) State which cell of the table does not enter the calculation and why, and one thing the p-value does not tell you.

Q10. A team tries 5 prompt variants (V1 to V5) of the system in use (C). The table gives the number of passing items for C and for each variant on the dev set (120 items) and the confirmation set (240 items), with the same seed and the same items:

C V1 V2 V3 V4 V5
Dev (120 items) 78 80 81 85 79 83
Confirmation (240 items) 160 158 161 162 159 163

(a) Which variant wins on dev, and what is its difference from C on dev and on the confirmation set (as a reduced fraction of the pass rate)? (b) Name the phenomenon that makes the difference on dev larger than on the confirmation set and explain it in one sentence; state which number the team should report. (c) Suppose all 5 variants are in fact equal to C and there are 5 independent tests, each at alpha 1/20: what is the probability that at least one test rejects wrongly (rounded to 3 decimal places; a tolerance of 0.001 is accepted)?

Q11. Twenty latencies (ms) of a simulated system: 220, 340, 180, 950, 260, 410, 300, 275, 1500, 230, 190, 320, 280, 510, 240, 205, 360, 295, 250, 2100. (a) Compute p50, p90 and p95 by nearest rank, and the mean. (b) The product requirement is "at least 90% of requests finish within 600 ms": is it met, and what is the share within the threshold? (c) State one reason a p95 computed from 20 requests is unreliable, and what should be reported alongside it.

Part D - Scenario (3 points/question)

Q12. A team runs the evaluation pipeline for a new prompt. The baseline result was saved from dataset version 3 (fingerprint f3); the candidate result was run on dataset version 4 (fingerprint f4), which adds 12 items. The gate policy: margin 0.03, min_n 100. The gate step in the workflow reads python -m lab.gate_cli baseline.json candidate.json policy.json || true, and the job shows green. (a) What are the gate's decision, exit code and main reason? (b) Why is the job still green? (c) State two things the team must do before trusting the result.