File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 88from scipy .stats import bootstrap , iqr , ks_2samp , mannwhitneyu
99
1010# New Stats Code
11+ # various formulas extracted from here: https://colab.research.google.com/gist/padenot/2a408f0a39e269977045fc2fb265663b/end-to-end.ipynb#scrollTo=M8WY0yVIX5Ru&uniqifier=1
1112
1213# p-value threshold to use throughout
1314PVALUE_THRESHOLD = 0.05
@@ -302,14 +303,18 @@ def interpret_effect_size(delta):
302303 return "large" , is_effect_meaningful
303304
304305
305- def interpret_cles_direction (cles , pvalue_threshold = PVALUE_THRESHOLD ):
306+ def interpret_cles_direction (cles ):
307+ # probability that a randomly selected score from one group will be greater than a randomly selected score from a second group
308+ # A CLES of 0.5 indicates a 50% chance for either outcome, 50/50 toss up, no change
309+ # A CLES of 0.6 would mean there is a 60% chance that a score Base > New
310+ # A CLES of 0.4 would mean there is a 40% chance that a score from Base > New, or a 60% chance that a score from New > Base
306311 is_base_greater = None
307312 if cles is None :
308313 return "CLES cannot be interpreted" , is_base_greater
309- elif cles > pvalue_threshold :
314+ elif cles > 0.5 :
310315 is_base_greater = True
311316 return f"{ cles :.0%} chance a base value > a new value" , is_base_greater
312- elif cles < pvalue_threshold :
317+ elif cles < 0.5 :
313318 is_base_greater = False
314319 return f"{ 1 - cles :.0%} chance a new value > base value" , is_base_greater
315320 return "CLES cannot be interpreted" , is_base_greater
You can’t perform that action at this time.
0 commit comments