Estimating $\mathbb{P}(Y>X)$ from samples of $X$ and $Y$ using bootstraps Let's say we have two independent 1-dimensional random variables $X$ and $Y$ and we want to estimate $\mathbb{P}(Y>X)$. 
Say we take a sample of size $N$ of $X$ and a sample of $Y$ of size $M$.
Is the following approach reasonable?


*

*I draw 100 bootstrap samples of $X$. I take the mean of each bootstrap sample to build my belief of $\mathbb{E}[X]$ which I denote $p\left(\mathbb{E}[X]\right)$.

*I draw 100 bootstrap samples of $Y$. I take the mean of each bootstrap sample to build my belief of $\mathbb{E}[Y]$ which I denote $p\left(\mathbb{E}[Y]\right)$.


I estimate $\mathbb{P}(Y>X)$ as  $\int p\left(\mathbb{E}[Y]\right) - p\left(\mathbb{E}[X]\right) \;\mathbb{I}\left[{p(\mathbb{E}[Y]) > p(\mathbb{E}[X])}\right]$
 A: No, it doesn't make sense. The expectation of $X$ and $Y$ has very little to do with the $P(Y>X)$. 
Also, the notation $p(E[Y])$ doesn't make sense because $E[Y]$ is just a number, i.e. there is no probability distribution associated with it.
Here is what you want 
$$ \begin{array}{rl}
P(Y>X) = E[I(Y>X)] \approx \frac{1}{M}\sum_{m=1}^M I\left(Y^{(m)}>X^{(m)}\right).
\end{array} $$
where $Y^{(m)},X^{(m)}$ are samples from the joint distribution of $Y$ and $X$ and $I()$ is the indicator function that is 1 when the statement within the parentheses is true and 0 otherwise.
If $Y$ and $X$ are independent, you can sample $Y$ and $X$ independently from their marginal distributions.
A: The problem does not require bootstrap:
Since$$\mathbb{P}(X>Y)=\int \mathbb{I}_{x>y} \text{d}F_X(x)\text{d}F_Y(y)=\int F_Y(x)\text{d}F_X(x)$$an estimate based on the empirical cdfs of $X$ and $Y$, $\hat{F}_X$ and $\hat{F}_Y$, respectively, is$$\frac{1}{M}\sum_{i=1}^M \hat{F}_X(y_i)=\frac{1}{M}\sum_{i=1}^M \frac{1}{N}\sum_{j=1}^N\mathbb{I}_{x_j>y_i}$$for which one does not need bootstrap.
