log the stats and AD info

This commit is contained in:
2026-03-12 22:42:54 +00:00
parent f836a53829
commit 42d7e30e7d

View File

@@ -113,9 +113,10 @@ if args.lowerbound is not None:
prob_lower = t.cdf(df=df,x=args.lowerbound, loc=mean, scale=stddev)
prob = prob_upper - prob_lower
#print("probability: %f", prob)
info = -np.emath.log2(prob)
#print("information content: %f bits", info)
logger.info(f"n={samplesize},df={df},mean={mean},stddev={stddev}")
logger.info(f"P()={prob},I={info} bits")
## set default fontsize
matplotlib.rcParams['font.size']=args.fontsize
## place text on plot: https://matplotlib.org/3.3.4/gallery/recipes/placing_text_boxes.html
@@ -149,9 +150,7 @@ if args.lowerbound is not None:
if args.upperbound is not None:
plt.axvline(args.upperbound, color="red")
plt.plot(x, y, 'b-', label='Normal distribution')
#yt = scipy.stats.t.pdf(x, len(data)-1, mean, stddev)
#plt.plot(x, yt, 'g-', label='T Distribution')
plt.plot(x, y, 'b-', label='T distribution')
# Filter for which region to fill
coloredregion = x#default fill all