Studies to detect rare events are usually carried out after the introduction
of a new drug or treatment into general use, to exclude the occurrence of unusual adverse events.
These are sometimes called post marketing studies, or Phase IV Trials.

The idea is to require all users to report side effects or complications, so that
rare adverse outcomes are recorded and dealt with.

Power (1-β), where β is the probability of Type II Error, so that power is the likelihood that the rare event
will be detected if it exists. The table in the next panel provides sample size for powers of 0.8, 0.9, 0.95, and 0.99.
Although power=0.08 is commonly used in clinical research, the importance of detecting unusual and unexpected adverse outcome
is such that the power used is commonly set at 0.95, or even 0.99 for those adverse outcomes that are life threatening.

The Mean Event Rate λ, (number of events / number of observations). This is the critical level of probability,
above which is considered unacceptable and requiring remedy. The table in the next panel provides sample size for
λ=0.0001 (1 in 10,000) to λ=0.01 (1%) with 0.0001 intervals.

The Critical Event Limit r is the pre-determined number of events that, if occurred within the sample size observed,
will led to the conclusion that λ is exceeded. Although r is usually set to 1, the table in the next panel provides
for up to r=3.

The algorithm calculates sample size required using iterative approximation until all the parameters are satisfied. Clinically,
the sample size is usually rounded upwards to the next thousand.

An example : Using the very first row of the table :

If we wish to detect an event as rare as 1 in 10,000 (λ=0.0001)

and if the power of detection is set at 0.95 (95% sure we will detect it if it exists as frequently as 1 in 10,000)

then we can conclude that the event is more frequent than 1 in 10,000 if we observe 1 incident in 30,000 cases (rounded up from
29958), or two incidents in 45,000 cases (rounded up from 47439), or 3 incidences in 63,000 cases (rounded up from 62960).