I agree that sampling counts is harder, which is why I wanted to put that part down for now and just focus on inferring weights. The distribuitons are so different, I could understand if identifiability wise you can’t fully resolve w, but shouldnt it be almost correct given all your counts basically have to come from signal_rate? With the rates the way they are and these Ns, its roughly impossible to get more than 5 counts off background_rate, meaning it should be putting w at whatever signal_rate*w gives you the most likely set of counts (even if it cant then resolve the last 0.00X decimal of weight). Being off by 0.4 in w seems like too much even in this case?
Separately though, in your case, are you trying to use all samples or only sample_type==0 samples. In principle, with the simulation code above, sample_type 0 samples have fraction of 0 so should completely identify background_rate as they are completely drawn from here. Which means the remaining samples should be able to completely identify signal_rate as background_rate has been solved out. Or is this understanding wrong?
It seems like my understanding must be wrong, but I can’t figure out why.