Confidence Interval Error Bars
Tidewater Foods samples shelf temperatures at each store, several readings per store. The chart draws a whisker on each bar to admit that the bar is an estimate rather than a fact, and the whisker is long when the store's own readings disagree with each other. The audit line under the chart reports that disagreement for store A as a plain number.
Task: Print how much store A's readings vary.
Input
The first line holds one integer n, the number of readings. Each of the next n lines holds a store name and one reading, separated by a single space. Store names contain no spaces, and a store may appear on many lines or on none.
Output
One line with exactly two decimal places: the sample standard deviation of the readings taken at store A — the version that treats those readings as a sample standing in for the store's ongoing behaviour, rather than as the entire population of interest. If store A has fewer than two readings, print 0.00.
Example:
Input:
3
A 10
A 20
A 30
Output:
10.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