0
$\begingroup$

I have a list of names like the following within group:

Western Group 1
John = 2
Charlie = 3
Hatty = 7
Pete = 4

Western Group 2
Jane = 6
Peter = 5
Dave = 4
Lisa = 4

Eastern Group 1
Dae = 1
Awa = 1
Flad = 6
Daw = 3

Eastern Group 2
Feda = 2
Caveer = 6

The number of groups I can have vary.

My Forumla is like this:

Average Western Group = ((Total of Group 1 / Number of names within group 1) + (Total of Group 2 / Number of names within group 2)) / Number of groups

E.g. in the sample data I've provided it would output the following:

Average Western Group = ((2+3+7+4 / 4) + (6+5+4+4 / 4))/ 2

Then do the same again for the Eastern Groups.

The required value is the median value between Average Western Group and Average Eastern Group like so:

Required Value = (Average Western Group - Average Eastern Group) / 2 + Average Eastern Group

The issue I'm having is that I need a single mathematical equation where I won't know how many groups there will be and I won't know how many names there will be in a group.

I do realise this question is a little odd but is there a way to put this into a single real mathematical equation? I'm wrecking my brain over this. I'm sure its simple but I seem to have hit a brick wall at the moment.

$\endgroup$
2
  • $\begingroup$ that's more of a sum of averages of individual sets of people. the actual average of the western sets would be ${\text{total of set 1+ total of set 2}\over\text{number of sets $\cdot$ (number of people in set 1 + number of people in set 2)}}$ $\endgroup$
    – user451844
    Commented Sep 14, 2017 at 0:55
  • $\begingroup$ okay that's the arithmetic mean to be more technical. $\endgroup$
    – user451844
    Commented Sep 14, 2017 at 1:01

1 Answer 1

0
$\begingroup$

Given a line such as this:

Average Western Group = ((Total of Group 1 / Number of names within group 1) + (Total of Group 2 / Number of names within group 2)) / Number of groups

You can make it universal by substituting in a variable for a group. For example, name terms n1, n2, n3 ... infinitely. The Western group 1 would = (n1+n2+n3...)/number(n)

Hope this helps

$\endgroup$
1
  • $\begingroup$ The issue is as you've written n1+n2+n3... I'd need an equation where I wouldn't have to specify the exact number of groups since the number of groups are a variable in itself $\endgroup$ Commented Sep 14, 2017 at 1:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .