CI using t-theory
In previous courses, you have created confidence intervals with the formula of statistic plus/minus some number of standard errors. With bootstrapping, we typically use two standard errors. With t-based theory, we use the specific t-multiplier.
Create a CI for the slope parameter using both the default tidy()
call as well as mutate()
to calculate the confidence interval bounds explicitly. Note that the two methods should give exactly the same CI values because they are using the same computations.
alpha
has been set to 0.05
and the degrees of freedom of the twins
dataset is given to you.
Diese Übung ist Teil des Kurses
Inference for Linear Regression in R
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
alpha <- 0.05
degrees_of_freedom <- nrow(twins) - 2
# Calculate the confidence level
confidence_level <- ___
# Calculate the upper percentile cutoff
p_upper <- ___
# Find the critical value from the t-distribution
critical_value <- ___