Stochastic dominance is a partial order between random variables. It is a form of stochastic ordering. The concept arises in decision theory and decision analysis in situations where one gamble (a probability distribution over possible outcomes, also known as prospects) can be ranked as superior to another gamble for a broad class of decision-makers. It is based on shared preferences regarding sets of possible outcomes and their associated probabilities. Only limited knowledge of preferences is required for determining dominance. Risk aversion is a factor only in second order stochastic dominance.
Stochastic dominance does not give a total order, but rather only a partial order: for some pairs of gambles, neither one stochastically dominates the other, since different members of the broad class of decision-makers will differ regarding which gamble is preferable without them generally being considered to be equally attractive.
The simplest case of stochastic dominance is statewise dominance (also known as state-by-state dominance), defined as follows:
For example, if a dollar is added to one or more prizes in a lottery, the new lottery statewise dominates the old one because it yields a better payout regardless of the specific numbers realized by the lottery. Similarly, if a risk insurance policy has a lower premium and a better coverage than another policy, then with or without damage, the outcome is better. Anyone who prefers more to less (in the standard terminology, anyone who has monotonically increasing preferences) will always prefer a statewise dominant gamble.
Statewise dominance is a special case of the canonical first-order stochastic dominance (FSD), which is defined as:
In terms of the cumulative distribution functions of the two random variables, A dominating B means that for all x, with strict inequality at some x.
First-order stochastic dominance can also be expressed as follows: If and only if A first-order stochastically dominates B, there exists some gamble such that where in all possible states (and strictly negative in at least one state); here means "is equal in distribution to" (that is, "has the same distribution as"). Thus, we can go from the graphed density function of A to that of B by, roughly speaking, pushing some of the probability mass to the left.
For example, consider a single toss of a fair die with the six possible outcomes (states) summarized in this table along with the amount won in each state by each of three alternative gambles:
Here gamble A statewise dominates gamble B because A gives at least as good a yield in all possible states (outcomes of the die roll) and gives a strictly better yield in one of them (state 3). Since A statewise dominates B, it also first-order dominates B. Gamble C does not statewise dominate B because B gives a better yield in states 4 through 6, but C first-order stochastically dominates B because Pr(B >= 1) = Pr(C >= 1) = 1, Pr(B >= 2) = Pr(C >= 2) = 3/6, and Pr(B >= 3) = 0 while Pr(C >= 3) = 3/6 > Pr(B >= 3). Gambles A and C cannot be ordered relative to each other on the basis of first-order stochastic dominance because Pr(A >= 2) = 4/6 > Pr(C >= 2) = 3/6 while on the other hand Pr(C >= 3) = 3/6 > Pr(A >= 3) = 0.
In general, although when one gamble first-order stochastically dominates a second gamble, the expected value of the payoff under the first will be greater than the expected value of the payoff under the second, the converse is not true: one cannot order lotteries with regard to stochastic dominance simply by comparing the means of their probability distributions. For instance, in the above example C has a higher mean (2) than does A (5/3), yet C does not first-order dominate A.
The other commonly used type of stochastic dominance is second-order stochastic dominance. Roughly speaking, for two gambles A and B, gamble A has second-order stochastic dominance over gamble B if the former is more predictable (i.e. involves less risk) and has at least as high a mean. All risk-averse expected-utility maximizers (that is, those with increasing and concave utility functions) prefer a second-order stochastically dominant gamble to a dominated one. Second-order dominance describes the shared preferences of a smaller class of decision-makers (those for whom more is better and who are averse to risk, rather than all those for whom more is better) than does first-order dominance.
In terms of cumulative distribution functions and , A is second-order stochastically dominant over B if and only if the area under from minus infinity to is less than or equal to that under from minus infinity to for all real numbers , with strict inequality at some ; that is, for all , with strict inequality at some . Equivalently, dominates in the second order if and only if for all nondecreasing and concave utility functions .
Second-order stochastic dominance can also be expressed as follows: Gamble A second-order stochastically dominates B if and only if there exist some gambles and such that , with always less than or equal to zero, and with for all values of . Here the introduction of random variable makes B first-order stochastically dominated by A (making B disliked by those with an increasing utility function), and the introduction of random variable introduces a mean-preserving spread in B which is disliked by those with concave utility. Note that if A and B have the same mean (so that the random variable degenerates to the fixed number 0), then B is a mean-preserving spread of A.
Let and be the cumulative distribution functions of two distinct investments and . dominates in the third order if and only if
and there is at least one strict inequality. Equivalently, dominates in the third order if and only if for all nondecreasing, concave utility functions that are positively skewed (that is, have a positive third derivative throughout).
Higher orders of stochastic dominance have also been analyzed, as have generalizations of the dual relationship between stochastic dominance orderings and classes of preference functions. Arguably the most powerful dominance criterion relies on the accepted economic assumption of decreasing absolute risk aversion. This involves several analytical challenges and a research effort is on its way to address those. 
Stochastic dominance relations may be used as constraints in problems of mathematical optimization, in particular stochastic programming. In a problem of maximizing a real functional over random variables in a set we may additionally require that stochastically dominates a fixed random benchmark . In these problems, utility functions play the role of Lagrange multipliers associated with stochastic dominance constraints. Under appropriate conditions, the solution of the problem is also a (possibly local) solution of the problem to maximize over in , where is a certain utility function. If the first order stochastic dominance constraint is employed, the utility function is nondecreasing; if the second order stochastic dominance constraint is used, is nondecreasing and concave. A system of linear equations can test whether a given solution if efficient for any such utility function. Third-order stochastic dominance constraints can be dealt with using convex quadratically constrained programming (QCP).