IniziaInizia gratis

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.

Questo esercizio fa parte del corso

Inference for Linear Regression in R

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

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 <- ___
Modifica ed esegui il codice