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?


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.


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.

  • 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

Not the answer you're looking for? Browse other questions tagged or ask your own question.