+ Reply to Thread
Results 1 to 6 of 6

Weighted interquartile range

  1. #1
    Registered User
    Join Date
    05-10-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    3

    Weighted interquartile range

    Pls anyone to provide advice on how to compute weighted interquartile range in Excel. I managed to compute weighted median but not sure how to do for weighted IQR

    Thanks

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,437

    Re: Weighted interquartile range

    How did you compute the weighted median? According to this Wikipedia page (https://en.wikipedia.org/wiki/Weight...centile_method ), the weighted median is just a special case of the more general weighted percentile formula. I expect that you should be able to substitute something other than 50 or 0.5 (depending on the formula you used for weighted median) and get the desired weighted percentile (if I understand correct, the 25th and 75th percentile). Then compute your interquartile range.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    05-10-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    3

    Re: Weighted interquartile range

    @Shortly,
    Thanks for the feedback.. I used a previous excel sheet that was shared on this platform. Pls see attached. It allows straight forward calculation of weighted median. In that the values are in one column and weight in another column. but cant figure out how to get the QI and Q3
    The excel file in question was shared by gjlindn here https://www.excelforum.com/excel-pro...ed-median.html

    Thanks

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,437

    Re: Weighted interquartile range

    Do you understand how gjlindn's code? It looks like, rather than use the formula described by Wikipedia, his/her UDF simply makes a new array of "weight" copies of each "value". Then uses the built in WorksheetFunction.Median() function to derive the median. By simply changing WorksheetFunction.Median to WorksheetFunction.Percentile() or .Quartile(), you could return any quartile or percentile you wanted from the UDF.

  5. #5
    Registered User
    Join Date
    05-10-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    3

    Re: Weighted interquartile range

    shorty

    Thanks much!... i am not able to do as described. Can you please populate this in the excel file and share? That will be very much appreaicted

    Thanks

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,437

    Re: Weighted interquartile range

    I am hesitant to "just do it for you" because this edit should be very simple. What have you tried, and what has happened with each attempt?

    Here's a quick edit allowing you to see how to replace the .Median() function with either the .Quartile() function or the .Percentile() function:

    Please Login or Register  to view this content.
    Does that help you see how to use these functions in the UDF?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Calculate Weighted Average within a date range
    By danallamas in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-27-2016, 10:59 AM
  2. Cumulative weighted average of different range
    By dastgir in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-31-2015, 09:35 AM
  3. [SOLVED] Weighted Average, Dynamic Range, Conditional Dashboard
    By MIACG in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-27-2014, 05:32 PM
  4. [SOLVED] Weighted Sum of Positives in a Range
    By odyman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-03-2013, 05:55 PM
  5. [SOLVED] Macro to find the range a value falls in and apply a weighted formula
    By aarho in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-01-2012, 01:11 AM
  6. How to find range, coefficient of variation, interquartile range?
    By stathead in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 12-16-2007, 07:29 PM
  7. Scatter plot with median and interquartile lines
    By ninja-lewis in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-01-2006, 01:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1