I'm going to ask a question that makes little sense, so I will try to explain it thoroughly. This is a real world example, not something contrived, despite what it might sound like.

I have a fish trailer. I bring in two groups of fish (A and B). I don't know exactly how many fish I bring into the trailer each time I bring fish in, but I do know exactly how many fish I take out of the trailer. The sum of the fish brought in, which is unknown, is equal to the sum of the fish taken out, which is known precisely.

These two groups need to be kept distinct. Therefore, if I bring in an estimated 5,000 A and 5,000 B, the ratio of A:B is 1:1, as far as I can tell, which is good enough. Therefore, if I take 9k fish out of the trailer, leaving a bunch, the number of A removed from the trailer is estimated to be 4,500 and the same for B. This is straight proportioning. If my original estimate of the number of fish brought into the trailer is correct, then there would be 1000 fish remaining in the trailer, of which 500 are A and 500 are B.

I then bring another 9,500 B fish into the trailer, such that I estimate that there are 500 A and 10,000 B. A now makes up 5% of the total.

That would work fine. The problem is that if my initial estimate of the number of fish brought into the trailer was wrong, and there were actually 12,000 fish, then after removing the 9,000, there would be 1,500 A fish remaining in the trailer. The addition of the 10,000 B fish would result in a total in the trailer of 13,000, and the A fish comprise 12% of the total.

What I am trying to do is work out a system that would allow me to figure out how many fish were of each type when a group is taken out of the trailer. Simple proportioning if the numbers coming in are known precisely, but not so simple if they are not known.

One thing that I have worked out is that the numbers coming in will be 'rectified' once the fish trailer is emptied. At that point, the total number that were brought into the trailer is known, and all the various inputs can be adjusted to be more accurate, and as good as I can get them. At that point, normal proportioning math can work.

One option would be to say "some A and some B were moved out", and fix the numbers once the fish trailer empties. That's a convoluted solution, but it would work well. I see no other viable alternative, so I thought I'd post this here to see if anyone else has any suggestions.

Keep in mind that 10k could be estimated to have been brought in, then 10k could be counted as having been taken out, yet there could be a couple thousand fish left in the trailer. The user will note that fish remain, but they will not be expected to estimate how many (which would be so utterly error prone as to be meaningless). Therefore, until the trailer actually empties, there can easily be more fish taken out of the trailer than the number that were brought in.

Any thoughts?