Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
S src
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Code Review
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OPAL
  • src
  • Issues
  • #638

Closed
Open
Created Mar 19, 2021 by kraus@krausDeveloper

Fix algorithm for computation of standard deviation

From a discussion on MR 477 (!477 (comment 30754)):

I think the equation for stdTime_m is not correct. It should be std::sqrt((localMoments[l++] - totalNumParticles_m * std::pow(meanTime_m, 2)) * perParticle). However, this way of calculating can be numerically unstable (see also https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance).

I usually do a double loop, but that might be not so easy here. Perhaps with "Computing shifted data" with the first value taken as preliminary mean (this seems valid since the particle times are not expected to lie very far away from each other, or Welford's algorithm can be tried?

Assignee
Assign to
OPAL 2021.1
Milestone
OPAL 2021.1 (Past due)
Assign milestone
Time tracking