-
Notifications
You must be signed in to change notification settings - Fork 1.6k
feat: experiment defaults to a fixed relative MDE. #31025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
The PR removes the dynamic calculation of the Minimum Detectable Effect in favor of a fixed constant, simplifying the running time logic and related tests.
- RunningTimeCalculatorLogic: Replaces dynamic MDE logic with the DEFAULT_MDE constant in
/frontend/src/scenes/experiments/RunningTimeCalculator/runningTimeCalculatorLogic.tsx
. - Utils Cleanup: Eliminates the
getMinimumDetectableEffect
function and its related types/logic in/frontend/src/scenes/experiments/utils.ts
. - Test Adjustments: Removes redundant MDE test cases in
/frontend/src/scenes/experiments/utils.test.ts
. - Experiment Logic Update: Strips out dynamic MDE computation from
/frontend/src/scenes/experiments/experimentLogic.tsx
.
4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
cb01d22
to
670d4ec
Compare
Size Change: -382 B (0%) Total Size: 13.2 MB ℹ️ View Unchanged
|
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me so far, I'll do a proper review once it's ready.
4c42872
to
350c535
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR simplifies experiment design by replacing dynamic Minimum Detectable Effect (MDE) calculations with a fixed 30% relative value.
- Added
minimumSampleSizePerVariant
calculation inexperimentLogic.test.ts
with significantly reduced sample size values (from thousands to tens) - Implemented variant count multiplication in sample size calculation in
runningTimeCalculatorLogic.tsx
to properly account for multivariate experiments - Removed all
getMinimumDetectableEffect
function references and related imports across the codebase - Updated test cases to reflect the new fixed MDE approach with adjusted expected values for running time calculations
- Added constant
DEFAULT_MDE = 30
inexperimentLogic.tsx
to replace the dynamic calculation
5 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Problem
Following up on this comment from #30792
Changes
We are removing
getMinimumDetectableEffect
, their tests and all usages in favor of a constant we'll use as default.Does this work well for both Cloud and self-hosted?
How did you test this code?