4
$\begingroup$

Say I have a dataset of penguin weights and the associated penguin gender. This is an unbalanced dataset, eg there is not an equal number of male and female penguins.

I want to bootstrap a confidence interval for the difference in average weight of the male and female penguins, where my point estimate ($\theta^{^}$) is the difference in the mean weight of the male penguins from the mean weight of the female penguins.

While doing the bootstrap replicates, would it be correct to separately bootstrap the males and females, eg for n_boot trials:

1   sample with replacement from the male penguin weights
2   separately sample with replacement from the female penguin weights
3   compute the difference in (mean male penguin weight) - (mean female penguin weight)

OR not account for the class imbalance?

1   sample from replacement from the full dataset and ignore penguin gender
2   Determine mean male penguin weight and mean female penguin weight
3   Take the difference of means from step 2

then from n_boot samples (determined with either approach), compute the upper/lower quantiles for a given confidence level, then construct the confidence interval: (e.g. 2 (\theta^{hat}) - quantile_lower, 2(\theta^{hat}) - quantile_upper).

thank you!

$\endgroup$

1 Answer 1

6
$\begingroup$

It depends a bit on how the sampling was done.

If the imbalance is there by design (we sampled 100 male penguins and 50 female penguins) then you should definitely resample within sex to preserve that feature of the design.

If it just so happens that there's an imbalance you can validly do it either way. There's a case for conditioning on the observed numbers of male and female penguins and doing resampling within sex anyway, since the observed numbers are presumably ancillary in this analysis.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.