Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Average within quartiles

I have thousands of rows of data (not sorted).
is there a (easy) way to calculate the average of this data by quartile.
that is average of the bottom 25% of this data, average of next 25% of data
and so on so forth.

Also an added question if we can solve the above is that can i do similar
averages of data on a second column but based on rankings (or quartiles
defined) in the first range?

thanks and looking forward to expert advice as always.

RK
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Average within quartiles

Yes, there is an easy way to calculate the average of data by quartile in Excel. Here are the steps:
  1. Select the range of data that you want to analyze.
  2. Go to the "Data" tab in the ribbon and click on "Sort".
  3. In the "Sort" dialog box, select the column that you want to sort by and choose "Smallest to Largest" or "Largest to Smallest" depending on your preference.
  4. Click "OK" to sort the data.
  5. In a new column, use the
    Formula:
    "QUARTILE.INC" 
    function to calculate the quartile for each row. For example, if your data is in column A and you want to calculate the quartile in column B, you would use the formula
    Formula:
    "=QUARTILE.INC(A1:A100,1)" 
    for the first quartile,
    Formula:
    "=QUARTILE.INC(A1:A100,2)" 
    for the second quartile, and so on.
  6. Once you have calculated the quartile for each row, you can use the
    Formula:
    "AVERAGEIF" 
    function to calculate the average for each quartile. For example, if your data is in column A, the quartiles are in column B, and you want to calculate the average for the first quartile in column C, you would use the formula
    Formula:
    "=AVERAGEIF(B1:B100,1,A1:A100)" 
    .

To answer your second question, yes, you can calculate similar averages for a second column based on the quartiles defined in the first range. You would use the same steps as above, but replace the range in the "AVERAGEIF" function with the range of the second column that you want to analyze.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Average within quartiles

Here is one way that does not use volatile functions. With data in A1:A30

1st
=SUMPRODUCT(($A$1:$A$30<QUARTILE($A$1:$A$30, 1)) * $A$1:$A$30)

2nd
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 1)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 2))* $A$1:$A$30)

3rd
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 2)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 3))* $A$1:$A$30)

4th
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 3))* $A$1:$A$30)

--
HTH...

Jim Thomlinson


"rk0909" wrote:

I have thousands of rows of data (not sorted).
is there a (easy) way to calculate the average of this data by quartile.
that is average of the bottom 25% of this data, average of next 25% of data
and so on so forth.

Also an added question if we can solve the above is that can i do similar
averages of data on a second column but based on rankings (or quartiles
defined) in the first range?

thanks and looking forward to expert advice as always.

RK

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Average within quartiles

Sorry that was sum and not average.

=SUMPRODUCT(($A$1:$A$30<QUARTILE($A$1:$A$30, 1)) *
$A$1:$A$30)/SUMPRODUCT(($A$1:$A$30<QUARTILE($A$1:$A$30, 1)) * 1)

=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 1)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 2))*
$A$1:$A$30)/SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 1)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 2))* 1)

=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 2)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 3))*
$A$1:$A$30)/SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 2)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 3))* 1)

=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 3))*
$A$1:$A$30)/SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 3))* 1)

--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Here is one way that does not use volatile functions. With data in A1:A30

1st
=SUMPRODUCT(($A$1:$A$30<QUARTILE($A$1:$A$30, 1)) * $A$1:$A$30)

2nd
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 1)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 2))* $A$1:$A$30)

3rd
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 2)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 3))* $A$1:$A$30)

4th
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 3))* $A$1:$A$30)

--
HTH...

Jim Thomlinson


"rk0909" wrote:

I have thousands of rows of data (not sorted).
is there a (easy) way to calculate the average of this data by quartile.
that is average of the bottom 25% of this data, average of next 25% of data
and so on so forth.

Also an added question if we can solve the above is that can i do similar
averages of data on a second column but based on rankings (or quartiles
defined) in the first range?

thanks and looking forward to expert advice as always.

RK

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Average within quartiles

thanks guys. You are always a great help.

"Jim Thomlinson" wrote:

Sorry that was sum and not average.

=SUMPRODUCT(($A$1:$A$30<QUARTILE($A$1:$A$30, 1)) *
$A$1:$A$30)/SUMPRODUCT(($A$1:$A$30<QUARTILE($A$1:$A$30, 1)) * 1)

=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 1)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 2))*
$A$1:$A$30)/SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 1)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 2))* 1)

=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 2)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 3))*
$A$1:$A$30)/SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 2)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 3))* 1)

=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 3))*
$A$1:$A$30)/SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 3))* 1)

--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Here is one way that does not use volatile functions. With data in A1:A30

1st
=SUMPRODUCT(($A$1:$A$30<QUARTILE($A$1:$A$30, 1)) * $A$1:$A$30)

2nd
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 1)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 2))* $A$1:$A$30)

3rd
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 2)) *
($A$1:$A$30<QUARTILE($A$1:$A$30, 3))* $A$1:$A$30)

4th
=SUMPRODUCT(($A$1:$A$30=QUARTILE($A$1:$A$30, 3))* $A$1:$A$30)

--
HTH...

Jim Thomlinson


"rk0909" wrote:

I have thousands of rows of data (not sorted).
is there a (easy) way to calculate the average of this data by quartile.
that is average of the bottom 25% of this data, average of next 25% of data
and so on so forth.

Also an added question if we can solve the above is that can i do similar
averages of data on a second column but based on rankings (or quartiles
defined) in the first range?

thanks and looking forward to expert advice as always.

RK

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
Quartiles Mike Dobony Excel Worksheet Functions 1 February 2nd 09 02:55 PM
Upper and lower Quartiles? matt Excel Discussion (Misc queries) 3 March 12th 06 07:35 PM
graphing quartiles..does anyone have a source for how to do this? laurieevan Charts and Charting in Excel 1 September 8th 05 06:52 PM
QUARTILES in Excel Francisco Excel Worksheet Functions 0 August 11th 05 09:35 AM
Calculation Method for Quartiles Mike57 Excel Worksheet Functions 2 January 20th 05 01:49 AM


All times are GMT +1. The time now is 07:11 AM.

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

About Us

"It's about Microsoft Excel"