pt(-1.5, df = 4) * 2
## [1] 0.208
\(\begin{aligned} \text{Confidence Interval} &= \bar{x} \pm \text{(critical $t$-score)} \cdot \text{(standard error)} \\ &= [\text{ lower bound}, \text{ upper bound }] \end{aligned}\)
# Critical t-calculation
alpha <- 0.05
abs(qt(alpha / 2, df = 4))
## [1] 2.776445
abs()) is used because the
confidence interval equation already accounts for the direction of each
boundary through addition (+) and subtraction (-). This eliminates the
need to compute separate critical \(t\)-scores for each side.pt(1.5, df = 4, lower.tail = FALSE) * 2
## [1] 0.208
\(\begin{aligned} \text{Confidence Interval} &= \bar{x} \pm \text{(critical $t$-score)} \cdot \text{(standard error)} \\ &= [\text{ lower bound}, \text{ upper bound }] \end{aligned}\)
# Critical t-calculation
alpha <- 0.05
abs(qt(alpha / 2, df = 4))
## [1] 2.776445
abs()) is used because the
confidence interval equation already accounts for the direction of each
boundary through addition (+) and subtraction (-). This eliminates the
need to compute separate critical \(t\)-scores for each side.pt(1.5, df = 4)
## [1] 0.896
\(\begin{aligned} \text{Confidence Interval} &= \bar{x} + \text{(critical $t$-score)} \cdot \text{(standard error)} \\ &= (-\infty, \text{ upper bound }] \end{aligned}\)
# Critical t-calculation
alpha <- 0.05
abs(qt(alpha, df = 4))
## [1] 2.131847
abs()) is used because the
direction of the boundary is already specified by the addition (+) in
the confidence interval equation.pt(1.5, df = 4, lower.tail = FALSE)
## [1] 0.104
\(\begin{aligned} \text{Confidence Interval} &= \bar{x} - \text{(critical $t$-score)} \cdot \text{(standard error)} \\ &= [\text{ lower bound}, \infty) \end{aligned}\)
# Critical t-calculation
alpha <- 0.05
abs(qt(alpha, df = 4))
## [1] 2.131847
abs()) is used because the
direction of the boundary is already specified by the subtraction (-) in
the confidence interval equation.