  We formulate and prove a generalization of Hardy's inequality (Hardy,1925) in
terms of random variables and show that it contains the usual (or familiar)
continuous and discrete forms of Hardy's inequality. Next we improve the recent
version by Li and Mao of Hardy's inequality with weights for general Borel
measures and mixed norms so that it implies the discrete version of Liao and
the Hardy inequality with weights of Muckenhoupt as well as the mixed norm
versions due to Hardy and Littlewood, Bliss, and Bradley. An equivalent
formulation in terms of random variables is given as well. We also formulate a
reverse version of Hardy's inequality, the closely related Copson inequality, a
reverse Copson inequality and a Carleman-P\'olya-Knopp inequality via random
variables. Finally we connect our Copson inequality with counting process
martingales and survival analysis, and briefly discuss other applications.
