Survival from lung cancer

What proportion of lung cancer patients survive five years after diagnosis?

How many patient records must be examined to be 95% confident that we are within 0.02 of the correct value?

The diagram finds the sample size by a trial-and-error method. For any values of n and p, it finds the width of the resulting confidence interval.

Unknown π
Without a guess at the value of π, drag the slider to 0.5 — the worst-case scenario. (Use the arrow keys for fine adjustment of π.) Then drag the sample size slider and verify that n should be 2,500 or higher to get the '±' value below 0.02.
We are sure that π will be no higher than 0.10
Recent reports claim that only 8-14% of lung cancer patients surive for five years after diagnosis. Using a probability of 0.2, verify that a sample size of 1,600 would be large enough.

Solving an equation

You could also mention that, provided n is reasonably large, the equations can be solved to give