<?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: different results of mean after sorting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414960#M101716</link>
    <description>&lt;P&gt;This exact problem has been discussed in great length. Please search today's posts, and you will find the answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But why are you posting this anyway, a duplicate of an earlier thread? Is it homework?&lt;/P&gt;</description>
    <pubDate>Mon, 20 Nov 2017 21:25:17 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2017-11-20T21:25:17Z</dc:date>
    <item>
      <title>different results of mean after sorting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414959#M101715</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have set with one numeric variable which gives me different results of mean when sorted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;data b;&lt;/DIV&gt;&lt;DIV&gt;format a best20.;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;input a;&lt;/DIV&gt;&lt;DIV&gt;datalines;&lt;/DIV&gt;&lt;DIV&gt;0.187&lt;/DIV&gt;&lt;DIV&gt;0.171&lt;/DIV&gt;&lt;DIV&gt;0.183&lt;/DIV&gt;&lt;DIV&gt;0.08&lt;/DIV&gt;&lt;DIV&gt;;&lt;/DIV&gt;&lt;DIV&gt;;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc sort data=b; by a;run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;proc summary data=b nway missing noprint&amp;nbsp; &amp;nbsp; mean&amp;nbsp; ;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;var a;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;output out = out_b&amp;nbsp; mean=mean&amp;nbsp; ;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;result when sorted =&lt;SPAN&gt;0.15525&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;result when not sorted =&amp;nbsp;&lt;SPAN&gt;0.15524999999999&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;WHY ?!?!&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 20 Nov 2017 21:22:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414959#M101715</guid>
      <dc:creator>Jedrzej</dc:creator>
      <dc:date>2017-11-20T21:22:02Z</dc:date>
    </item>
    <item>
      <title>Re: different results of mean after sorting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414960#M101716</link>
      <description>&lt;P&gt;This exact problem has been discussed in great length. Please search today's posts, and you will find the answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But why are you posting this anyway, a duplicate of an earlier thread? Is it homework?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 21:25:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414960#M101716</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-11-20T21:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: different results of mean after sorting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414963#M101718</link>
      <description>&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/proc-summary-calculating-mean/m-p/414821" target="_blank"&gt;https://communities.sas.com/t5/Base-SAS-Programming/proc-summary-calculating-mean/m-p/414821&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/107827"&gt;@Jedrzej&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;WHY ?!?!&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;RTM - there's an entire chapter on this topic and it's not really a SAS issue, it's a 'binary computer issue'.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0ji1unv6thm0dn1gp4t01a1u0g6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lrcon&amp;amp;docsetTarget=p0ji1unv6thm0dn1gp4t01a1u0g6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 21:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414963#M101718</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-20T21:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: different results of mean after sorting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414964#M101719</link>
      <description>&lt;P&gt;my friend asked me today about it and i didn't find soultion for this. I was curious so i posted this question, didn't know he done the same.&lt;BR /&gt;&lt;BR /&gt;sorry,&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 21:32:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414964#M101719</guid>
      <dc:creator>Jedrzej</dc:creator>
      <dc:date>2017-11-20T21:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: different results of mean after sorting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414977#M101723</link>
      <description>&lt;P&gt;Looking at all possible ways to order those four numbers we see that there are two different means that can result.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  array x (4) (0.187 0.171 0.183 0.08) ;
  do j=1 to fact(dim(x));
    call allperm(j, of x[*]);
    mean=mean(of x(*)) ;
    put j= z2. (x:) (=) mean= best20.18;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;j=01 x1=0.187 x2=0.171 x3=0.183 x4=0.08 mean=0.15524999999999
j=02 x1=0.187 x2=0.171 x3=0.08 x4=0.183 mean=0.15525
j=03 x1=0.187 x2=0.08 x3=0.171 x4=0.183 mean=0.15525
j=04 x1=0.08 x2=0.187 x3=0.171 x4=0.183 mean=0.15525
j=05 x1=0.08 x2=0.187 x3=0.183 x4=0.171 mean=0.15525
j=06 x1=0.187 x2=0.08 x3=0.183 x4=0.171 mean=0.15525
j=07 x1=0.187 x2=0.183 x3=0.08 x4=0.171 mean=0.15525
j=08 x1=0.187 x2=0.183 x3=0.171 x4=0.08 mean=0.15525
j=09 x1=0.183 x2=0.187 x3=0.171 x4=0.08 mean=0.15525
j=10 x1=0.183 x2=0.187 x3=0.08 x4=0.171 mean=0.15525
j=11 x1=0.183 x2=0.08 x3=0.187 x4=0.171 mean=0.15525
j=12 x1=0.08 x2=0.183 x3=0.187 x4=0.171 mean=0.15525
j=13 x1=0.08 x2=0.183 x3=0.171 x4=0.187 mean=0.15525
j=14 x1=0.183 x2=0.08 x3=0.171 x4=0.187 mean=0.15525
j=15 x1=0.183 x2=0.171 x3=0.08 x4=0.187 mean=0.15525
j=16 x1=0.183 x2=0.171 x3=0.187 x4=0.08 mean=0.15524999999999
j=17 x1=0.171 x2=0.183 x3=0.187 x4=0.08 mean=0.15524999999999
j=18 x1=0.171 x2=0.183 x3=0.08 x4=0.187 mean=0.15525
j=19 x1=0.171 x2=0.08 x3=0.183 x4=0.187 mean=0.15525
j=20 x1=0.08 x2=0.171 x3=0.183 x4=0.187 mean=0.15525
j=21 x1=0.08 x2=0.171 x3=0.187 x4=0.183 mean=0.15525
j=22 x1=0.171 x2=0.08 x3=0.187 x4=0.183 mean=0.15525
j=23 x1=0.171 x2=0.187 x3=0.08 x4=0.183 mean=0.15525
j=24 x1=0.171 x2=0.187 x3=0.183 x4=0.08 mean=0.15524999999999
&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Nov 2017 22:19:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/different-results-of-mean-after-sorting/m-p/414977#M101723</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-20T22:19:39Z</dc:date>
    </item>
  </channel>
</rss>

