Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default calculating median and mode

I have a column of the actual data selection, it the adjacent column i have
the frequencies of each of the data collected. How do I calculate median and
mode from that data? can i calculate this directly from the frequencies, or
is there some way i can create a separate column with a whole list of the
data entries using the frequency?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default calculating median and mode

or a better way to put it:
I have the frequency of my data, is there anyway to take the frequency and
create columns of the actual data points?
Take this
Data Frequency
1 5
2 2
3 3
4 4
5 3

and make it
1
1
1
1
1
2
2
..
..
..
or even
1 2 3 4 5
1 2 3 4 5
1 3 4 5
1 4
1
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default calculating median and mode

Hello russell,

Does the data column have duplicates? If not then the modal value is simply
the one that corresponds to the max frequency in that column, i.e.

=INDEX(A:A,MATCH(MAX(B:B),B:B,0))

For the median try this link:

http://www.excelforum.com/showthread...ghlight=median

"russelmiller" wrote:

or a better way to put it:
I have the frequency of my data, is there anyway to take the frequency and
create columns of the actual data points?
Take this
Data Frequency
1 5
2 2
3 3
4 4
5 3

and make it
1
1
1
1
1
2
2
.
.
.
or even
1 2 3 4 5
1 2 3 4 5
1 3 4 5
1 4
1

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default calculating median and mode

One formulas way to re-arrange it as per your option2, viz:

1 2 3 4 5
1 2 3 4 5
1 3 4 5
1 4
1


Source data assumed in cols A and B, data from row2 down

Put in D1:
=IF(INDEX($A:$A,COLUMNS($A:A)+1)=0,"",INDEX($A:$A, COLUMNS($A:A)+1))

Copy D1 across as far* as required to exhaust the data in col A, eg to H1.
Any extra cols in the copy across will just return neat looking blanks: "".
*subject to the max cols per sheet, of course

Then put in D2:
=IF(D$1="","",IF(ROWS($1:1)(INDEX($B:$B,MATCH(D$1 ,$A:$A,0))-1),"",D$1))

Copy D2 across to H2, fill down as far as required to cover at least the max
frequency - 1** (less one line) for any data in col B. Eg if the max
frequency in col B is 10 (say), then just copy down by at least: 10-1= 9
lines. Any extra lines in the copy down will simply return neat looking
blanks: "".
**The formula in D1 across will return the 1st occurence
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"russelmiller" wrote:
or a better way to put it:
I have the frequency of my data, is there anyway to take the frequency and
create columns of the actual data points?
Take this
Data Frequency
1 5
2 2
3 3
4 4
5 3

and make it
1
1
1
1
1
2
2
.
.
.
or even
1 2 3 4 5
1 2 3 4 5
1 3 4 5
1 4
1

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default calculating median and mode

This worked beautifully, thanks max!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default calculating median and mode

welcome, glad to hear that.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"russelmiller" wrote in message
...
This worked beautifully, thanks max!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mkae Mode function return "" instead of #N/A when there is no Mode Tonso Excel Discussion (Misc queries) 2 March 10th 07 05:10 PM
Calculating Median Value in a large array willcozz Excel Discussion (Misc queries) 5 December 11th 06 10:21 PM
Calculating Mode for multiple arrays based on criteria in another AngelaMaria Excel Worksheet Functions 3 November 3rd 06 01:57 AM
Combo Box goes to edit mode even if design mode is in OFF position Chas Excel Discussion (Misc queries) 0 January 7th 05 07:21 PM
coverting answer from Radian mode to degree mode Xmastrzman Excel Worksheet Functions 1 November 10th 04 04:45 PM


All times are GMT +1. The time now is 04:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"