I'm not sure what is the original source, but I've first seen it in Probability and Computing: Randomized Algorithms and Probabilistic Analysis by Michael Mitzenmacher and Eli Upfal, see here: https://books.google.ch/books?id=0bAYl6d7hvkC&printsec=frontcover&dq=Mitzenmacher+Upfal+Randomized+Median+Algorithm&hl=en&sa=X&q=Randomized%20Median%20Algorithm&f=false#v=snippet&q=Randomized%20Median%20Algorithm&f=false