Skip to content
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

Possible sampling error #57

Closed
OAGr opened this issue Jan 6, 2016 · 3 comments
Closed

Possible sampling error #57

OAGr opened this issue Jan 6, 2016 · 3 comments

Comments

@OAGr
Copy link
Member

OAGr commented Jan 6, 2016

From a intercom request:

' There’s currently a bad bug though in how chains of calculations are dealt with. As it stands, in a chain of calculations X -> Y -> Z, it appears that random numbers are sampled for X to calculate distributions in Y, but then to calculate the distribution of Z the values of Y are resampled. The effect is that correlations are ignored entirely. What should happen is that random numbers are sampled from X and used to calculate the whole chain of values (Y and Z). Here is a quick proof of the error: http://getguesstimate.com/models/2218. For two data cells I’ve labelled A and B (e.g. X = {A,B}), there are separate cells for C=A/(A+B) and D=B/(A+B) (so Y = {C,D}), and finally a cell that is the sum of the two fractions E=C+D. This should be identically 1, because A/(A+B) + B/(A+B) = 1. Instead, an error range is found for E because the values for C and D are resampled ignoring their anti-correlation. Doing the entire computation in one step, shown in the cell labelled F, works correctly because the values sampled for X={A,B} are used directly in the computation of F=A/(A+B) + C/(C+D). '

@dfrankow
Copy link

Closed because .. it was resolved?

@mmcdermott
Copy link
Contributor

Yep! This problem should not happen anymore. In particular, if you look at your test model in the issue, neither E nor F has any uncertainty.

@dfrankow
Copy link

Thanks!

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

No branches or pull requests

3 participants