Skip to content

DFO parameter errors under-reported ~8x: norm.pdf used where norm.ppf intended #262

Open

Description

@rozyczko

Finding F-H2 in DEEP_ANALYSIS.md (parent #261).

src/easyscience/fitting/minimizers/minimizer_base.py:337-339:

z = 1 - ((1 - confidence) / 2)
z = stats.norm.pdf(z)          # pdf(0.975) ~= 0.249; intended ppf(0.975) = 1.96
error_matrix = z * np.sqrt(error_matrix)

The comment above says "1.96 is a 95% confidence value", i.e. ppf was intended. Every parameter error reported via the DFO minimizer (minimizer_dfo.py:368-371) is under-reported by a factor of ~7.9. This is silently wrong science output.

Follow-up question while fixing: lmfit/bumps paths report 1-sigma errors, so scaling by a CI z-factor at all makes DFO inconsistent with the other minimizers even once ppf is used. Decide what Parameter.error means and make all three engines agree.

Activity

  1. added
    [scope] bug
    [area] fitting
    [priority] highest
    on Jun 14, 2026
  2. damskii9992 commented on Nov 4, 2026

    @damskii9992
    Contributor

    @rozyczko Didn't you fix this issue in a recent PR?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [area] fitting[priority] highest[scope] bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions