His reasoning would be entirely correct if you had determined the number of beans you draw randomly from between 0 and the total number.
Let’s put this a bit more technically: the reasoning would have been correct if the number of beans were a random value drawn from a known (and sufficiently well-behaved) distribution.
Let’s put this a bit more technically: the reasoning would have been correct if the number of beans were a random value drawn from a known (and sufficiently well-behaved) distribution.