Best way to model a problem where multiple rows contribute to the result
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.