# How to simulate head to head competition based on winning percentages?

If I have two players that are about to engage in a head to head competition, how do I simulate a winner based only on win percentage?

One idea I had was to create a "weighted winning pool" where I add the two percentages and then randomly pick a number in that pool. If it's in the percentage range of a team then that team wins.

e.g. 100% and 100% =200. If the random number is less than 100 then team A wins, if not then team b wins
e.g. #2 100% and 50% = 150. If the random number is less than 100 then team A wins if not team B wins.

Would this work or is there a more accepted way of doing this?

The general technique is a little more complicated, so I'll just include the original winning percentage version here. Let $A$ represent the winning percentage of Team A (ideally the expected winning percentage against an average team) and similarly for $B$. Then the expected winning percentage for Team A is as follows: $$W\% = \frac{A * (1 - B)}{A * (1 - B) + (1 - A)*B}$$