Class ChiSquaredTestEx1

java.lang.Object
com.imsl.test.example.stat.ChiSquaredTestEx1

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 via Random.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.
See Also:
  • Constructor Details

    • ChiSquaredTestEx1

      public ChiSquaredTestEx1()
  • Method Details

    • main

      public static void main(String[] args)