In the five years I have used Arch, I have not had a single issue.
#!/usr/bin/python
import random
from collections import Counter
def experiment():
urn = random.choices(["R", "G"], k=100)
if urn.pop() != "R":
return
return urn.pop()
results = (experiment() for i in range(1_000_000))
results = (result for result in results if result is not None)
print(Counter(results))
EDIT: I did make a mistake! The above produces a binomial distribution of urns with red/green. As in, the most common urn is one with an equal number of reds and greens, and the least common is all reds or all greens. Whereas they should have equal probability. To actually match the question: #!/usr/bin/python
import random
from collections import Counter
def experiment():
num_red = random.randint(1, 100)
num_green = 100 - num_red
urn = ["R"] * num_red + ["G"] * num_green
random.shuffle(urn)
if urn.pop() != "R":
return
return urn.pop()
results = (experiment() for i in range(1_000_000))
results = (result for result in results if result is not None)
print(Counter(results))
The answer is indeed (1) More likely to be red.