MATH 314 Quiz 17

Given on 2025-10-28

Please submit a jupyter notebook to the Quiz 17 GitHub repository by the end of the class period.

Use Polars and the penguins dataset to calculate single sample confidence intervals of bill_length_mm for each species of penguin.

Recall our formula for (CLT) confidence intervals:

You should use the DataFrame method group_by to group by "species" and the method agg to aggregate bill_length_mm. Within the context of agg, you should use the Series (Polars column) method mean to find the mean of a column, std to find the standard deviation of a column, and count to count the number of data in a column.

Amongst all of the help files associated with Polars, I think this one is best for this specific task.

I'll teach you later how to find the value for a specific percentage confidence within Polars. For now, just use in place of the value .

Hint: after aggregating to find , you'll need to use the DataFrame method with_columns to actually calculate the lower and upper bounds. This is because you can't create and use within the same context a column just created.