Problem: Find the probability of 3 randomly thrown darts landing in the same half of the board.
More generally, if $n$ points picked uniformly randomly on a disk, find the probability of them lying in the same half of that disk.
I tried relating the problem to 2 other problems:
- Picking points on the circumference, then the probability of all points lying in the same half is $\frac{n}{2^{n-1}}$. But the idea behind this answer uses a sum of disjoint probabilities. The same idea with a disk won't lead to disjoint cases.
- The idea in 3b1b's video on the Putnam problem. In our case we can start with a random n-gon on the disk and then try to write the probability of this $n$-gon containing the center of the disk in its interior. The answer we're looking for will be the complement of this probability. Would appreciate some help in extending this.
I ran a quick MC sim for the situation after struggling with logical approaches for a while, looks like the required probability is $\frac{1}{2}$. [Check this][2] for theoretical answers to the question, the consensus there being $\frac{3}{4}$.
import numpy as np
def gen1(n):
r = np.sqrt(np.random.uniform(0, 1, n))
theta = np.random.uniform(0, 2 * np.pi, n)
x = r * np.cos(theta)
y = r * np.sin(theta)
return x, y
def gen2(n):
pointsx,pointsy = [],[]
while(len(pointsx)<n):
x = np.random.uniform(-0.5,0.5)
y = np.random.uniform(-0.5,0.5)
while(x2+y2>1):
x = np.random.uniform(-0.5,0.5)
y = np.random.uniform(-0.5,0.5)
pointsx.append(x)
pointsy.append(y)
return np.array(pointsx),np.array(pointsy)
def check_same_half(x, y):
angles = np.arctan2(y, x)
min_angle = np.min(angles)
max_angle = np.max(angles)
return max_angle - min_angle <= np.pi
def monte_carlo_sim(trials, n, gen):
count_same_half = 0
for _ in range(trials):
x, y = gen(n)
if check_same_half(x, y):
count_same_half += 1
return count_same_half / trials
trials = 100000
n = 3
result_1 = monte_carlo_sim(trials, n, gen1)
print(f"Simulation 1: Probability of points lying in the same half-disk: {result_1:.4f}")
result_2 = monte_carlo_sim(trials, n, gen2)
print(f"Simulation 2: Probability of points lying in the same half-disk: {result_2:.4f}")
Would love to hear more thoughts on the problem and if I've made any errors somewhere.