Riddle courtesy of William Wu’s riddle archive.
You are a prisoner in a foreign land. Your fate will be determined by a little game.
There are two jars, one with 50 white marbles, and one with 50 black marbles. You are allowed to redistribute the marbles however you wish (e.g. swap a black marble with a white marble, etc.): the only requirement is that after you are done with the redistribution, every marble must be in one of the two jars.
Afterwards, both jars will be shaken up, and you will be blindfolded and presented with one of the jars at random. Then you pick one marble out of the jar given to you. If the marble you pull out is white, you live; if black, you die.
How should you redistribute the marbles to maximize the probability that you live, and what is this maximum probability (roughly)?