My solution is that since the expected value of the discrete uniform distribution is $\frac{n+1}{2}$, the probability that the outcome of the second trial is the least of any two trials is $\frac{1}{2}$. Then the probability that the outcome of the $(n+1)^\text{th}$ trial being less than each of the outcomes of all the previous $n$ trials is $(\frac{1}{2})^n$.
But simulations of the experiment (in python) suggest that the correct answer is different. I have simulated the experiment for $n = 2 \text{ to } 100$, $10000$ times each, and summarized the final probabilities for various $n's$ in this graph (with $n$ on the x-axis and $p$ on the y-axis). The closest formula I could find for these results is $\frac{1}{2n}$, whose graph looks like this.
This is the python code that I ran the simulations with:
import numpy as np
def experiment(trials, n):
count_min = 0
for _ in range(trials):
# Generating n random observations from a discrete uniform distribution
observations = np.random.randint(1, n+1, size=n) # Discrete uniform distribution from 1 to n
# Finding the minimum value among the observations
min_observation = np.min(observations)
# Generating the next observation from the same discrete uniform distribution
next_observation = np.random.randint(1, n+1)
# Checking if the next observation is the minimum among the previous ones
if next_observation < min_observation:
count_min += 1
probability = count_min / trials
return probability
Setting the number of trials
trials = 10000 # Number of trials
results = []
for n in range(3,100):
results.append(experiment(trials, n))
results = np.array(results)
print(results)
But how do you arrive at the right answer?
Also, how do you arrive at the $\left( \frac{1}{2} \right)^n$? Do you reason that by the argument that for every $i$, $X_{n+1}$ has roughly the chance of $\left( \frac{1}{2} \right) ^n$ of being smaller than it?
This might seem reasonable, but it would mean that for every $i$, you had to draw a new $X_{n+1}$ which wins against $X_i$. This would be considerably more unlikely (as you said, $\left( \frac{1}{2} \right)^n$) than drawing one $X_{n+1}$ which has to be very big, but just once ...(1)
– Alex Dec 13 '23 at 08:24