Find the median of a set of data

I have a table that looks like this:

Range

Set of data: range values

Data set b: range values

0.00 - 0.99

35

67

1.00 - 1.99

35

40

2.00 - 2.99

49

54

3.00 - 3.99

41

45

4.00 - 4.99

36

38

5.00 - 5.99

31

34

6.00 - 6.99

22

29

7.00 - 7.99

30

20

8.00 - 8.99

24

16

9.00 - 9.99

16

11

10.00 - 10.99

15

10

11.00 - 11.99

12

5

12.00 - 12.99

11

1

13.00 - 13.99

5

2

14.00 - 14.99

5

1

15.00 - 15.99

2

0

16.00 - 16.99

1

0

17.00 - 17.99

2

0

18.00 - 18.99

1

0

How can I find the median interval for each set of data (A and B)?

Thanks for your help!

Median and range are two different things from what I remember. Can you please send a link to a Web site that could describe what a "median line"?

Median is the average of a set of data (even counting data sets usually take the average < average > the values of two intermediate points)

Range is simply the max - min.

Jason

Tags: iWork

Similar Questions

  • To find the months and days between 2 dates

    Hello

    I want to find the months and days between 2 dates.

    For example.

    1 - Date: August 25, 2013

    2 - Date: October 23, 2013

    If we consider each month 30 days, it should give

    August 25, 2013 to August 30, 2013 = 6 days

    01-Sep-2013-30-Sep-2013 = 1 month

    October 23, 2013 to October 30, 2013 = 8 days

    Total = 1 month and 14 days.

    Kindly help as soon as possible.

    Thanks and greetings

    Suresh

    Assuming that d2 > d1,.

    where d)

    Select sysdate d1, sysdate + 56 double d2

    Union all select to_date (March 1, 2013 ',' dd-mon-yyyy "") d1, to_date (March 31, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (5 February 2013 ',' dd-mon-yyyy ') d1, to_date (March 31, 2013 ',' dd-mon-yyyy "") double d2

    Union all select to_date (February 25, 2013 ',' dd-mon-yyyy "") d1, to_date (March 23, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (February 25, 2013 ',' dd-mon-yyyy ') d1, to_date (March 31, 2013 ',' dd-mon-yyyy "") double d2

    Union all select to_date (August 2, 2013 ',' dd-mon-yyyy "") d1, to_date (29 October 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (February 1, 2013 ',' dd-mon-yyyy "") d1, to_date (May 31, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (25 August 2013 ',' dd-mon-yyyy "") d1, to_date ('03-Sep-2013', 'Mon-dd-yyyy') d2 double

    Union all select to_date (July 30, 2013 ',' dd-mon-yyyy "") d1, to_date (August 31, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date (July 31, 2013 ',' dd-mon-yyyy ') d1, to_date (August 30, 2013 ',' dd-mon-yyyy "") double d2

    Union all select to_date (July 31, 2013 ',' dd-mon-yyyy ') d1, to_date (3 August 2013 ',' dd-mon-yyyy "") double d2

    Union all select to_date (3 July 2013 ',' dd-mon-yyyy "") d1, to_date (August 31, 2013 ',' dd-mon-yyyy ') d2 double

    Union all select to_date ('31-08-2013', ' dd-mm-yyyy'), to_date('05-10-2013','dd-mm-yyyy') of the double

    Union all select to_date ('05-02-2013', ' dd-mm-yyyy'), to_date('31-03-2013','dd-mm-yyyy') of the double

    Union all select to_date ('05-02-2013', ' dd-mm-yyyy'), to_date('05-03-2013','dd-mm-yyyy') of the double

    Union all select to_date ('05-02-2013', ' dd-mm-yyyy'), to_date('05-02-2013','dd-mm-yyyy') of the double

    )

    Select d1, d2,

    1 + 30 * trunc (months_between (d2, d1)) + LESS (extract (day of d2), 30)-LESS (excerpt (d1 day), 30)

    + CASE when extracted (d2 day)< extract(day="" from="" d1)="" then="" 30="" else="" 0="" end ="">

    d

    D1 D2 DAYSBETWEEN

    ----------- ----------- -----------

    October 10, 2013 5 December 2013 56

    March 1, 2013 30 March 31, 2013

    5 February 2013 March 31, 2013 56

    February 25, 2013 March 23, 2013 29

    February 25, 2013 March 31, 2013 36

    August 2, 2013 29 October 2013 88

    February 1, 2013 may 31, 2013 120

    August 25, 2013 03 - Sep-2013 9

    July 30, 2013 31 August 31, 2013

    July 31, 2013 August 30, 2013 31

    July 31, 2013 3 August 2013 4

    July 3, 2013 August 31, 2013 58

    31 August 2013 5 October 2013 36

    5 February 2013 March 31, 2013 56

    5 February 2013 March 5, 2013 31

    February 5, 2013 February 5, 2013 1

    In my view, which corresponds to your rules.

  • find the difference in days between two dates

    Hello world

    I'm trying to find out the difference in days between two dates and the execution of the query that I'm passing

    SELECT TO_char(sysdate, 'dd/mm/yyyy') - TO_char('15/11/2011', 'dd/mm/yyyy') DAYS FROM DUAL

    the error I get is

    ORA-01722: invalid number
    01722 00000 - "invalid number."
    * Cause:
    * Action:

    Could someone please help.

    Thanks in advance

    user10636796 wrote:
    Hello world

    Thanks a lot for all the replies. I am trying to apply it in a statement to my table like this

    SELECT trunc (sysdate) - TO_char (date_last_recommended, ' dd/mm/yyyy') DAYS OF recommendation;

    SELECT trunc (sysdate) - TRUNC (date_last_recommended) DAYS OF recommendation;

  • find the first occurrence of a digital data in a string

    Hello

    Can you please suggest me in this.

    I have a set of data, as follows...

    'LOMBORD 123'.
    'LOMBORDD '.
    'LOMBORDD45 '.

    Here how I ffind the first occurrence of the applied digital of each string, it can be a character space as 'LOMBORD 123'.

    My version of the database is 9i I can't use the regular expression.

    Thanks in advance

    Hello

    You can try:

    MHO%xe> with t as (
      2  select 'LOMBORD 123' col from dual union all
      3  select 'LOMBORDD'  from dual union all
      4  select 'LOMBORDD45'  from dual
      5  )
      6  select col
      7  ,      substr(col, instr(translate(col, '0123456789', '0000000000'), '0', 1, 1), 1 ) the_number
      8  ,      instr(translate(col, '0123456789', '0000000000'), '0', 1, 1) the_position
      9  from t
     10  where  instr(translate(col, '0123456789', '0000000000'), '0', 1, 1) > 0
     11  /
    
    COL         THE_ THE_POSITION
    ----------- ---- ------------
    LOMBORD 123 1               9
    LOMBORDD45  4               9
    
  • Find the last valid value in a date range

    The data I work with represents readings from different instruments. A follow-up field of a sum running while this number continues to increase. I need to look at the data for a particular date, but the problem is that sometimes the instrument is turned off. In this case there is no data for that date, however since all I want is the total sum for the signal on this instrument, I need to keep going until I find the latest valid data in the database that would represent the sum up to this point. How can I design a query or procedure that would deal with this eventuality? Some examples of data:
    PV_ID                  SMPL_DTE                  INTEG_SINCE_VAL 
    ---------------------- ------------------------- --------------- 
    271                    20-JUL-08 12.05.00 AM     6172.0387459767 
    271                    20-JUL-08 12.06.00 AM     6172.0387459767 
    271                    21-JUL-08 12.05.00 AM     6172.0387459767 
    271                    21-JUL-08 12.06.00 AM     6172.0387459767 
    271                    21-JUL-08 08.43.00 AM     6172.0387459767 
    271                    21-JUL-08 08.45.00 AM     6172.0387459767 
    271                    22-JUL-08 12.05.00 AM     6172.0387459767 
    271                    12-AUG-08 04.45.00 PM     6172.0387459767 
    271                    12-AUG-08 04.50.00 PM     6172.038748687284 
    So, if for example I run a query for July 30, I would need to get the result of the July 22 because it is the last valid number. PV_ID represents the ID of the instrument and the INTEG_SINCE_VAL of the total cumulative for signal readings on this instrument.

    Published by: Solerous on March 16, 2009 07:23

    Published by: Solerous on March 16, 2009 07:25

    Hello

    If you want the last row or before a given date of the target as on July 30, 2008)?

    Here's a way

    SELECT  *
    FROM    (
            SELECT    *       -- or whatever columns you want
            FROM      table_x
            WHERE     sample_dte < TO_DATE (:target_dte, 'DD-MON-RR') + 1     -- See note below
            ORDER BY  sample_dte DESC
            )
    WHERE   ROWNUM = 1;
    

    NOTE: the above query adds a day to the current deadline, but selects the lines that are less important (not equal to) that link, so if you enter 30 July 08, it compares against 31 July 08, so he would choose anything on the date target itself, no matter what time. In other words, if you ask 30 July 08, you could get something later than 30 July 08 23:59:59, but you wouldn't get 31 July 08 12:00:00 AM.

  • A loop in the case of 2 sets of data

    Hi all..

    I have 2 sets of data for my BI report... a sql query and the other as a data model. Two of them use the same data source. I had to go for 2 sets of data as clob data are not supported by the data model (html tags are not recognized...). so for the clob data, I use a separate dataset (sql query)... If I run the report to say... all the key_id... my example of xml file looks like below...
    <DATA>
    <Dataset1>
    <DATATEMPLATENAME>
    <P_ID/>
    <LIST_G_MAIN>
    <G_MAIN>
    <KEY_ID>52</KEY_ID>
    <LIST_G_RF>
    <G_RF>
    <COMPANY_NAME>XYZ</COMPANY_NAME>
    </G_RF>
    </LIST_G_RF>
    <LIST_G_DETAILS>
    <G_DETAILS>
    <GROUP>Value</GROUP>
    </G_DETAILS>
    </LIST_G_DETAILS>
    </G_MAIN>
    <G_MAIN>
    <KEY_ID>53</KEY_ID>
    <LIST_G_RF>
    <G_RF>
    <COMPANY_NAME>ABC</COMPANY_NAME>
    </G_RF>
    </LIST_G_RF>
    <LIST_G_DETAILS>
    <G_DETAILS>
    <GROUP>ValueXYZ</GROUP>
    </G_DETAILS>
    </LIST_G_DETAILS>
    </G_MAIN>
    </LIST_G_MAIN>
    </DATATEMPLATENAME>
    </Dataset1>
    <Dataset2>
    <DATASET2_ROW>
    <KEY_ID>52</KEY_ID>
    <CLOB>saldsafslfaf,nfdfidfsdksflsfdfdsdfsdfsfsdjjj</CLOB>
    </DATASET2_ROW>
    <DATASET2_ROW>
    <KEY_ID>53</KEY_ID>
    <CLOB>yyyyyyyyyyyyyyyyyyyyyyyyy</CLOB>
    </DATASET2_ROW>
    </Dataset2>
    </DATA>
    I'm looking for output something like...

    Company name: XYZ
    Group: value
    CLOB:
    saldsafslfaf, nfdfidfsdksflsfdfdsdfsdfsfsdjjj

    Company name: ABC
    Group: Valuexyz
    CLOB:
    yyyyyyyyyyyyyyyyyyyyyyyyy

    How should the closure be done? pointers...

    Thanks in advance...

    create the variable

    Key id = >
    name of the computer =
    GRP name =
    CLOB =

  • How to find the number of days between 2 date elements in the XSLT file

    Hello

    I need to calculate the number of days between 2 date elements (type xs: date). Can you please direct me as to how I can do the same thing.

    I work in 11g and using XSLT 1.0. I tried several options but yet to get a solution for this. I think that this can be done also using XSLT 2.0, but who has not worked for me.

    Can someone please help with this problem, thanks in advance!

    Thank you
    Anju

    Hello

    Have you seen this message?
    Re: Get the Date difference between 2 values of date in days

    You can do in the XSLT file since the dates are in ISO 8601 format.
    http://www.w3.org/TR/NOTE-datetime

    Here is a sample XSLT...

    
    
    
    
    
    
    
    

    The XSLT above will result in * 4 * for the next entry...

    
    2012-01-11T00:00:00.000-05:00
    2012-01-15T00:00:00.000-05:00
    
    

    You can test this example here...
    http://xslttest.appspot.com/

    I hope this helps...

    See you soon,.
    Vlad

    It is considered good etiquette to the answerers rewards with points (as "useful" - 5 pts - or 'correct' - 10pts)
    https://forums.Oracle.com/forums/Ann.jspa?annID=893

  • Hello, I am using Firefox for Android on Nook HD +. Cannot find the home button to set up the home screen.

    I want to be able to start with and go back to the home screen, but I did not because I can create one using the button on the home screen. Please help, thanks, Tony.

    If you want a search engine to be your "home page" when you open Firefox, you should always keep your favorite search engine on an open tab, like www.google.com . You will need to do some work to keep it open, as ensuring that this search engine was the last tab that you had open before leaving Firefox. Now, go to Settings - customize - tabs - and make sure it is set to "always restore." Now, if you open tabs before you quit Firefox you do not close, the last of them opens and can technically be your "homepage". Now you can open your e-mail login page too, as long as it was under the tabs open in firefox. Hope this helps some!

  • Cannot find the location because there is no data app

    * Original title: W Vista AppData help files

    Dear Sir/dear Madam, I have difficulties with three things

    1. I can't convert my netbook with Windows 7 Starter for the free update to Windows 10.

    2. I can't convert my laptop with Vista for the free update to Windows 10.

    3. I can not find C:\Users\Florida Council\AppData\Roaming\Microsoft\Templates\ on my laptop.

    I'm not C:\Users\Florida Council\, but there is no AppData folder.

    Jim Coppens, Florida, Chairman of the Board.

    Hold the Windows Logo and type a R (WinLogo + R), or click on the Start button and click on 'run '.

  • How to find the difference "within weeks" between two date values?

    Hi all

    Jdev version 11.1.1.7.1

    I used two < af:inputDate > & a < af:inputText > < af:panelFormLayout > components. My requirement is, I want to display the difference of weeks between these two day values in the inputText component when the user clicks the shape.

    Any suggestion would be appreciated.

    Kind regards


    Novel

    You can use this method to get the number of days between the day and date, and then divided by 7 to get the number of weeks

    public static long getDifferenceDaysBetweenTwoDates (d1, d2 oracle.jbo.domain.Date oracle.jbo.domain.Date)

    {

    If (d1! = null & d2! = null)

    {

    return (d1.getValue () .getTime () - d2.getValue () .getTime ()) / (24 * 60 * 60 * 1000);

    }

    return 0;

    }

    Check - http://sameh-nassar.blogspot.in/2014/10/dealing-with-dates-in-java.html

    Ashish

  • Use the attribute as a set of data and analysis of these data

    Hello world
    I present below a challenge (a little) with the use of attributes in XQuery. Consider the following XML document:

    < showroom >
    < car id = "1" >
    < name > Clio < / name >
    < family > Renault < / family >
    < / car >
    ...
    < id car = "n" >
    < name > Q5 < / name >
    Audi > family < < / family >
    < / car >
    < / showroom >

    Each customer of the showroom is identified by a unique Id (for example, 1,2,3,...). Then, I want to add some data to my XML document that must represent, for each car, all of the IDs of all the customers who have rented this car.
    The desired XML document might look like this:

    < showroom >
    < car id = "1" >
    < name > Clio < / name >
    < family > Renault < / family >
    + * < history > * +.
    + * < client id = "2" / > * +.
    + * < client id = "23" / > * +.
    + * < / history > * +.
    < / car >
    ...
    < id car = "n" >
    < name > Q5 < / name >
    Audi > family < < / family >
    + * < history > * +.
    + * < client id = "56" / > * +.
    + * < / history > * +.
    < / car >
    < / showroom >

    However, using elements to represent the historic location, size of the document will increase considerably.
    As I only use IDs of the IEN, y at - it a way to represent historical data using only the attributes? +.
    In the following document, id of the IEN are represented, as a whole, through the +@history+attribute:
    < showroom >
    < car id = '1' history = '2.23' >
    < name > Clio < / name >
    < family > Renault < / family >
    < / car >
    ...
    < id car = history of "n" = "56" >
    < name > Q5 < / name >
    Audi > family < < / family >
    < / car >
    < / showroom >

    However, y at - there no way to check if a given id = 'x' car was rented by a customer Id = 'y'? +.
    Does anyone know how to represent historical data (sequence of identity of customers), using only the attributes and how to search for a given id of customer as explained above?
    Please suggest. I appreciate your help.

    OK, I thought that you already have a document that stores the relationship between customers and cars.

    Here is an example that will insert or update the attribute of history:

    let $carId := 3
    let $clientId := 56
    return
     copy $doc := fn:doc("c:\dev\xml\showroom.xml")
     modify (
      for $i in $doc/showroom/car
      where $i/@id = $carId
      return if (exists($i/@history))
              then replace value of node $i/@history with concat($i/@history,",",$clientId)
              else insert node attribute history {$clientId} into $i
     )
     return $doc
    

    However, if we are reasoning in terms of standardization, it is better to have these relationships stored as separate elements, be it in the showroom or another XML document. Then you could simply perform a join or use a nested FLWOR expression to retrieve historical data.

    To check if the attribute contains a given customer id:

    let $carId := "3"
    let $clientId := "56"
    let $doc := fn:doc("c:\dev\xml\showroom.xml")
    return fn:exists(fn:tokenize($doc/showroom/car[@id=$carId]/@history, ",")[.=$clientId])
    

    She will return a Boolean value.

    Published by: odie_63 on March 8, 2012 20:19

  • Find the average of a set of times

    Hi all

    I have a spreadsheet with 52 pages (weeks of the year, sort of a planner) and every day I type in my wake-up time. Until the end of the week there are 7 times, then a column that has successfully made the average at that time. (see below) using this formula: AVERAGEIF(A3:G3,">5:59",A3:G3)

    I intentionally do include only periods after 05:59 in the formula.

    As you can see it does that very well. All the averages for each week are then sent to an "annual" table on another page (see below)

    The problem when coming to this second table, each average weeks appears in the average annual table always shows the last time which was received (in this case, 09:22). In other words, it does not indicate the average. The formula I use for this table is: AVERAGEIF(C2:BC2,">5:59",C2:BC2)

    So what on earth am I doing wrong?

    Thank you :-)

    I can't read anything in the second table you have posted... it's too small.

    Perhaps to show how the weekly averages go weekly table at the annual table.

  • Where can I find the "remember each folder setting" option in Windows 7.

    I thought it was possible in previous versions of Windows to check 'on' that Windows should remember from each separate folder view that I chose.
    Sometimes I want to 'list '; Sometimes the "large icons", but I want Windows to remember for each folder separately.

    Hi, Lucas,.

    This implies to modify the Windows registry. Remember to create a backup of the registry before making changes.

    Changes in the size, the view, the icon or the position of a file are lost

    http://support.Microsoft.com/kb/813711

    If it is by default this option is no longer available.  If you do not want to see that it implemented in future generations, add your comments on this form

    Same topic:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-files/is-remember-each-folders-view-settings/633192ab-E435-48CD-8fcd-999e7195653c

  • Where can I find the version numbers more up-to-date applications?

    I'm looking for a place that simply shows the version numbers more recent applications, that it becomes difficult to understand.

    You are looking for something like this in a list that is updated:

    • Adobe Photoshop
      • last: 2015.5
    • Adobe Premiere
      • last: 2015.3
    • ........

    It sounds like something, adobe would have listed publicly somewhere.   If they don't, it would be something to be considered as a useful tool for users.

    You can check the latest version of update at the bottom of the link, it is indexed properly as well as version numbers:

    2015 all updates of Adobe CC: Direct for Windows download links | ProDesignTools

  • Find the date in clob data

    Hi all

    In the abc table, I would find the Id name if any later date is available in the variable 'data' (CLOB data type).

    I'm not able to go forward. can someone help me

    Output must be Id 102 and 103, the date indicated is greater than the current date.

    with abc as

    (

    Select 101 as id, 'Prime Minister arrived in Melbourne for the last leg of his tour of four cities in Australia on March 1, 2014 "as double data

    Union

    Select 102, "the prior reading of Singapore third quarter December 1, 2015 showing no response" of the double

    Union

    Select 103, ' there is no symptom of Malaria after December 15, 2104 meaning vaccine properly work ' from dual

    )

    Select * from ABC

    where the data like "trunc (sysdate) %.

    Thanks in advance

    This model ' [(0123456789)] + [()] + ((Jan) |) () Feb) | (Mar) | (APR) | (May). (Jun) | (Jul) | (August). (MS) | (Oct) | (Nov). (Dec)) [()] + [(0123456789)] +' finds the appropriate data now or later, does not matter.  We can use this model.

    use regexp_count with this model.  regexp_count returns "there are how many days" to open this model.

    using regexp_count for your sql output:

    ___regexp_count___ your data                                                              

    2 Prime Minister arrived in Melbourne, for the last leg of his tour of four cities in the Australia, March 1, 2014 and April 3, 2100
    2 The r1eading of 234/12 ahead of Singapore December 1, 2012, for the third quarter on December 1, 2015, showing no response
    1 There is no malaria symptom Minister after November 19, 2014 meaning vaccine properly work

    help link for regexp: Oracle of regular Expressions

    hope this helps

    Celal Ozdemir

Maybe you are looking for

  • IQ524: find product key number

    I have an IQ524 all-in-one computer, I received the computer with Vista and a few months later I received a package of HP discs for windows 7, in which I installed quickly. I want to install windows 10. I just found out that I can go to Cnet, who sen

  • Second disk hard cable/accessory

    Hello world I have a HP ENVY laptop 17TS and want to add a SSD drive.  I see that there is an empty drive Bay.  Where can I find the cable/connector and associated kit disc?  I could not find on the HP.COM site. Thank you very much in advance, Dinesh

  • Windows xp Task Scheduler service does not start

    I have a problem with the Task Scheduler in XP SP3 (home edition) service. The service is configured to start automatically, but hangs during startup and the State is 'starting' permanently In this State, I can't start or stop the service manually. 

  • The mouse cursor does not display in Windows Media Player

    When I start Media Player I don't see the cursor of the mouse to control anything. I use the Task Manager to close the windows media player.

  • On a start box appears and says can not find.ini:d\driver\chipset\asussetup_hotfix.ini

    My computer starts up fine but when the screen shows Office I get two error boxes that say can not find.ini:d\driver\chipset\asussetup_hotfix.ini It seems to be looking for drivers for Asus in my DVD player. All the drivers are installed and everythi