How do I find medians from a frequency distribution table?
So I have a table that looks roughly like this:
values: 6 5 4 3 2 1
group1: 1 3 0 0 5 1
group2: 3 4 7 0 0 0
group3: 0 0 1 3 4 2
Where the numbers in the group rows indicate how many people selected each value in the first row. There are actually several thousand rows (and 13 possible values) -- the number of people in each group varies wildly.
I have added a row that calculates the mean of that row, and I would like to add an additional column to each row that tells me the median of that row, if it was expanded out (so for group 1 it would be the median of 6,5,5,5,2,2,2,2,2,1 = 2).
I'm having a really hard time figuring out how to do this however. Macros are fine, but I'd prefer avoid them if possible. Help please?
So I have a table that looks roughly like this:
values: 6 5 4 3 2 1
group1: 1 3 0 0 5 1
group2: 3 4 7 0 0 0
group3: 0 0 1 3 4 2
Where the numbers in the group rows indicate how many people selected each value in the first row. There are actually several thousand rows (and 13 possible values) -- the number of people in each group varies wildly.
I have added a row that calculates the mean of that row, and I would like to add an additional column to each row that tells me the median of that row, if it was expanded out (so for group 1 it would be the median of 6,5,5,5,2,2,2,2,2,1 = 2).
I'm having a really hard time figuring out how to do this however. Macros are fine, but I'd prefer avoid them if possible. Help please?