<?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: Need Help finding mean of random numbers in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-finding-mean-of-random-numbers/m-p/76458#M22175</link>
    <description>post deleted&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: Patrick</description>
    <pubDate>Wed, 21 Oct 2009 23:38:02 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2009-10-21T23:38:02Z</dc:date>
    <item>
      <title>Need Help finding mean of random numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-finding-mean-of-random-numbers/m-p/76457#M22174</link>
      <description>Hi,&lt;BR /&gt;
I have generated 100 samples each with 100 random numbers between 0 and 1 using the following code (thnx patrick!):&lt;BR /&gt;
&lt;BR /&gt;
data RandomNumbers;&lt;BR /&gt;
do sample=1 to 100;&lt;BR /&gt;
do n=1 to 1000;&lt;BR /&gt;
RandomNumber=ranuni(0);&lt;BR /&gt;
output;&lt;BR /&gt;
end;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
For each of these samples I found the mean using proc tabulate. Now, I need to find the (simulated) probability that the mean of a sample is between .49 and .5, inclusive.&lt;BR /&gt;
Any ideas?&lt;BR /&gt;
&lt;BR /&gt;
Is there a way to get the proc tabulate output into a dataset so I can then use "if" statements to keep all means between .49 and .5, count them and then divide by 100 to get the probability? Or is there a faster way to do this entirely in the data step (ie. using another loop)?&lt;BR /&gt;
Thanks, your help would be much appreciated!</description>
      <pubDate>Wed, 21 Oct 2009 21:29:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-Help-finding-mean-of-random-numbers/m-p/76457#M22174</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-10-21T21:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help finding mean of random numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-finding-mean-of-random-numbers/m-p/76458#M22175</link>
      <description>post deleted&lt;BR /&gt;
    &lt;BR /&gt;
Message was edited by: Patrick</description>
      <pubDate>Wed, 21 Oct 2009 23:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-Help-finding-mean-of-random-numbers/m-p/76458#M22175</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-10-21T23:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need Help finding mean of random numbers</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Need-Help-finding-mean-of-random-numbers/m-p/76459#M22176</link>
      <description>One solution:&lt;BR /&gt;
&lt;BR /&gt;
PROC MEANS, BY SAMPLE with an OUTPUT statement, puts all your means into a dataset. Then, use another data step to count the times the mean is in the desired range, and the number of times it is not in the desired range.</description>
      <pubDate>Thu, 22 Oct 2009 15:36:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Need-Help-finding-mean-of-random-numbers/m-p/76459#M22176</guid>
      <dc:creator>Paige</dc:creator>
      <dc:date>2009-10-22T15:36:05Z</dc:date>
    </item>
  </channel>
</rss>

