If i have the relative proportion for two sample. For example :

group 1:

  • Male: 50%
  • Female: 25%
  • children: 25%

group 2:

  • Male: 50%
  • Female: 20%
  • children: 30%

How can I measure the % of similarity between the two group?

  • $\begingroup$ I made significant edits to your question, especially regarding title and tags. Please, make sure I didn't alter its original meaning. $\endgroup$ – chl Jul 3 '11 at 16:04

You can use a Pearson's chi-squared test. Calculate the average number of people in each demographic across both groups (e.g., how many women were there overall)? Suppose that it's 23%. See how many women that would imply would be in group 1, 11 say. But you actually observed 13 (I'm assuming that there are 50 people in group 1 for concreteness). Take 13, subtract off 11, square this number (2 squared is 4), then divide by the number of women that you expected on average (11). Do this for group 2's women and add these fractions together. Then do the same procedure for men and children and add all these number together. Your result has a chi-squared distribution with 3 degrees of freedom. See the Wikipedia article here for more information

  • $\begingroup$ Can this be also used for continuous variable. like distribution of wage in each group? $\endgroup$ – skyde Jul 3 '11 at 15:45
  • $\begingroup$ @Skyde,, it can be used for any summary statistic that you use to fill the cells in the group-by-demographic table. $\endgroup$ – Charlie Jul 3 '11 at 16:00
  • $\begingroup$ I understand that as long as i split the value for wage in bin i can use each bin as a demographic. But this would mean finding the optimal bin width. :( $\endgroup$ – skyde Jul 3 '11 at 16:04
  • $\begingroup$ @Skyde, I thought that you meant that you wanted to have a table with, say group (1 or 2) along the top and demographic (men, women, or children) along the side, with, say, average wage for each cell inside. That would work. I'm not sure what you're trying to describe now. $\endgroup$ – Charlie Jul 3 '11 at 16:09
  • $\begingroup$ if i have 50 people in each group and for each people the wage. And i want to measure the % of similarity between the two group. The only way i see of doing the chi-squared test is to split wage in demographic 2 (rich and poor) before doing the analysis but it seem like there should be a better way to do that. $\endgroup$ – skyde Jul 3 '11 at 16:53

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.