-
Notifications
You must be signed in to change notification settings - Fork 552
Adding variance of variance and normality tests for tally statistics #3454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Grego01-biot
wants to merge
32
commits into
openmc-dev:develop
Choose a base branch
from
Grego01-biot:vov_testing
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge remote-tracking branch 'origin/stat_testing' into stat_testing
Merge remote-tracking branch 'upstream/develop' into stat_testing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR consists of extending the statistical capabilities of tallies in OpenMC by adding the variance of the variance and the D'Agostino-Pearson normality tests (skewness, kurtosis, and omnibus) in fixed source and eigenvalue simulations [1].
The variance of the variance involves the estimated third and fourth moments of the output distribution and is much more sensitive to large fluctuations. It is used to measure the relative statistical uncertainty in the estimated relative error. Since the third and fourth moments are accumulated, additional information can be extracted and normality tests can be performed.
The normality tests allow to quantify the nature of the non-normality to see if the data distribution is skewed to the right/left (skewness) and heavy/light in the tails (kurtosis). The most commonly used normality tests are tests against the null hypothesis H0 that the data is normally distributed. The first step in the testing procedure is to compute a test statistic, which follows some known distribution. The test statistic is then converted into a p-value. The null hypothesis is rejected if the p-value is less than a predetermined significance level that can be defined by the user in the tally settings. If the p-value is greater than the significance level, one fails to reject the null hypothesis. For example, if the significance level is chosen to be 0.05 and the obtained p-value is less than this, one can conclude that with 95% probability the data isn’t normally distributed [2].
[1] D’Agostino, Ralph B., and Albert Belanger. “A Suggestion for Using Powerful and Informative Tests of Normality.” The American Statistician, vol. 44, no. 4, 1990, pp. 316–21. JSTOR, https://doi.org/10.2307/2684359. Accessed 17 June 2025.
[2] T. Kaltiaisenaho. "Statistical Tests and the Underestimation of Variance in Serpent 2", Tech Report: VTT-R-00371-14: https://serpent.vtt.fi/serpent/download/VTT-R-00371-14.pdf
Checklist