CommencerCommencer gratuitement

Comparing randomization CIs and t-based CIs

As with hypothesis testing, if technical conditions hold (technical conditions are discussed more in the next chapter), the CI created for the slope parameter in the t-distribution setting should be in line with the CI created using bootstrapping. Create a CI for the slope parameter and compare it to the one created using the bootstrap percentile interval from the previous chapter.

Note that the bootstrap and t-intervals will not be exactly the same because they use different computational steps to arrive at the interval estimate.

Cet exercice fait partie du cours

Inference for Linear Regression in R

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

alpha <- 0.05

# Calculate the confidence level
confidence_level <- ___

# Calculate lower percentile cutoff
p_lower <- ___

# ... and the upper one
p_upper <- ___
Modifier et exécuter le code