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
  • 485
  • 3
  • 10

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,200
  • 10
  • 75
  • 159
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,678
  • 1
  • 24
  • 37
  • Good advices. It seems there is no methodology (what everything to remember to check) because the question was closed as duplicate and the answer for the other question shows only a few links (most of them questions on SE) about the topic. I was interested rather in more systematic approach that can be used in real life when making a contract with a customer. – xralf Jun 11 '12 at 20:56