We characterize the (continuous) majorization of integrable functions introduced by Hardy, Littlewood, and Pólya in terms of the (discrete) majorization of finite-dimensional vectors, introduced by the same authors. The most interesting version of this result is the characterization of the (increasing) convex order for integrable random variables in terms of majorization of vectors of expected order statistics. Such a result includes, as particular cases, previous results by Barlow and Proschan and by Alzaid and Proschan, and, in a sense, completes the picture of known results on order statistics. Applications to other stochastic orders are also briefly considered.