<?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: Can someone help me with the following please? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335908#M76102</link>
    <description>&lt;P&gt;Please post your base data (data step with datalines), the code you already have, and where the result differs from your expectations.&lt;/P&gt;</description>
    <pubDate>Sat, 25 Feb 2017 22:01:21 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-02-25T22:01:21Z</dc:date>
    <item>
      <title>Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335907#M76101</link>
      <description>&lt;P&gt;According to the American Lung Association, 85% of adult smokers started smoking before turning 21 years old. Ten smokers 21 years old or older are randomly selected, and the number of smokers who started smoking before 21 is recorded.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Find the probability that exactly 8 of them started smoking before 21 years of age.&lt;/LI&gt;&lt;LI&gt;Find the probability that fewer than 8 of them started smoking before 21 years of age.&lt;/LI&gt;&lt;LI&gt;Find the probability that at least 8 of them started smoking before 21 years of age.&lt;/LI&gt;&lt;LI&gt;Find the probability that between 7 and 9 of them started smoking before 21 years of age.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sat, 25 Feb 2017 21:58:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335907#M76101</guid>
      <dc:creator>pacruz</dc:creator>
      <dc:date>2017-02-25T21:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335908#M76102</link>
      <description>&lt;P&gt;Please post your base data (data step with datalines), the code you already have, and where the result differs from your expectations.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2017 22:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335908#M76102</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-02-25T22:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335916#M76107</link>
      <description>&lt;P&gt;Isn't this satisfied by using the PROBBNML function?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Binomial Cumulative Distribution Function = probbnml(p,N,s),&amp;nbsp;&amp;nbsp;&amp;nbsp; where&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; p=baseline probability&amp;nbsp;&amp;nbsp; (0.85 in your case)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N=number of trials&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S=number of successes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Note that binomial prob of s=K&amp;nbsp;&amp;nbsp;&amp;nbsp; is cdf(K) - cdf(K-1)&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2017 22:41:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335916#M76107</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-02-25T22:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335917#M76108</link>
      <description>&lt;P&gt;With a sample size of only 10, I wouldn't trust the p values. Take a look at:&amp;nbsp;&lt;A href="https://onlinecourses.science.psu.edu/stat414/node/264" target="_blank"&gt;https://onlinecourses.science.psu.edu/stat414/node/264&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Feb 2017 22:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335917#M76108</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-02-25T22:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335942#M76119</link>
      <description>&lt;P&gt;Once you understand that the probabilities are binomial (10 smokers, each of them having a 0.85 probability of having started smoking before age 21), all you need is to get the probabilities:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
n = 10;
do i = 0 to n;
    p = pdf("BINOMIAL", i, 0.85, n);
    cum = cdf("BINOMIAL", i, 0.85, n);
    ccum = 1 - cum;
    put i= p= cum= ccum=;
    end;
format p cum ccum pvalue8.5 i z2.;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;UL&gt;
&lt;LI&gt;Find the probability that exactly 8 of them started smoking before 21 years of age. &lt;FONT color="#0000FF"&gt;= p(i=8)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Find the probability that fewer than 8 of them started smoking before 21 years of age.&lt;FONT color="#0000FF"&gt; = cum(7)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Find the probability that at least 8 of them started smoking before 21 years of age. &lt;FONT color="#0000FF"&gt;= ccum(8)&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;Find the probability that between 7 and 9 of them started smoking before 21 years of age. &lt;FONT color="#0000FF"&gt;= p(7) + p(8) + p(9)&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Feb 2017 03:03:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/335942#M76119</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-02-26T03:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/337224#M76555</link>
      <description>&lt;P&gt;I tried using your code but it gave an error. If I have the following code how can I use to solve the problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data binom_table;&lt;BR /&gt;array p(6);&lt;BR /&gt;do x=0 to 5;&lt;BR /&gt;p(x+1)=probbnml(.4,5,x);&lt;BR /&gt;end;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 03:39:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/337224#M76555</guid>
      <dc:creator>pacruz</dc:creator>
      <dc:date>2017-03-02T03:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/337232#M76558</link>
      <description>&lt;P&gt;So far I have the following but I cannot figure out the last question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data binomial;&lt;/P&gt;&lt;P&gt;array p(3) p1-p3;&lt;/P&gt;&lt;P&gt;p(1)=probbnml(0.85,10,8)-probbnml(0.85,10,8);&lt;/P&gt;&lt;P&gt;p(2)=probbnml(0.85,10,7);&lt;/P&gt;&lt;P&gt;p(3)=1-probbnml(0.85,10,8);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;var p1-p3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;find the probability that between 7 and 9 of them starte smoking before 21 year of age.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 04:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/337232#M76558</guid>
      <dc:creator>pacruz</dc:creator>
      <dc:date>2017-03-02T04:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/337236#M76562</link>
      <description>&lt;P&gt;a&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130858"&gt;@pacruz&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;So far I have the following but I cannot figure out the last question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;find the probability that between 7 and 9 of them starte smoking before 21 year of age.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; p4=probbnml(0.85,10,9)-probbnml(0.85,10,6);&amp;nbsp;&amp;nbsp; /* =cdf(9)-cdf(6) */&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2017 04:19:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/337236#M76562</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2017-03-02T04:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can someone help me with the following please?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/337237#M76563</link>
      <description>Thank you!</description>
      <pubDate>Thu, 02 Mar 2017 04:34:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-someone-help-me-with-the-following-please/m-p/337237#M76563</guid>
      <dc:creator>pacruz</dc:creator>
      <dc:date>2017-03-02T04:34:42Z</dc:date>
    </item>
  </channel>
</rss>

