How to visualise "equal in distribution" in the context of stochastic dominance? I am reading about stochastic dominance in wikipedia. I don't comprehend the meaning of "equal in distribution".
$x_B \overset {d}{=} (x_A+y)$
What does $\overset {d}{=}$ mean? 
I understand that equal in distribution means that they have the same distribution functions.
$P[X \le x] = P[Y \le x]$ and two random variables having equal moment generating functions have the same distribution.
But I have difficulty visualizing this. Is there a nice way to visualize this?
 A: Graphing distribution functions is a standard way to visualize distributions which makes "$\overset{d}{=}$" almost trivial to understand.  What is really needed in this context, though, is an understanding of how adding two random variables changes their distribution functions.  This answer develops that understanding by explaining the concepts by means of visualizations.  The result is somewhat surprising: a Wikipedia claim about the connection between stochastic dominance and equivalence in distribution appears to be wrong.
Visualizing random variables
By definition, a random variable is a (measurable) real-valued function defined on a sample space $\Omega$ ("Omega").  A common way to visualize functions is to graph them on a pair of axes.  The points on one axis represent the elements of $\Omega$ (the domain) while the points on the other axis represent the possible values a function can take on (the range).  Although conventionally a horizontal axis is used for the domain, for reasons that will soon become apparent I will dedicate the vertical axis to this role, reserving the horizontal axis to represent the range (all real numbers).
As a running example, let $\Omega = \{a, b, c, d\}$ be a set of four possible outcomes of an experiment.  Assume that all subsets are measurable (can have probabilities associated with them).  Suppose the random variable $X$ assigns the values $2$, $4$, $5$, and $5$ to these outcomes, respectively.  Then the upper left panel of the figure, "Random Variable X," is a graph of $X$.  The centers of the blue dots locate the values of $X$ for each element of $\Omega$.

Visualizing probabilities
A random variable exists independently of any probability measure on $\Omega$.  For this example, I posit a measure $\mathbb{P}$ in which $b$, $c$, and $d$ have equal probabilities of $1/5$ but $a$ has twice that probability, $2/5$.  I have depicted that measure by making the areas of the dots in the graph directly proportional to the probabilities.  The total area of all four dots therefore is taken to be unity (a probability of $1$).
Probability distribution functions
The cumulative distribution function (CDF) $F_X$ of a random variable $X:\Omega\to\mathbb{R}$ is determined by sweeping across the value ($\mathbb{R}$) axis from $-\infty$ to $\infty$ in the graph of $X$.  The total area of the dots swept up in the graph of $X$ between $-\infty$ and any point $x$ (including $x$ itself) is the value of $F_X(x)$.  This is illustrated in the left hand panels.  Because the value axis is horizontal, the sweeping proceeds from left to right.  The region in the graph that has already been swept out at $x=4.5$ is shaded.  The total shaded area covers one large dot for $a$ ($\mathbb{P}(\{a\})=2/5$) and one small dot for $b$ ($\mathbb{P}(\{b\})=1/5)$).  The total probability swept out so far is $3/5$.  Therefore, as shown in the bottom left graph "CDF," where we can envision the left-to-right sweep occurring in tandem with the sweep in the upper graph, the value of $F_X(4.5)$ equals $3/5 = 0.6$. (This is why I made the value axis horizontal in the graph of $X$, because it enables us to visualize this sweeping process using a conventional graph of the CDF, where the value axis is horizontal and the probability axis is vertical.)
(First order) stochastic dominance
The right panels use these methods to show the same random variable $X$ together with another random variable $Y$ (defined on the same set $\Omega$) that it dominates.  By definition, $X$ dominates $Y$ provided $F_X(x) \le F_Y(x)$ for all values $x$ and, for at least some values $x$, $F_X(x) \ne F_Y(x)$.  Graphically, this means that the solid blue lines and dots in the lower right panel ("CDFs of X and Y") always lie at or beneath the dashed red lines and dots.
Because a CDF can never decrease (probability can only be added in during the sweeping process, never dropped out), this geometric fact is equivalent to the graph of $F_X$ lying to the right of the graph of $F_Y$.  Compared to $Y$, $X$ is shifted towards higher values.  Notice, however, that $X$ is not uniformly greater than $Y$: whereas $X(a)=2,$ $Y(a)=3$ is larger.  Nevertheless, $X$ manages to dominate $Y$ because there is a different subset of $\Omega$ (namely $\{b,c,d\}$) at which $Y$ is clearly inferior to $X$.
The key idea worth pondering is that the probabilities for $X$ and $Y$ depicted in the lower graphs (of the distribution functions) can come from different subsets of $\Omega$.  It is not necessary, for instance, that all the probability associated with $F_X(2)$ (which comes only from $\{a\}$) correspond to the same set associated with $F_Y(2)$ (which comes from $\{b, c, d\}$). In this example the two sets have nothing in common!
Adding and subtracting random variables
Random variables are added and subtracted pointwise.  For instance, the random variable $X-Y$ has the value $(X-Y)(a) = X(a) - Y(a) = 2 - 0 = 2$.  Similar calculations hold for the rest of $\Omega$.  When, for any $\omega\in\Omega$, we add a negative value to $X(\omega)$, that must shift the point for $\omega$ to the left in the graph of $X$, because I have oriented the value axis to point to the right.
The Wikipedia claim
The Wikipedia article on stochastic dominance uses the term "gamble" without definition.  This appears to be a synonym for "random variable" (and the word "state" appears to refer to any element of $\Omega$).  It uses two forms of notation for gambles, apparently interchangeably: "$A$" and "$x_A$" refer to one gamble and "$B$" and "$x_B$" to another.  I will simply use $X$ for the former and $Y$ for the latter.  With this understanding, the article asserts that

