0
$\begingroup$

I have two groups of customers and for each customer I have a proportion of "expensive products" they bought

i.e. expensive products purchased/total number of products purchases.

Which test can I use to decide which group buys more expensive products?

$\endgroup$
-1
$\begingroup$

Two thoughts:

A simple solution for a test of significance is a 1-df $\chi^2$ test of independence on a 2x2 table.

Row 1 is expensive products. Row 2 is inexpensive products. Column 1 is Group A. Column 2 is Group B.

For directionality and magnitude, you can use a logistic regression predicting "expensive item" from group membership where the sample is all purchases. This would make it easy to get an odds ratio and confidence interval for the extent to which the buyer being a member of Group A increases/decreases the odds of the purchase being expensive.

(You can also generate the odds ratio directly from the 2x2 table, but the logistic regression has the advantage of a simple way to get confidence intervals.)

$\endgroup$
  • $\begingroup$ Thanks a lot for the detailed explanation. That was very helpful. $\endgroup$ – Ami Apr 3 '18 at 10:29
  • $\begingroup$ This treats to purchase as the unit-of-analysis and not the individual customer. If I understand the data correctly, Ami has a proportion for each customer, so there is a distribution of proportions within each group. Assuming your proportions are not close to 0 or 1 and your sample sizes are of a decent size, you can do a t-test. Alternatively, you could do a beta regression with customer as the IV. $\endgroup$ – dbwilson Apr 3 '18 at 11:51
  • $\begingroup$ @dbwilson I read the question as saying Ami had the total number of purchases by person, as well, which would make chi-square or logistic fine. If that's not correct, and Ami only has proportions at the individual level as raw data, then you're right. $\endgroup$ – Patrick Malone Apr 3 '18 at 13:28
  • $\begingroup$ But the purchases made by a single person are not independent, so counting them up with all other other purchases to simply get the overall total expensive and inexpensive purchases violates the independence assumption, does it not? $\endgroup$ – dbwilson Apr 3 '18 at 13:38
  • $\begingroup$ I can't use the t-test because my distribution is not normal. I have the data for each customer but I can also calculate the total number. I'm not sure what you mean by "the purchases made by a single person are not independent" @dbwilson I would think they are. I also checked the Chi-square test in IBM SPSS and it seems like it is possible to give the single samples which are later used to build a contingency table and calculate the test values $\endgroup$ – Ami Apr 3 '18 at 14:12
0
$\begingroup$

If you are not familiar with what the "test" you want actually calculates or how it does that, then @Patrick Malone's answer is the way to go, as it provides ideas to look up.

If all you're looking for is an implementation of the $\chi^2$ test, check the prop.test function in R which does exactly that, with a wide range of test outputs and variations (two-sided/one-sided, Yates' correction, own choice of confidence level etc.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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