We describe two ways to analyze the difference between two means using a non-parametric Bootstrap approach. The first model considers random samples for two populations and analyzes what we can infer about the difference between their means. The second model considers before and after effects of some experiment, to analyze the mean effect.

### Difference between two population means

If the two populations are randomly sampled, we simply estimate the mean of each population separately, and then create a model that randomly draws from the uniform distribution for each mean, and subtracts one from the other to give us our uncertainty about the difference between the means.

### Difference between means before and after a treatment

Consider an experiment where individuals are randomly selected in some fashion (human volunteers or captured animals, for example), and a "treatment" is performed such as administering a drug and looking at the concentration of a biomarker before Bi and some time after Ai the drug is administered for each of the *n* individuals. The random variable is the individuals selected, so in a non-parametric Bootstrap we need to randomize that selection process, but keep the paired nature of the observations. We could create Bootstrap replicates {Bi*,Ai*} for each of the n individuals, but that is simply equivalent to Bootstrapping the difference { Bi*-Ai* } of the biomarker concentration, so this is in fact a univariate non-parametric analysis.