If and only if $X$ first-order stochastically dominates $Y$, there exists some gamble $Z$ such that $Y \overset {d}{=} (X+Z)$ where $Z\le 0$ in all possible states (and strictly negative in at least one state), ...

Equivalence in distribution, "$\overset{d}{=}$", simply means that the two distribution functions are the same.  This occurs if and only if their graphs coincide.     Consider how such a coincidence could be made to happen by changing $X$ to $X+Z$: that is, by either keeping the values of $X$ the same or making some of them smaller, we wish to transform the graph of $F_X$ into the graph of $F_Y$.
The figure shows a counterexample to the claim.
In the sweeping-out construction of $F_{X+Z}$, by the time we have swept out the probability through the value $x=2$, the value of $X+Z$ at $a$ must already have been accounted for (since $Z(a)$ can be no greater than $0$).  Therefore, no matter how $X$ is altered by $Z$, the value of $F_{X+Z}(2)$ must be $2/5$ or greater.  Moreover, the graph of $F_{X+Z}$ must exhibit a vertical jump of at least $\mathbb{P}(\{a\})=2/5$ at the point where $x = (X+Z)(a)$, because all the probability of $\{a\}$ is swept up instantaneously there.  But it is obvious geometrically that the graph of $F_X$ cannot be changed in this way to coincide with the graph of $F_Y$, because the latter has no vertical jump this large until $x=3$, which is too late.
When neither graph has any discrete jumps--that is, when both $X$ and $Y$ have continuous distributions--we can systematically alter the values of $X$ to shift the graph of $F_X$ to the left until it coincides with the graph of $F_Y$.  (The proof of this involves either consideration of "infinitesimal" amounts of probability or else a measure-theoretic limiting argument.)
A: Take an unbiased coin. The random variable "Heads" is equal in distribution to random variable "Tails".  The variable "heads" is equal almost surely to Not(Heads).
2 different unbiased coins are also equal in distribution, but they are not equal almost surely... I do not know the value of other coin from knowing value of the first.
A: This is meant to be a comment on @whuber's answer, but I don't have the reputation to do this. @Sycorax turned a previous answer I made into a comment but it was truncated, so I'm reproducing my original post below and adding a reply to @whuber's reply.
The claim on Wikipedia refers to Strassen's theorem -- see e.g. (3) in this note ("first-order stochastic dominance" is just the strict version of the usual stochastic order). It is incorrectly stated, but not for the reason mentioned here. The problem comes from the second part of the sentence "where $y \leq 0$ in all possible states (and strictly negative in at least one state)". The condition in parentheses is not sufficient; instead, this should be and not equal in distribution to 0. Indeed, it is possible to have $X(\omega) \neq 0$ for some $\omega$ and yet have $X$ be equal in distribution to 0.
I don't understand @whuber's post and believe it is incorrect. At any rate, his figure does not show a counter example to Strassen's theorem. The theorem says that we can find a random two random variables $X'$ and $Z$, defined on the same probability space as $Y$, such that (1) $Z$ is almost surely negative (and not equal in distribution to 0) and (2) we have $Y = X' + Z$.
After my initial reply, @whuber's said:

First, $X$ and $Y$ are defined on the same probability space, as they must be. I have updated the figure (in the upper right panel) to make that more clear. Second, this is not a counterexample to Strassen's Theorem, because that theorem (at least in the generality discussed by Lindvall in the note you reference) applies only to complete separable metric spaces, which implies they must have at least a countable number of outcomes, which is not the case in my example.

First, note that in general $X$ and $Y$ need not be defined on the same probability space. It is the new random variable $X'$ such that $Y = X' + Z$ that has to be defined on the same probability space as $Y$ (otherwise that last inequality would make no sense).
Second, every finite (or infinite countable) topological space is separable.
Third, here is one way to obtain the coupling we are looking for: let $F^{-1}_X$ and $F^{-1}_Y$ be the inverse CDFs of $X$ and $Y$ (also known as their quantile function), and let $U$ be a uniform variable on [0, 1]. Then, $F^{-1}_X(U) \sim X$, $F^{-1}_Y(U) \sim Y$ and $F^{-1}_X(U) \leq F^{-1}_Y(U)$.
