material_percentage_uncertainty: Calculate material percentage uncertainty from observed...

View source: R/material_percentage_uncertainty.R

material_percentage_uncertaintyR Documentation

Calculate material percentage uncertainty from observed particle counts

Description

Calculates the absolute confidence-interval half-width for an observed material-class percentage from the total number of particles characterized. The calculation is the single-property proportion equation described by Cowger et al. (2024), rearranged to solve for error after observation.

Usage

material_percentage_uncertainty(count, percentage, confidence = 0.95)

Arguments

count

positive whole-number total particle count. May be a scalar or a numeric vector.

percentage

observed material-class percentage in the closed interval 0–100. May be a scalar or a numeric vector.

confidence

confidence level in the open interval 0–1. Defaults to 0.95. May be a scalar or a numeric vector.

Details

For proportion p = percentage / 100, total observed count n, and two-tailed normal critical value z, the returned half-width is 100 * abs(z) * sqrt(p * (1 - p) / n). This is a material-composition uncertainty under representative random particle sampling. It does not include laboratory, spectral-identification, concentration, finite- population, or multiple-property uncertainty. In particular, the published Wald-style equation returns zero at exactly 0 and 100 percent.

Value

A numeric vector containing absolute uncertainty half-widths in percentage points. Inputs must either have length one or share one common length.

Author(s)

Win Cowger

References

Cowger W, Markley LAT, Moore S, Gray AB, Upadhyay K, Koelmans AA (2024). "How many microplastics do you need to (sub)sample?" Ecotoxicology and Environmental Safety, 275, 116243. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.ecoenv.2024.116243")}.

Examples

material_percentage_uncertainty(100, c(20, 50, 80))
material_percentage_uncertainty(100, 50, confidence = 0.90)


OpenSpecy documentation built on Oct. 6, 2026, 1:07 a.m.