Check whether a confidence interval clears a practical significance threshold

Quick Overview

Write a Python function that decides whether an A/B test confidence interval lies entirely above the smallest effect worth shipping. It tests which bound of the interval should drive a launch decision, how to treat a tie at the threshold, and how practical significance differs from statistical significance.

Check whether a confidence interval clears a practical significance threshold

Role: Data Scientist

Category: Analytics & Experimentation

Difficulty: easy

Interview Round: Other

Implement `def practically_significant(ci_lower: float, ci_upper: float, practical_threshold: float) -> bool` in `solution.py`. Given a two-sided confidence interval for the treatment-minus-control effect of a positive-is-better metric and the smallest effect worth shipping, return whether the entire interval lies strictly above the threshold. Requirements: - Return `True` exactly when `ci_lower > practical_threshold`. The decision uses the lower bound of the interval; the point estimate is never consulted. - Use a strict inequality: equality returns `False`. - Return a Python `bool`. Example: ```python practically_significant(0.006, 0.03, 0.005) # -> True (0.006 > 0.005) practically_significant(0.0006, 0.0394, 0.005) # -> False (0.0006 <= 0.005) ``` ```hint Boundary and type Check what happens when the lower bound equals the threshold exactly, and what type the comparison returns when the inputs are NumPy floats. ``` ### Constraints & Assumptions - Assume `ci_lower <= ci_upper`. No input validation is required. - The effect is treatment minus control, and a larger value of the metric is better. ### What a Strong Answer Covers - Which end of the interval decides the outcome, and why the point estimate cannot make the call - How a tie at the threshold is handled - A return value that is a real Python `bool`, even for NumPy inputs - What the rule reduces to when the threshold is zero ### Follow-up Questions - How would you extend this for a negative-is-better metric (lower is good)? - Why is the point estimate the wrong number to compare with the threshold? - What would you tell a product team when the interval straddles the threshold?

Overview: Write a Python function that decides whether an A/B test confidence interval lies entirely above the smallest effect worth shipping. It tests which bound of the interval should drive a launch decision, how to treat a tie at the threshold, and how practical significance differs from statistical significance.

Nov 24, 2026
easyData ScientistOtherAnalytics & Experimentation
0
0

Implement def practically_significant(ci_lower: float, ci_upper: float, practical_threshold: float) -> bool in solution.py. Given a two-sided confidence interval for the treatment-minus-control effect of a positive-is-better metric and the smallest effect worth shipping, return whether the entire interval lies strictly above the threshold.

Requirements:

  • Return True exactly when ci_lower > practical_threshold . The decision uses the lower bound of the interval; the point estimate is never consulted.
  • Use a strict inequality: equality returns False .
  • Return a Python bool .

Example:

practically_significant(0.006, 0.03, 0.005)    # -> True  (0.006 > 0.005)
practically_significant(0.0006, 0.0394, 0.005) # -> False (0.0006 <= 0.005)

Constraints & Assumptions

  • Assume ci_lower <= ci_upper . No input validation is required.
  • The effect is treatment minus control, and a larger value of the metric is better.

What a Strong Answer Covers Guidance

  • Which end of the interval decides the outcome, and why the point estimate cannot make the call
  • How a tie at the threshold is handled
  • A return value that is a real Python bool , even for NumPy inputs
  • What the rule reduces to when the threshold is zero

Follow-up Questions Guidance

  • How would you extend this for a negative-is-better metric (lower is good)?
  • Why is the point estimate the wrong number to compare with the threshold?
  • What would you tell a product team when the interval straddles the threshold?