All problems

CLT Standard Error for a Uniform Population

easyPythonSamplingCLT

A simulation engineer is testing a queue model. Customer arrival offsets are generated so that any value between a low and a high bound is equally likely - a flat spread with no peak anywhere, quite unlike the usual bell shape. The model then reports the average offset over batches of arrivals.

Because a flat spread is fully specified by its two bounds, its population standard deviation is a known quantity rather than something to estimate: it is the width of the spread scaled down by the square root of 12. The engineer wants to know how much a batch average should be expected to wander, so that a batch which drifts oddly far from the middle can be flagged as a bug rather than as chance. Different queues in the model use different bounds and different batch sizes, so the figure is worked out per queue.

Task: Print the standard error of the sample mean for a batch of arrivals, rounded to 4 decimals. Round once, at the very end, not at any intermediate value.

Input

Three lines: the low bound of the flat spread, the high bound, and the batch size. The bounds are decimals with the high one larger; the batch size is a whole number of at least 1.

Output

One line holding the standard error, rounded to 4 decimals and printed the way Python prints a float - 0.4082, and 0.0289 with its leading zeros intact.

Example:

Input:
0
10
50

Output:
0.4082

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…