Skip to content
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

chore(test): lower p_value_limit to decrease test failure probability #1787

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

mayeul-zama
Copy link
Contributor

No description provided.

Comment on lines -302 to 303
let p_value_limit: f64 = 0.001;
let p_value_limit: f64 = 0.000_01;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how much does this slow the test down ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at all, the number of samples has not changed
It's just more permissive

This new value is a bit arbitrary, like the previous one was

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, what sort of impact does this have on the "tolerance" ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how this is better than the test_random_from_distribution_custom_mod test function that verifies the actual p-value

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decreasing the p_value_limit means there are less false positives (test fails where it shouldn't) but more false negatives.
False positives rate is the p_value_limit which is well known.
False negative rates depend on the real distribution (if it's not uniform). It's hard to quantify since we don't know what this distribution is.

For a fixed p_value_limit, increasing the number of samples reduces the false negative rates (of all other distributions) but again it's hard to quantify.

So it's hard to know by how much the number of samples needs to be increased to compensate for the decrease of the p_value_limit impact on the false negative rates.

Compared to combining n sub-tests (while keeping the same total number of samples), we can detect correlated deviations in sample-sets of sub-tests which individually appear plausible (even when combined as if they were independent) but when analyzed together are much less plausible, which means the detection is finer.

@mayeul-zama mayeul-zama merged commit 015b11d into main Nov 18, 2024
146 checks passed
@mayeul-zama mayeul-zama deleted the mz/lower_p_value_limit branch November 18, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants