<?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: An easy Example of Hypergeometric Distribution in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/233634#M42720</link>
    <description>&lt;P&gt;The question in line 1 is: "... &lt;FONT face="courier new,courier"&gt;what is the probability 4 will be male&lt;/FONT&gt;".&lt;/P&gt;
&lt;P&gt;The answer (0.431337...) could be obtained with this one-liner:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %sysfunc(pdf(HYPE,4,50,40,5));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But in fact I, too, would be more interested in the question you switched to: what the chances are&amp;nbsp;that "&lt;FONT face="courier new,courier"&gt;4 will be female.&lt;/FONT&gt;"&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; (The result is less pleasing, though: only 0.003964...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you perhaps intend to calculate PDF('HYPER',4,50,&lt;STRONG&gt;40&lt;/STRONG&gt;,5) in the first of the two data steps?&lt;/P&gt;</description>
    <pubDate>Sat, 07 Nov 2015 15:51:36 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2015-11-07T15:51:36Z</dc:date>
    <item>
      <title>Re: An easy Example of Hypergeometric Distribution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/233667#M42718</link>
      <description>Thanks Reinhard, i corrected it .</description>
      <pubDate>Sun, 08 Nov 2015 07:44:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/233667#M42718</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-08T07:44:49Z</dc:date>
    </item>
    <item>
      <title>An easy Example of Hypergeometric Distribution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/233613#M42719</link>
      <description>&lt;PRE&gt;/*Question:50 students 40 male ,10 Female you select 5 person what is the probability 4 will be male */&lt;BR /&gt;/*x = success.N = Population . R = Number of total x in N (Out of total population 50 ,Male is 40 and Female is 10. n = select  */

data prob;
/* PDF ('HYPER', x, N, R, n &amp;lt;, o&amp;gt;) */
Proba = PDF('HYPER',4,50,40,5);
proc Print;
run;

/* 5 selected 4 will be female */
data prob;
/* PDF ('HYPER', x, N, R, n */
Proba = PDF('HYPER',4,50,10,5);
proc Print;
run;
&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Nov 2015 07:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/233613#M42719</guid>
      <dc:creator>pearsoninst</dc:creator>
      <dc:date>2015-11-08T07:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: An easy Example of Hypergeometric Distribution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/233634#M42720</link>
      <description>&lt;P&gt;The question in line 1 is: "... &lt;FONT face="courier new,courier"&gt;what is the probability 4 will be male&lt;/FONT&gt;".&lt;/P&gt;
&lt;P&gt;The answer (0.431337...) could be obtained with this one-liner:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %sysfunc(pdf(HYPE,4,50,40,5));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But in fact I, too, would be more interested in the question you switched to: what the chances are&amp;nbsp;that "&lt;FONT face="courier new,courier"&gt;4 will be female.&lt;/FONT&gt;"&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; (The result is less pleasing, though: only 0.003964...)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you perhaps intend to calculate PDF('HYPER',4,50,&lt;STRONG&gt;40&lt;/STRONG&gt;,5) in the first of the two data steps?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Nov 2015 15:51:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/233634#M42720</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2015-11-07T15:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: An easy Example of Hypergeometric Distribution</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/234102#M42783</link>
      <description>&lt;P&gt;I'm not sure wqhat your question is.&amp;nbsp; If you want to learn about how to simulate data from the hypergeometric distribution in SAS, see the article &lt;A href="http://blogs.sas.com/content/iml/2015/09/30/balls-and-urns1.html" target="_self"&gt;"Balls and urns: Discrete probability functions in SAS"&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to ask about how to compute probabilities for various scenarios, see &lt;A href="http://blogs.sas.com/content/iml/2011/10/19/four-essential-functions-for-statistical-programmers.html" target="_self"&gt;"Four essential functions for statistical programmers."&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 19:42:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Re-An-easy-Example-of-Hypergeometric-Distribution/m-p/234102#M42783</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-11-10T19:42:35Z</dc:date>
    </item>
  </channel>
</rss>

