From a purely utilitarianism perspective, assuming all utility is linear and unscaled:
5/6 chance I'm on the side track * 1 person saved = 5/6
1/6 chance on the main track * 1/10 chance my switch is real * 10 people saved = 1/6
Seems pretty clear that you should not flip the switch. However, if I am on the main track, this thinking will lead to no-one flipping the switch and no lives saved whereas everyone thinking it will lead to a guaranteed save -> utility of 10/6.
If I can assume more than half the people can be rational and will think like me then I should flip the switch.
Except that if people are chosen randomly there is 2/3 chance that you are on the main track according to Bayes. Let's assume there are 10 people.
The probability to be chosen is 1/6 (all are chosen if 6 is rolled) + (5/6) × (1/10) (only one is chosen to go to the side track if 1-5 is rolled) = 15/60 = 1/4.
The probability that you are on the side track knowing that you have been chosen is the probability that you have been chosen knowing that the side track is selected (1/10) × the probability that the side track is selected (5/6) divided by the probability for you to be selected at all (1/4), so (1/10)×(5/6)/(1/4) = 20/60 = 1/3. So there is a 2/3 chance that you are on the main track.
If you do not flip the switch, (2/3)×10 = 20/3 people die.
If you flip the switch, 1/3 (you if on side track) + 10 × 2/3 × 9 / 10 (switch misfires 9 out of 10 times if on the main track) = 190/30 = 19/3 die. This is slightly better than not flipping the switch, you save 1/3 people more. That's an arm and a leg.