MulaiMulai sekarang secara 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.

Latihan ini adalah bagian dari kursus

Inference for Linear Regression in R

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

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 <- ___
Edit dan Jalankan Kode