Build a normal-approximation confidence interval for the mean of a sample: xˉ±z⋅s/n with the unbiased standard deviation s and a critical value critical (default 1.96, i.e. 95%).
Implement solve(x, critical=1.96).
Returns. Return a tuple (low, high). The sample needs at least two values so that s exists.
Example 1
Input:
solve([1.0, 2.0, 3.0, 4.0])
Output:
(1.234825, 3.765175)
Example 2
Input:
solve([10.0, 12.0, 11.0, 13.0, 9.0], critical=2.576)
Output:
(9.178493, 12.821507)
No results yet
Run your code to check it against the examples, or submit to run every test.