public class RandomEx1 extends Object implements CdfFunction
Generates a pseudorandom sample from a normal distribution and performs a goodness of fit test.
In this example, a normal random sample of size 1000 is generated viaRandom.nextGaussian. Random.setSeed is first used
to set the seed. After the ChiSquaredTest constructor is called,
the random observations are added to the test one at a time to simulate
streaming data. The Chi-squared test is performed using
Cdf.normal as the cumulative distribution function object to see
how well the random numbers fit the normal distribution.| Constructor and Description |
|---|
RandomEx1() |
| Modifier and Type | Method and Description |
|---|---|
double |
cdf(double x)
Public interface for the user-supplied cumulative distribution function
to be used by InverseCdf.
|
static void |
main(String[] args) |
public double cdf(double x)
CdfFunctioncdf in interface CdfFunctionx - a double scalar value representing the point
at which the inverse CDF is desired.double scalar value representing the probability
that a random variable for this CDF takes a value less than or
equal to this value is p.Copyright © 2020 Rogue Wave Software. All rights reserved.