A Notched Box Plot for Comparing Medians
Thornhill Labs is checking whether a new curing process beats the old one. Both batches are drawn as boxes pinched inwards around their middle lines — the pinch is a rough guide to how much the middle line could move if the batch were run again, so two boxes whose pinches overlap are not convincingly different. That is a judgement for the reader; the report needs a flat verdict as well.
Task: Print True when batch A's middle result is greater than batch B's, and False otherwise. Equal middles print False, since equal is not greater. A batch's middle result is the one in the centre once its readings are put in order, and both batches always hold an odd number of readings, so no averaging arises.
Input
Four lines. The first holds an odd integer n and the second holds n readings for batch A, separated by single spaces. The third and fourth do the same for batch B. Readings arrive in no particular order and may have decimals.
Output
One line: exactly True or exactly False, capitalised as shown.
Example:
Input:
3
10 20 30
3
5 6 7
Output:
True
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in