WRITE · TRACE · UNDERSTAND
Report uncertainty for a measured success rate
Implement wilson(successes,total,z=1.96) returning lower,upper.
Read lesson: Report uncertainty for a measured success rate →
Your experiment
Implement wilson(successes,total,z=1.96) returning lower,upper. Require integer 0<=successes<=total, total>0, and finite z>0. Clamp floating roundoff to [0,1].
Python runs in your browser. Your draft stays on this device.
What to look for
The z value determines the nominal confidence level through a normal approximation. Independence and representative sampling matter more than the number of decimals printed in the interval.
Watch your code work
Ready to experimentWrite a solution or load the worked answer, then choose Trace & check.
Step through arrays, variables and training curves produced by your own Python.
