Fixed #1: named parameters fixed parameter misorder

This commit is contained in:
2026-03-12 22:29:27 +00:00
parent 93a6d8683f
commit 80b100a93d
2 changed files with 6 additions and 4 deletions

View File

@@ -107,11 +107,13 @@ df = samplesize - 1
prob = 0
if args.upperbound and args.lowerbound:
prob = t.cdf(df,args.upperbound, mean, stddev) - t.cdf(df,args.lowerbound, mean, stddev)
prob_upper = t.cdf(df=df,x=args.upperbound, loc=mean, scale=stddev)
prob_lower = t.cdf(df=df,x=args.lowerbound, loc=mean, scale=stddev)
prob = prob_upper - prob_lower
elif args.upperbound:
prob = t.cdf(df,args.upperbound, mean, stddev)
prob = t.cdf(df=df,x=args.upperbound, loc=mean, scale=stddev)
elif args.lowerbound:
prob = 1 - t.cdf(df,args.lowerbound, mean, stddev)
prob = 1 - t.cdf(df=df,x=args.lowerbound, loc=mean, scale=stddev)
else:
prob = 1# no bounds set!
#print("probability: %f", prob)