Skip to content

Instantly share code, notes, and snippets.

@kdubovikov
Created October 8, 2017 12:52
Show Gist options
  • Save kdubovikov/264db34cfd3e8e2d4a01b12f8da330db to your computer and use it in GitHub Desktop.
Save kdubovikov/264db34cfd3e8e2d4a01b12f8da330db to your computer and use it in GitHub Desktop.
Compare sampling algorithms with t-test
from scipy.stats import ttest_rel
# We must do depentent t-test since all statistics were collected from the
# same array
ch_fast_test = ttest_rel(choice_num, fast_num)
print(f"choice sampling vs fast sampling significant: {ch_fast_test.pvalue < 0.05}, p = {ch_fast_test.pvalue}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment