Table of Contents

Assignment: Confidence Interval

📅 Deadline: 6.11.2025 21:59

🏦 Points: 2

Task Description

In this assignment, you are tasked with computing a confidence interval using the Hoeffding inequality. You can find the complete description of the assignment in the Assignment PDF.

You are provided with a template containing the following files:

Your objective is to implement the function confidence_interval in main.py.

Make sure that all the python files are stored in the root of the .zip sent for submission.
Note that the lower bound computed using the Hoeffding inequality may be negative, while loss functions typically return non-negative values. It is good practice to clamp the lower bound to 0, but solutions that return the value directly from the Hoeffding inequality without clamping are also accepted by BRUTE.

How to Test

After completing your implementation, you can test your solution using the following commands before submitting it to BRUTE:


Test Case 1
python main.py test-cases/public/instances/instance_1.json

Expected output:

The true risk is in the interval [-0.30, 0.30] with probability atleast 0.95
Comparing with reference solution
Test OK

Test Case 2
python main.py test-cases/public/instances/instance_2.json

Expected output:

The true risk is in the interval [-0.61, 0.61] with probability atleast 0.95
Comparing with reference solution
Test OK

Test Case 3
python main.py test-cases/public/instances/instance_3.json

Expected output:

The true risk is in the interval [0.13, 0.37] with probability atleast 0.9
Comparing with reference solution
Test OK

Test Case 4
python main.py test-cases/public/instances/instance_4.json

Expected output:

The true risk is in the interval [-0.23, 0.75] with probability atleast 0.9
Comparing with reference solution
Test OK

Test Case 5
python main.py test-cases/public/instances/instance_5.json

Expected output:

The true risk is in the interval [0.06, 0.07] with probability atleast 0.95
Comparing with reference solution
Test OK

Test Case 6
python main.py test-cases/public/instances/instance_6.json

Expected output:

The true risk is in the interval [0.74, 0.82] with probability atleast 0.95
Comparing with reference solution
Test OK

Submission Guidelines