7

Possible Duplicate:
How should I test randomness?

Are their some techniques described for testing applications that have as a requirement some statistical or probabilistic features? They may for example use some random number generators and the customer may wish certain distribution etc.

How would software companies test that the statistical requirements are satisfied?

xralf
  • 563

2 Answers2

5

All of the properties you mention are deterministic properties. You can assert that your statistical methods are consistent given known inputs/outputs. Likewise, random number generation is still deterministic given the seed.

You would do unit/integration testing like you would any other code (the Right BICEP, CORRECT Boundary Conditions, etc.). Functionally, there is no difference.

Steven Evers
  • 28,180
2

In addition to SnOfus's answer, remember that even though you are dealing with statistical/probabilistic quantities, there are still some completely deterministic properties you can test for. For example, certain distributions (like the exponential) distribution are always positive. If such a distribution starts returning negative numbers, you've a problem. Same things go for bounded or discrete distributions.

Always look at the problem and see what needs to be done, regardless of higher maths that might be involved.

joshin4colours
  • 3,708
  • 1
  • 27
  • 37