<?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 stdev returns zero in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-stdev-returns-zero/m-p/143472#M39854</link>
    <description>&lt;P&gt;this eval expression  &lt;CODE&gt;...|eval TotalOKlw=if(description=="Checkin exitoso", 1, 0) ]|....&lt;/CODE&gt;do you have 0 or 1 values to &lt;STRONG&gt;TotalOKlw&lt;/STRONG&gt;.&lt;BR /&gt;
then when  you make  &lt;CODE&gt;...|stats stdev(TotalOKlw) as STdesv ...&lt;/CODE&gt;&lt;BR /&gt;
it is nomal that you have STdesv=0.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Jun 2015 15:10:15 GMT</pubDate>
    <dc:creator>fdi01</dc:creator>
    <dc:date>2015-06-05T15:10:15Z</dc:date>
    <item>
      <title>Why stdev returns zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-stdev-returns-zero/m-p/143470#M39852</link>
      <description>&lt;P&gt;Hi there,&lt;BR /&gt;
I'm working on this query:&lt;/P&gt;

&lt;P&gt;index=checkin host="&lt;EM&gt;prod&lt;/EM&gt;" earliest=-0d@d latest=now  (description="Intento de checkin*" OR description="Checkin exitoso*") |transaction productId |&lt;BR /&gt;
     eval TotalOK=if(description=="Checkin exitoso", 1, 0)  | &lt;BR /&gt;
         eval time=_time | &lt;BR /&gt;
     bucket time span=10m |&lt;BR /&gt;
     append [search index=checkin host="&lt;EM&gt;prod&lt;/EM&gt;"  earliest=-7d@d latest=-6d@d  (description="Intento de checkin*" OR description="Checkin exitoso*") | transaction productId |&lt;BR /&gt;
         eval time=relative_time(_time,"+7d") |&lt;BR /&gt;
     bucket time span=10m |&lt;BR /&gt;
     eval TotalOKlw=if(description=="Checkin exitoso", 1, 0) ]  |append [search index=checkin host="&lt;EM&gt;prod&lt;/EM&gt;"   earliest=-14d@d latest=-13d@d  (description="Intento de checkin*" OR description="Checkin exitoso*") | transaction productId |&lt;BR /&gt;
         eval time=relative_time(_time,"+14d") |&lt;BR /&gt;
     bucket time span=10m |&lt;BR /&gt;
     eval TotalOKlw=if(description=="Checkin exitoso", 1, 0) ]| append [search index=checkin host="&lt;EM&gt;prod&lt;/EM&gt;"  earliest=-21d@d latest=-20d@d  (description="Intento de checkin*" OR description="Checkin exitoso*") | transaction productId |&lt;BR /&gt;
         eval time=relative_time(_time,"+21d") |&lt;BR /&gt;
     bucket time span=10m |&lt;BR /&gt;
     eval TotalOKlw=if(description=="Checkin exitoso", 1, 0) ]| &lt;BR /&gt;
eval theTime=strftime(time, "%F %H:%M %p") |&lt;BR /&gt;
         stats stdev(TotalOKlw) as STdesv sum(TotalOK) as CheckinToday sum(TotalOKlw) as TOTALOKlw   by theTime | eval CheckinHist=(TOTALOKlw/3) | eval diferencia=CheckinHist-CheckinToday&lt;/P&gt;

&lt;P&gt;I try to compare a historic average with an actual value, I need get the standar deviation for my historics values (3 values) and do some mathematical proportion with the diference to trigger an alarm. But the stdev give me zeros values.&lt;BR /&gt;
What I'm doing wrong?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:11:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-stdev-returns-zero/m-p/143470#M39852</guid>
      <dc:creator>mrcportillo</dc:creator>
      <dc:date>2020-09-28T20:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why stdev returns zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-stdev-returns-zero/m-p/143471#M39853</link>
      <description>&lt;P&gt;A value of "0" makes perfect sense to me.  You individual field values will either be &lt;CODE&gt;0&lt;/CODE&gt; or &lt;CODE&gt;1&lt;/CODE&gt; due to the way you set them and my guess is that the actual values are either all 3 are 0 or all 3 are 1 which gives stdev=0.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2015 13:59:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-stdev-returns-zero/m-p/143471#M39853</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-05T13:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why stdev returns zero</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-stdev-returns-zero/m-p/143472#M39854</link>
      <description>&lt;P&gt;this eval expression  &lt;CODE&gt;...|eval TotalOKlw=if(description=="Checkin exitoso", 1, 0) ]|....&lt;/CODE&gt;do you have 0 or 1 values to &lt;STRONG&gt;TotalOKlw&lt;/STRONG&gt;.&lt;BR /&gt;
then when  you make  &lt;CODE&gt;...|stats stdev(TotalOKlw) as STdesv ...&lt;/CODE&gt;&lt;BR /&gt;
it is nomal that you have STdesv=0.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jun 2015 15:10:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-stdev-returns-zero/m-p/143472#M39854</guid>
      <dc:creator>fdi01</dc:creator>
      <dc:date>2015-06-05T15:10:15Z</dc:date>
    </item>
  </channel>
</rss>

