Skip to content

Commit

Permalink
Fix p-value calculation to match plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein authored May 29, 2020
1 parent 7fc59dd commit 92ee777
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flarestack/core/ts_distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,10 +438,10 @@ def integral(x):

if ts_val > np.median(ts_array):

val = (ts_val - frac_under) / (1. - frac_under)
# val = (ts_val - frac_under) / (1. - frac_under)

cdf = frac_under + frac_over * scipy.stats.chi2.cdf(
val, df, loc, scale)
ts_val, df, loc, scale)

sig = norm.ppf(cdf)

Expand Down

0 comments on commit 92ee777

Please sign in to comment.