Implement significance testing using approximate randomisation

TODO: unit tests
TODO: test on real-world data