Skip to main content
← Lab

balancedse

confirmedupstream bugPython · arviz_statsInference & servingJuly 25, 2026

the question

Does arviz_stats compute the balanced-accuracy standard error as a true standard error?

what came out

arviz_stats _acc_balanced returns variance / sqrt(n) instead of sqrt(variance / n), so it is not a standard error. On a symmetric dataset where balanced accuracy equals overall accuracy, the reported .se is five times too small (0.002530 vs 0.012649); the four sibling metrics all take the square root.

method & receipts

  • Result: confirmed
  • Reproducible one script re-runs the whole thing from scratch.
  • Tested — a correctness/benchmark suite ships alongside the code.

→ read the code and re-run it

github.com/v-code01/balancedse