Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am currently coding a script which displays data for a company intranet. I am stuck with a question that seemed pretty simple, but turned out to give me headaches.

We have the following scenario:

Store A has 70 male customers and 100 female customers - (170 total) Store B has 50 male customers and 230 female customers - (280 total)

Now, I learned that in order to display the average male/female ratio I have to calculate:

(male store A + male store B) / (170 + 280) = X

X * 100 = 28.9% males / 71.1% females

Yet when thinking it over, it doesn't show the real average, because the total number of clients isn't the same (170 vs 280).

So I did a second approach, which is first separating the percentage by store, and then calculating the average percentage:

Males, Store A: (70 / 170) * 100 = 41.2% Males, Store B: (50 / 280) * 100 = 17.9%

And then divide it:

(41.2 + 17.9) / 2 = 29.6%

So in the second case, rounded up, male ratio is 29,6% instead of 27,3%

Then I showed both calculations to somebody who is better in math then me, and he told me that both are wrong. He said I should use "weighted average", but when I do i get exactly the same average percentage like in the first calculation.

What am I doing wrong?

Background: We have a lot of stores, each with a different number of female and male clients. I want to have a percentage of the average client gender, but taking into account the different amount of the guests in each store.

share|improve this question

1 Answer 1

Okay, so I decided to stick to the weighted average method. Here is a good calculator to cross check your results:

http://www.handymath.com/cgi-bin/average.cgi

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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