No one wants to risk a ticket with a guess at how long the yellow is going to be, or whether they’ll make it thru or not. That is the unsolvable part. Yellows are inconsistent , and you aren’t accounting for slow-moving traffic ahead of you that might cause you to block the intersection, etc.
There was actually a scandal in Chicago were a study found that the city systematically reduced the length of yellows only on lights that had red light cameras in order to harvest tickets.