Exact treatment of search statistics