Test to show one distribution is bigger than another Here is a MWE of my problem:
I measure the size, $S$, of 10 red apples and 32 green apples.
$\bar S_\mathrm{red} = 8 \pm 1\,\mathrm{cm}$ and $\bar S_\mathrm{green} = 4 \pm 2\,\mathrm{cm}$.
I want to claim that red apples are bigger than green apples, but just reporting the means doesn't feel right because there is a distribution of sizes for each colour.
Ideally, I want to say something like "Red apples are bigger than green apples with 95% certainty."
I was going to just Monte Carlo it, taking a few thousand samples randomly from each and seeing how frequently red is bigger than green, but I feel there is some test for what I'm after.
 A: You can resort to the bootstrap version of Student's t-test. 
It works as follows:


*

*Compute the sample mean and standard deviation for each group and
label the results $X_1$ and $s_1$ for group 1, and $X_2$ and $s_2$ for group 2. Set $d_1=\frac{s_1^2}{n_1}$ and $d_2=\frac{s_2^2}{n_2}$, where $n_1$ and $n_2$ are the sample sizes.

*Generate a bootstrap sample for the first group, compute the sample mean and standard deviation, and label the results $\bar{X_{1}}^{*}$ and $s_{1}^{*}$. Do the same for the second group. Note $d_{1}^{*}$ and $d_{2}^{*}$ accordingly.

*Compute $$ W^{*} = \frac{(\bar{X_{1}}^{*}-\bar{X_{2}}^{*})-(\bar{X_{1}}-\bar{X_{2}})}{\sqrt{d_1^2+d_2^2}}.$$

*Repeat Steps 2 and $B$ times ($B$=1000, for example).

*Put the $W_1^{*},...,W_B^{*}$ in ascending order, yielding $W_{(1)}^{*},...,W_{(B)}^{*}$.

*Set $L=\frac{\alpha}{2}B$ and $U=(1-\frac{\alpha}{2})B$ and round each of them to the nearest integer.

*The bootstrap t confidence interval for $\mu_1-\mu_2$ is 
$$ \Big[ (\bar{X_{1}}-\bar{X_{2}}) + W_{(L)}^{*} \sqrt{d_1+d_2},  (\bar{X_{1}}-\bar{X_{2}})+W_{(U)}^{*} \sqrt{d_1+d_2} \Big] .$$
Assuming that group $1$ corresponds to red apples and group $2$ to green apples, you reject the null hypothesis if and only if $0$ is not located within the calculated confidence interval.
I used the presentation from Chapter $6$ in 

Wilcox, R. (2010). Fundamentals of Modern Statistical Methods: Substantially Improving Power and Accuracy. Springer Science & Business Media.

