Margin of Error, Round Two
Ridgeline's second product line uses a cheaper sensor element that scatters more, and the rig time booked for it is shorter. Where the ventilator sensor got 49 readings against a known noise of 14 units, this line gets fewer readings against a larger known population standard deviation.
Sales would like to quote a tighter certificate on this line and wants to see what the two changes have cost - and what buying rig time back, or dropping to a looser confidence level, would recover. So the calculation is run again for each combination they ask about.
Task: Print the margin of error for this line, rounded to 2 decimals. The conventions: the half-width of the interval, not the total span; the population standard deviation is known rather than estimated from the readings, so the supplied normal critical value applies; and rounding happens once, on the final value.
Input
Three lines: how many times the sensor was read, the known population standard deviation of the line, and the critical value for the confidence level being quoted. The count is a whole number of at least 1; the other two are positive decimals.
Output
One line holding the margin of error, rounded to 2 decimals and printed the way Python prints a float - 5.88.
Example:
Input:
36
18
1.96
Output:
5.88
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