This commit is contained in:
2026-03-11 20:23:07 +00:00
parent 16327adb58
commit 0887a9effa

View File

@@ -97,16 +97,14 @@ if args.mode == "DATA":
data = np.array(pd.read_csv(inpath)[args.column])
mean = data.mean()
stddev = data.std(ddof=1)
# Delta Degrees of Freedom: ddof=0 for population, ddof=1 for sample std dev
samplesize = len(data)
elif args.mode == "SIM":
mean = args.mean
stddev = args.stddev
samplesize = args.samplesize
df = samplesize - 1
df = samplesize - 1
# time to deal with the bounds
# Delta Degrees of Freedom: ddof=0 for population, ddof=1 for sample std dev
prob = 0
if args.upperbound and args.lowerbound:
prob = t.cdf(df,args.upperbound, mean, stddev) - t.cdf(df,args.lowerbound, mean, stddev)
@@ -116,7 +114,6 @@ elif args.lowerbound:
prob = 1 - t.cdf(df,args.lowerbound, mean, stddev)
else:
prob = 1# no bounds set!
##TODO!!!!
#print("probability: %f", prob)
info = -np.emath.log2(prob)
#print("information content: %f bits", info)