For the case of 2 possibilities (A and B), I can (computational) create a random number r = [0,1] and assign the probability of A to be r, and probability of B to be (1-r) so that they follow the same distribution. But what about the case of 3 possibilities (A,B and C)?
2026-03-31 22:22:14.1774995734
On
Computing probability of equally random variables
35 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
6
On
If your Sample Space consists only of events: A, B and C
(they may be Mutually exclusive or Exhaustive), then:
$$P(A)+P(B)+P(C)=1$$
So, you may want to assign random probabilities to any 2 of A, B and C, taking care that the 2 random numbers generated sum to $\leq$ $1$
This will require you to restrict your set of probabilities $[0,1]$.
For e.g:
Assume that you allot a probability of 0.4 to say, A.
Now, for B(or C), you will have to restrict $[0,1]$ to $[0,0.6]$
After getting P(A) and P(B), use $$P(C)=1-P(A)-P(B)$$ to get P(C)
A very simple approach is to choose three values uniformly at random from $[0,1]$ and then rescale them by their sum. This (obviously) extends to $n$ variables.
Alternatively, you can choose three values successively from $[0,1]$ in such a way that the sum is forced to be $1$ though the natural methods of doing this will not produce equi-distributed choices. You can counter this effect by assigning your three values to $A,B,C$ uniformly randomly at the end. That will give you three equi-distributed variables.