All problems

Margin of Error With an Unknown Population Std

easyPythonConfidence Intervals

Ridgeline is trialling new sensor materials and has no history for any of them. The rig noise figures the lab relies on elsewhere were built up over years on the old material and cannot be borrowed, so the scatter has to be estimated from each trial itself.

A trial takes a small number of readings and reports their sample standard deviation. The critical value comes from a t distribution rather than the normal curve, and it depends on how many readings the trial took - 2.262 for ten readings, 2.776 for five, 2.064 for twenty-five - so it arrives alongside the data rather than being a constant.

Task: Print the margin of error for the trial certificate, rounded to 2 decimals. The conventions: the half-width, not the total span; the population standard deviation is unknown and the reported figure is a sample estimate taken from these same readings, so the supplied t critical value applies rather than the normal one; the interval is two-sided; and rounding happens once, on the final value.

Input

Three lines: how many readings the trial took, the sample standard deviation of those readings, and the t critical value for the trial's degrees of freedom. The count is a whole number of at least 2; 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 - 2.86.

Example:

Input:
10
4
2.262

Output:
2.86

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

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…