MATH 314 Homework 08
Due 2026-11-03 by 11:59pm
-
Quiz17++: Use Polars and the penguins dataset to calculate single sample confidence intervals of
bill_length_mmfor eachspeciesof penguin.Recall our formula for (CLT) confidence intervals:
Use the notes from Thursday's class to calculate an appropriate value of
dependent on the number of observations for each species. -
Generalize your answer from number 1. into a function that takes three arguments
def CIs(df, x="", g=""): ...-
dfis the dataframe from which confidence intervals will be cacluated. -
xis the numeric variable's name. -
gis the grouping variable's name.gshould becategoricalorqualitative, not be numeric.
-
-
Call your function on the dataframe about penguins, to calculate confidence intervals of
"body_mass_g", grouping by"island".