Skip to content

Use unbiased std for uncertainty estimates#2000

Open
jthorton wants to merge 1 commit into
mainfrom
dof
Open

Use unbiased std for uncertainty estimates#2000
jthorton wants to merge 1 commit into
mainfrom
dof

Conversation

@jthorton

Copy link
Copy Markdown
Collaborator

Updates the uncertainty functions on protocol results to return the unbiased estimate of the standard deviation from the sample population.

Questions

  • Would it be better to return the SE = std / sqrt(n) which is the uncertainty in the estimate of the average rather than the spread of the data? Where std is the unbiased estimate?
  • What do we do when n=1 the uncertainty will now return Nan?

Checklist

  • All new code is appropriately documented (user-facing code must have complete docstrings).
  • Added a news entry, or the changes are not user-facing.
  • Ran pre-commit: you can run pre-commit locally or comment on this PR with pre-commit.ci autofix.

Manual Tests: these are slow so don't need to be run every commit, only before merging and when relevant changes are made (generally at reviewer-discretion).

Developers certificate of origin

@github-actions

Copy link
Copy Markdown

No API break detected ✅

@IAlibay IAlibay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just needs a news item, otherwise looks good.

@hannahbaumann

Copy link
Copy Markdown
Contributor

Would it be better to return the SE = std / sqrt(n) which is the uncertainty in the estimate of the average rather than the spread of the data? Where std is the unbiased estimate?

I'm also not so sure, I think both options make sense, but of course answer a different question. Is there something in the best practices paper about this?

@IAlibay

IAlibay commented Jun 12, 2026

Copy link
Copy Markdown
Member

I would prefer the standard deviation rather than the standard error as the main measure of uncertainty.

We can discuss this more offline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants