On efficiency analysis of randomized divide-and-conquer median find
There's no need to do any calculation. There is absolutely nothing special about the numbers 25 and 75.
If $0 &lt; \alpha &lt; \beta &lt; 1$ and you are promised that the median is between the $\alpha$'th percentile and the $\beta$'th percentile, then the running time of the algorithm will be linear. Indeed, if $\gamma = \min(\alpha,1-\beta)$, the length reduces by a factor of at least $1-\gamma$ in each recursive call, so the total running time will be proportional to at most
$$ n \sum_{i=0}^\infty (1-\gamma)^i. $$
Even without computing the sum, we can tell that in converges, so we get a bound of $O(n)$. If we compute the sum, we get the dependence on $\gamma$:
$$ \frac{n}{\gamma}. $$
This sort of behavior always occurs when we reduce a problem to a subproblem which is smaller by a constant factor bounded away from 1. Once you know that, you don't need to do any calculations.