You will write the 95% interval for a proportion, with a check of its conditions.
The idea. The estimate is . The margin is . The formula is trusted only with at least successes and failures.
Your tasks.
margin(count, n). Return times the standard error.interval(count, n). Return a pair (low, high).conditions_ok(count, n). Return True when there are at least successes and at least failures.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…