Package cern.jet.random

Examples of cern.jet.random.ChiSquare.cdf()


            chiSq += chiSq(ids.count(id), expected);
        }
        System.out.println("X^2 = " + chiSq);
        ChiSquare dist = new ChiSquare(df, new MersenneTwister());
        // p-value is ~= prob of seeing this distribution from fair router
        double pValue = 1.0 - dist.cdf(chiSq);
        System.out.println("p-value = " + pValue);
        assertTrue("Non-uniform load distribution detected.", pValue >= 0.05);
    }

    private double chiSq(double observed, double expected) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.