mean-cl-normal

Mean with normal-approximation confidence interval.

The two-sided z critical value qnorm((1 + conf) / 2) is computed from Acklam’s inverse-normal approximation, so any conf in the open interval (0, 1) is supported.

Usage

mean-cl-normal(
  values,
  conf: 0.95,
  weights: none,
)

Parameters

Parameter Default Description
values Array of numbers; non-numeric entries are dropped.
conf 0.95 Confidence level in the open interval (0, 1).
weights none Optional array of non-negative weights (none for unit weights). Frequency-weight semantics; total weight stands in for n in the standard-error denominator.

Returns

Dict (y, ymin, ymax); all-none if values has no numerics.

Examples

Standard 95% normal-approximation interval.

#let s = mean-cl-normal((2, 3, 4, 5, 6))

Tighten to a 50% interval to highlight the central location.

#let s = mean-cl-normal((2, 3, 4, 5, 6), conf: 0.5)
Back to top