/** Compute the sample (unbiased estimator) standard deviation following: * * Computing Deviations: Standard Accuracy * Tony F. Chan and John Gregg Lewis * Stanford University * Communications of ACM September 1979 of Volume 22 the ACM Number 9 * * The "two-pass" method from the paper; supposed to have better * numerical properties than the textbook summation/sqrt. To me * this looks like the textbook method, but I ain't no numerical * methods guy. */ public static double stddev(int[] X) { int m = X.length; if ( m<=1 ) { return 0; } double xbar = avg(X); double s2 = 0.0; for (int i=0; i<m; i++){ s2 += (X[i] - xbar)*(X[i] - xbar); } s2 = s2/(m-1); return Math.sqrt(s2); }
/** Compute the sample (unbiased estimator) standard deviation following: * * Computing Deviations: Standard Accuracy * Tony F. Chan and John Gregg Lewis * Stanford University * Communications of ACM September 1979 of Volume 22 the ACM Number 9 * * The "two-pass" method from the paper; supposed to have better * numerical properties than the textbook summation/sqrt. To me * this looks like the textbook method, but I ain't no numerical * methods guy. */ public static double stddev(int[] X) { int m = X.length; if ( m<=1 ) { return 0; } double xbar = avg(X); double s2 = 0.0; for (int i=0; i<m; i++){ s2 += (X[i] - xbar)*(X[i] - xbar); } s2 = s2/(m-1); return Math.sqrt(s2); }
/** Compute the sample (unbiased estimator) standard deviation following: * * Computing Deviations: Standard Accuracy * Tony F. Chan and John Gregg Lewis * Stanford University * Communications of ACM September 1979 of Volume 22 the ACM Number 9 * * The "two-pass" method from the paper; supposed to have better * numerical properties than the textbook summation/sqrt. To me * this looks like the textbook method, but I ain't no numerical * methods guy. */ public static double stddev(int[] X) { int m = X.length; if ( m<=1 ) { return 0; } double xbar = avg(X); double s2 = 0.0; for (int i=0; i<m; i++){ s2 += (X[i] - xbar)*(X[i] - xbar); } s2 = s2/(m-1); return Math.sqrt(s2); }
/** Compute the sample (unbiased estimator) standard deviation following: * * Computing Deviations: Standard Accuracy * Tony F. Chan and John Gregg Lewis * Stanford University * Communications of ACM September 1979 of Volume 22 the ACM Number 9 * * The "two-pass" method from the paper; supposed to have better * numerical properties than the textbook summation/sqrt. To me * this looks like the textbook method, but I ain't no numerical * methods guy. */ public static double stddev(int[] X) { int m = X.length; if ( m<=1 ) { return 0; } double xbar = avg(X); double s2 = 0.0; for (int i=0; i<m; i++){ s2 += (X[i] - xbar)*(X[i] - xbar); } s2 = s2/(m-1); return Math.sqrt(s2); }
/** Compute the sample (unbiased estimator) standard deviation following: * * Computing Deviations: Standard Accuracy * Tony F. Chan and John Gregg Lewis * Stanford University * Communications of ACM September 1979 of Volume 22 the ACM Number 9 * * The "two-pass" method from the paper; supposed to have better * numerical properties than the textbook summation/sqrt. To me * this looks like the textbook method, but I ain't no numerical * methods guy. */ public static double stddev(int[] X) { int m = X.length; if ( m<=1 ) { return 0; } double xbar = avg(X); double s2 = 0.0; for (int i=0; i<m; i++){ s2 += (X[i] - xbar)*(X[i] - xbar); } s2 = s2/(m-1); return Math.sqrt(s2); }
/** Compute the sample (unbiased estimator) standard deviation following: * * Computing Deviations: Standard Accuracy * Tony F. Chan and John Gregg Lewis * Stanford University * Communications of ACM September 1979 of Volume 22 the ACM Number 9 * * The "two-pass" method from the paper; supposed to have better * numerical properties than the textbook summation/sqrt. To me * this looks like the textbook method, but I ain't no numerical * methods guy. */ public static double stddev(int[] X) { int m = X.length; if ( m<=1 ) { return 0; } double xbar = avg(X); double s2 = 0.0; for (int i=0; i<m; i++){ s2 += (X[i] - xbar)*(X[i] - xbar); } s2 = s2/(m-1); return Math.sqrt(s2); }
buf.append(Stats.max(depths)); buf.append('\t'); buf.append(Stats.avg(depths)); buf.append('\t'); buf.append(Stats.stddev(depths)); buf.append(Stats.max(acyclicDFAStates)); buf.append('\t'); buf.append(Stats.avg(acyclicDFAStates)); buf.append('\t'); buf.append(Stats.stddev(acyclicDFAStates)); buf.append(Stats.max(cyclicDFAStates)); buf.append('\t'); buf.append(Stats.avg(cyclicDFAStates)); buf.append('\t'); buf.append(Stats.stddev(cyclicDFAStates));
data.mink = Stats.min(depths); data.maxk = Stats.max(depths); data.avgk = Stats.avg(depths);
data.mink = Stats.min(depths); data.maxk = Stats.max(depths); data.avgk = Stats.avg(depths);
data.mink = Stats.min(depths); data.maxk = Stats.max(depths); data.avgk = Stats.avg(depths);