Details
Description
I've been running a ChiSqTest to test whether my samples fit a uniform distribution.
The documentation says that If a second vector to test against is not supplied as a parameter, the test runs against a uniform distribution. But when I pass samples drawn from a normal distribution, the p-value calculated is 1.0, which is wrong.
The problem is that in ChiSqTest.scala, the `chiSquared` function will generate a wrong uniform distribution if the expected vector is not supplied.
The default generated samples should be
val expArr = if (expected.size == 0) Array.tabulate(size)(i => i.toDouble / size) else expected.toArray