Learn R Programming

ipd (version 0.1.4)

zconfint_generic: 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)

Value

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

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'.

Examples

Run this code

n <- 1000

Y <- rnorm(n, 1, 1)

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

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

Run the code above in your browser using DataLab