<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why is the result of the median function incorrect when the total number of values is an even number? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130103#M184533</link>
    <description>&lt;P&gt;oh...thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 18 Sep 2014 14:09:57 GMT</pubDate>
    <dc:creator>HeinzWaescher</dc:creator>
    <dc:date>2014-09-18T14:09:57Z</dc:date>
    <item>
      <title>Why is the result of the median function incorrect when the total number of values is an even number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130101#M184531</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I think the median calculation is incorrect when the total amount of values is an even number. &lt;/P&gt;

&lt;P&gt;An example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;359
282
224
150
60
52
8
1
0
0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Splunk tells me the median is 60, but it should be 56.&lt;BR /&gt;
In this case there is a pair of middle numbers and the median should be calcualted by median=(60+52)/2&lt;/P&gt;

&lt;P&gt;Am I correct?&lt;/P&gt;

&lt;P&gt;BR&lt;/P&gt;

&lt;P&gt;Heinz&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2014 13:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130101#M184531</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2014-09-18T13:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the result of the median function incorrect when the total number of values is an even number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130102#M184532</link>
      <description>&lt;P&gt;That's the documented behaviour as per &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/CommonStatsFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/CommonStatsFunctions&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;median(X): This function returns the middle-most value of the field X.
           Note: The median calculation is more correct for odd numbers of events. In cases where you have
           an even number of events, the median is approximated to be the higher of the two values.
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 18 Sep 2014 14:05:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130102#M184532</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-09-18T14:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the result of the median function incorrect when the total number of values is an even number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130103#M184533</link>
      <description>&lt;P&gt;oh...thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2014 14:09:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130103#M184533</guid>
      <dc:creator>HeinzWaescher</dc:creator>
      <dc:date>2014-09-18T14:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Why is the result of the median function incorrect when the total number of values is an even number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130104#M184534</link>
      <description>&lt;P&gt;That obviously doesn't rule out filing an Enhancement Request with Splunk Support to implement a more accurate &lt;CODE&gt;median()&lt;/CODE&gt; function...&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2014 14:12:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-the-result-of-the-median-function-incorrect-when-the/m-p/130104#M184534</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-09-18T14:12:27Z</dc:date>
    </item>
  </channel>
</rss>

