zconfint_generic: Normal Confidence Intervals

View source: R/helpers.R

zconfint_genericR Documentation

Normal Confidence Intervals

Description

Calculates normal confidence intervals for a given alternative at a given significance level.

Usage

zconfint_generic(mean, std_mean, alpha, alternative)

Arguments

mean

(float): Estimated normal mean.

std_mean

(float): Estimated standard error of the mean.

alpha

(float): Significance level in [0,1]

alternative

(string): Alternative hypothesis, either 'two-sided', 'larger' or 'smaller'.

Value

(vector): Lower and upper (1 - alpha) * 100% confidence limits.

Examples


n <- 1000

Y <- rnorm(n, 1, 1)

se_Y <-  sd(Y) / sqrt(n)

zconfint_generic(Y, se_Y, alpha = 0.05, alternative = "two-sided")


ipd documentation built on April 4, 2025, 4:41 a.m.