Best way to model a problem where multiple rows contribute to the result This is my first question here and I am very computer savvy but a ML novice. I have done lots of learning algo's where the question fits on a single row so I can train the model with a lot of rows and then give it a value and a clear result is found.
However I have come up with a problem that doesn't fit this pattern and I am stuck on where to start.
I have a formula (simplified representative is)
Z/X = Y
Where:

X can be one of 6 number (1, 2, 3, 4, 5, 6)
Y is an integer between 0 and 20 (inclusive)
Z is the result

Y is the number I am trying to find
The problem is X is invisible to me, the only number I can see is Z. I have multiple rows in the dataset ranging from a single row to 100 rows.
What I want to do is take the list of Z and back calculate the certainty of working out Y. As an example:
Z=

30
10
10
15
5

If you look at these numbers above and apply the 6 possible version of X you get:

30 / 1 = 30 (outside range), 30 / 2 = 15(valid), 30 / 3 = 10(valid), 30 / 4 = 7.5(invalid), 30 / 5 = 6(valid), 30 / 6 = 5(valid)
10 / 1 = 10(valid), 10 / 2 = 5(valid), 10 / 3 = 3 1/3(invalid), 10 / 4 = 5/2(invalid), 10 / 5 = 2(valid)  10 / 6 = 5/3(invalid)
10 / 1 = 10(valid), 10 / 2 = 5(valid), 10 / 3 = 3 1/3(invalid), 10 / 4 = 5/2(invalid), 10 / 5 = 2(valid)  10 / 6 = 5/3(invalid)
15 / 1 = 15(valid), 15 / 2 = 7.5(invalid), 15/ 3 = 5(valid), 15 / 4 = 3.75(invalid), 15 / 5 = 3(valid)  15 / 6 = 2.5(invalid)
5 / 1 = 5(valid), 5 / 2 = 2.5(invalid), 5 / 3 = 5/3(invalid), 5 / 4 = 5/4(invalid), 5 / 5 = 1(valid)  5 / 6 = 5/6(invalid)

What all of them have in common is 5 is a possible value of Y and therefore there is a good chance that Y is 5
So far it looks like a simultaneous equation but the problem exists that the Y can change over time (but very slowly), so it isn't always an exact science. Also the formula isn't exact so the observed Z has a wander error in it.
If I had one row the certainty would be lower, if I have a mix (as above) then there really is only one so I would expect certainty to be higher.
My question is:
Does anyone have any advice on how to tackle this problem, algorithm's to google etc?
Thanks
Dave
You could try the following.

Filter the results the way you describe; for all the valid options of X in the row assign equal probabilities
Apply the law of total probability. I guess in this case it's just summing all the probabilities for all possible X and divide by number of rows.

I.e. in you case

for 30 it's either 15, 10, 6 or 5 with probability 0.25 each
for both 10 it's 10, 5 or 2 with prob 0.33
for 15 it's 15, 5, 3 with prob 0.33
for 5 it's 5 or 1 with prob 0.5

That's mean in total Y is 5 with probability ~0.35 or 10 with prob ~0.18
If the X is integer, then some level of noise in Y should not be that big of a deal. Should be solved by small allowance of discrepancy on filter stage.
Slowly changing is trickier, but you probably could just make window smoothing, like say the probability of 10 is the sum of probs for 9, 10, 11.
I would not bother with estimation by number of rows - you could work out something based on CLT, but in fact the implicit sampling on step 2 already takes this into account.