ci1: n=1 confidence interval

View source: R/norm.R

ci1R Documentation

n=1 confidence interval

Description

When you have one observation, X from some symmetric distribution with center \mu, for a pre-specified A, produces confidence intervals for the center form X \pm \eta |X - A| (type = "x") or (X + A)/2 \pm \eta |X - A| (type = "ave"). The average intervals have smaller width on average, and so are the default. We allow X to either come from a normal distribution, a Cauchy, or a uniform. Note that if you use family = "uniform" then these intervals are valid confidence intervals for the median/mode for any symmetric unimodal density, which I think is really amazing.

Usage

ci1(
  x,
  A = 0,
  type = c("ave", "x"),
  family = c("normal", "cauchy", "uniform"),
  level = 0.95
)

Arguments

x

A vector of single observations.

A

Your "prior knowledge" or "augmented data value".

type

Either centered at x or the average of x and A

family

Either the normal distribution, Cauchy, or uniform.

level

The level of the confidence interval.

Value

A matrix of with 4 columns: the data, the center, the lower bound, the upper bound.

Author(s)

David Gerard

References

  • Blachman, N., & Machol, R. (1987). Confidence intervals based on one or more observations. IEEE Transactions on Information Theory, 33(3), 373-382. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1109/TIT.1987.1057306")}

Examples

ci1(c(1, 2, 10), type = "x")
ci1(c(1, 2, 10), type = "ave")


nisone documentation built on Sept. 8, 2026, 5:08 p.m.