diff --git a/infocalc.py b/infocalc.py index ad14fe3..5e3527b 100755 --- a/infocalc.py +++ b/infocalc.py @@ -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)