Statistical Test for dollar losses in A/B test where losses depend on sales I'm trying to analyze the results of an A/B test, specifically around losses.  We had two groups, who had bought something, and then were put into our A/B test to minimize potential losses from their purchases.  So our treatment did not affect their purchase volume, but potentially the subsequent losses.
Say we have two groups: A: losses = $500, purchases = $1500
B: losses = $520, purchases = $1550
The loss amount is partly dependent on our treatment (we did something to try to reduce losses), but also on the purchases (if people buy more, they are more likely to have losses, just because of greater volume).
So if I do a t-test on the losses, I'm ignoring the effect of the purchase amounts.  However, if I do a proportions test, I am 'fooling' the test into thinking I had (500, 520) successes and (1500, 1550) trials, which is not really the case.
What's the right approach here?  Thank you!!
A: One possibility is to test the difference in losses as a proportion of sales. 
I would do this for each person, before combining into groups.  So, if you have 100 people in each group, then you would calculate 200 proportions of losses as sales, then do a t-test on the proportions. 
Another is to do a regression with loss as the dependent variable and group and purchase as the independent variables.
However, if people were not randomly assigned to groups, then you'd have to account for that (neither of the above would be correct). 
