<?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 Comparing Standard Deviations in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Comparing-Standard-Deviations/m-p/50296#M1082</link>
    <description>&lt;P&gt;I'm trying to write a report that returns any report types where the 1 hour average Duration has exceed the average + 2 Standard Deviations for a running 24 hours.  How can I compare these values?&lt;/P&gt;

&lt;P&gt;I have a query, but the 1 hour average isn't showing up:&lt;/P&gt;

&lt;P&gt;index="prd_common_events" AppCode="MMX" EventName="ReportRun" earliest = -24h latest=now| stats avg(Duration) as avg stdev(Duration) as standdev by ReportType | eval two = 2* standdev | eval avgts = avg + two | append [ search index="prd_common_events" AppCode="MMX" EventName="ReportRun" earliest=-1h latest=now | stats avg(Duration) as nowavg ]&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:48:56 GMT</pubDate>
    <dc:creator>achudnoff</dc:creator>
    <dc:date>2020-09-28T11:48:56Z</dc:date>
    <item>
      <title>Comparing Standard Deviations</title>
      <link>https://community.splunk.com/t5/Reporting/Comparing-Standard-Deviations/m-p/50296#M1082</link>
      <description>&lt;P&gt;I'm trying to write a report that returns any report types where the 1 hour average Duration has exceed the average + 2 Standard Deviations for a running 24 hours.  How can I compare these values?&lt;/P&gt;

&lt;P&gt;I have a query, but the 1 hour average isn't showing up:&lt;/P&gt;

&lt;P&gt;index="prd_common_events" AppCode="MMX" EventName="ReportRun" earliest = -24h latest=now| stats avg(Duration) as avg stdev(Duration) as standdev by ReportType | eval two = 2* standdev | eval avgts = avg + two | append [ search index="prd_common_events" AppCode="MMX" EventName="ReportRun" earliest=-1h latest=now | stats avg(Duration) as nowavg ]&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:48:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Comparing-Standard-Deviations/m-p/50296#M1082</guid>
      <dc:creator>achudnoff</dc:creator>
      <dc:date>2020-09-28T11:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Standard Deviations</title>
      <link>https://community.splunk.com/t5/Reporting/Comparing-Standard-Deviations/m-p/50297#M1083</link>
      <description>&lt;P&gt;First, I have a question: what do you get when you run the two searches independently? That is, what happens when you run&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="prd_common_events" AppCode="MMX" EventName="ReportRun" earliest = -24h latest=now| stats avg(Duration) as avg stdev(Duration) as standdev by ReportType | eval two = 2* standdev | eval avgts = avg + two 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And what happens when you run&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="prd_common_events" AppCode="MMX" EventName="ReportRun" earliest=-1h latest=now | stats avg(Duration) as nowavg
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I think you will get a number of results for the first search (one for each ReportType) and only 1 result for the second search.  I think I would do it this way&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="prd_common_events" AppCode="MMX" EventName="ReportRun" earliest = -24h@h latest=@h | 
fields Duration ReportType |
stats avg(Duration) as avg stdev(Duration) as standdev by ReportType |  
eval avgts = avg + ( 2* standdev ) | 
fields ReportType avgts |
join ReportType  [ search
index="prd_common_events" AppCode="MMX" EventName="ReportRun" earliest = -1h@h latest=@h | 
fields Duration ReportType |
stats avg(Duration) as nowavg by ReportType |
fields ReportType nowavg ] |
where nowavg &amp;gt; avgts
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this works for you!&lt;/P&gt;</description>
      <pubDate>Sun, 13 May 2012 07:35:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Comparing-Standard-Deviations/m-p/50297#M1083</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-05-13T07:35:27Z</dc:date>
    </item>
  </channel>
</rss>

