All problems

Choosing the Diagonal Type With diag_kind

easyPythonSeaborndiag_kind

Thornbury Labs looks at the panels along the diagonal of its grid to judge each measurement's own spread, and has switched them from stepped bars to a smooth curve. A curve is easier to read and easier to over-trust, so the report now carries the spread of measurement a as a number beside it.

Task: Print the variance of the a column.

Input

The first line holds one integer n, the number of samples, where 2 <= n <= 1000. Then come n lines, each holding a sample's a and b separated by a single space.

Output

One line holding the sample variance of the a column -- the version that treats these samples as drawn from a larger population rather than as the whole of it -- rounded to 2 decimal places. The variance itself, not its square root.

Example:

Input:
4
1 10
2 20
3 30
4 40

Output:
1.67

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…