All problems

The Spread, Squared

mediumPythonStatistics

Ashfield Castings runs a die for one shift and measures every part it produced — not a sample of them, all of them. The process engineer's report quotes variance rather than standard deviation, because variances contributed by separate stages of a process can be added together while standard deviations cannot. Since the run is complete, the population variance is the one wanted here, not the sample version meant for data that stands in for a larger unseen group.

Task: Print the population variance of the measurements.

Input

The first line holds one integer n, how many measurements follow. Each of the next n lines holds one measurement as a plain number, which may carry a decimal point.

Output

One line holding the population variance with exactly two digits after the decimal point.

Example:

Input:
4
2
4
6
8

Output:
5.00

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…