Having some difficulty simulating a set of probabilities

tchntm43

New member
Joined
Jan 8, 2020
Messages
36
Suppose we have a, b, c, and d. We have the following known probabilities:
a > b: 0.73
a > c: 0.01
a > d: 0.65
b > a: 0.27
b > c: 0.01
b > d: 0.41
c > a: 0.99
c > b: 0.99
c > d: 0.99
d > a: 0.35
d > b: 0.59
d > c: 0.01

This should be enough information to simulate such that I can rank all four of them. From the data it's evident that the single most likely ranking order would be c > a > d > b. But I want to be able to simulate it. I'm using Excel VBA to do this, but the code is less of an issue at this time than the logic.

My initial thinking was to start them in the order:
1: a
2: b
3: c
4: d

Then starting with 2, I'd check if what's in 2 is greater than what's in 1. "b > a" is 0.27, so I'd generate a random number 0.0 - 1.0, and if it's less than 0.27, then I'd swap what's in 2 and 1:
1: b
2: a
3: c
4: d

Then go to 3, check if it beats 2 the same way, swap if so. If the swap happens, then have to check if 2 beats 1, but if 3 does not beat 2, then there is no need to check if 3 beats 1. Let's say just 1 swap happens when tested:
1: b
2: c
3: a
4: d

Finally I test with 4 vs 3, as I did before with the others, moving up the chain until 4 doesn't beat the opponent.

The thing that makes me doubt this strategy is that if 4 fails to defeat 3, then what's in there never moves and only is ever tested against one of the other three. I don't know if that is a problem or not. It feels like it might be.

Let me know if you see a better way of doing this.
 
Several questions come to mind:
  1. What do you mean by ranking ? Ranking by mean values of a,b,c and d?
  2. I am assuming that a,b,c and d are random variables, and my question is: are these random variables independently distributed?
  3. Is anything know about the types of distributions of a,b,c,d?
 
a, b, c, and d don't have values, they're more abstract than that.

Think of them as boxers, and the probabilities are for each boxer winning a boxing fight against each other boxer.
 
"Let me know if you see a better way of doing this." -- you need to define what "better" means. In your example you've managed to rank them so that the probability [imath]x_i > x_{i+1}[/imath] is always above 0.5 (where [imath]x_i[/imath] is the i-th element in the ranking). Is this your criteria for the ranking order? If it is, then the ranking might not be always possible for an arbitrary probability matrix, like this one:
[math] \begin{array}{rrrr} & 0.91 & 0.42 & 0.36 \\ 0.09 & & 0.64 & 0.55 \\ 0.58 & 0.36 & & 0.85 \\ 0.64 & 0.45 & 0.15 & \\ \end{array}[/math]
 
Think of them as boxers, and the probabilities are for each boxer winning a boxing fight against each other boxer.
I know that in Judo, it's very possible to have a trio of fighters where a always beats b, b always beats c, and c always beats a. That's because Judo is complicated (multi faceted). How would you rank these players?

One way of ranking four players that seems fair (to me) is by considering ALL possible tournaments. This depends on the actual type of tournament structure for your scenario. It might be done in pairs that play each other...

Code:
A
  \
    ?
  /   \
B      \
         ?
C      /
  \   /
    ?
  /
D
The two loosers of the first round also fight each other to determine place 3 or 4. The following assignments of players are possible...
Code:
A B  C D  Probability
a b  c d   1/3
a c  b d   1/3
a d  b c   1/3
You could write a "Monte-Carlo simulation" (look it up) consisting of many thousands of simulated random tournaments. Calculate the mean finishing position for each player and then order them to determine the final ranking. There are probably many other ways of ranking these people. How meaningful the final results will be is, unfortunately, debatable and it also (obviously) depends on the measurement of the initial probabilities. Hope this helps!
 
Top