We are given an unknown function h(X), which could be either f(X) or g(X).
After many trials, the average number of successes from h(X) will converge
on one or the other. It will become apparent that either f(X) or g(X) is
being used.
How many trials are needed to differentiate between them with say 99%
confidence?