public class ChiSquaredTestEx1 extends Object
Performs a chi-squared test on simulated data.
In this example, a binomial random sample of size \(1000\) with binomial parameter \( p = 0.3 \) and binomial sample size \( 5 \) is generated viaRandom.nextBinomial
. Random.setSeed
is first used to set the seed. After the constructor is called,
the random observations are added to the test one at a time to simulate
streaming data. The Chi-squared statistic, p-value, and degrees of
freedom are then computed and printed.Constructor and Description |
---|
ChiSquaredTestEx1() |
public static void main(String[] args)
Copyright © 2020 Rogue Wave Software. All rights reserved.