Skip to content

Feature/result page#38

Merged
dmitrkozlovsk merged 10 commits intomainfrom
feature/result_page
Sep 25, 2025
Merged

Feature/result page#38
dmitrkozlovsk merged 10 commits intomainfrom
feature/result_page

Conversation

@dmitrkozlovsk
Copy link
Owner

Sample Ratio Mismatch (SRM) Detection Implementation

This PR adds Sample Ratio Mismatch detection functionality to the results page, enabling users to identify potential issues with experiment randomization.

Key Changes

🔬 New SRM Detection Feature

  • Added sample_ratio_mismatch_test() function using Pearson's chi-square goodness-of-fit test
  • Interactive SRM checker in the results page UI with group selection and custom ratio configuration
  • Visual feedback with success/error indicators based on p-value thresholds

🛠️ Technical Improvements

  • Enhanced ttest_welch() function to use np.divide() for safer division by zero handling
  • Added new SRMResult named tuple for structured SRM test results
  • Imported chi2 from scipy.stats for chi-square distribution calculations

✅ Testing Coverage

  • Comprehensive test suite for SRM functionality covering happy path and edge cases
  • Updated assistant app tests with proper mocking for logging instrumentation
  • Added test for division by zero handling in Welch's t-test

@dmitrkozlovsk dmitrkozlovsk merged commit 0d02b76 into main Sep 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant