Correcting 3 sigma in 2D gaussian distribution #445
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.
2D multivariate distribution has a different probability related to 1-2-3 sigma
The black scatter is a plot of 1000 samples 2D multivariate gaussian distribution. The blue ellipse uses the 3 sigma scaling. 3 sigma scaling works well in 1 dimension, and correspond to 99.7% probability. However, the corresponding probability in 2D is actually lower if 3 sigma scaling is used. To get the equivalent 99.7% red ellipse in 2D, it should be scaled by 3.4086 instead.
This is also described in the table in this link
Thus, I propose to change the scale_factor to 3.4086, to have the same effect of the 99.7% ellipse such that the contribution of the gaussian beyond the ellipse boundary becomes vanishingly small.
Also modified the inside view frustum test to use the AABB of the ellipse directly.