<?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: question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421479#M280735</link>
    <description>&lt;P&gt;Congratulations Rick_Sas for all your badges !&lt;/P&gt;&lt;P&gt;Add me as a friend ? &lt;img id="heart" class="emoticon emoticon-heart" src="https://communities.sas.com/i/smilies/16x16_heart.png" alt="Heart" title="Heart" /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Dec 2017 10:34:41 GMT</pubDate>
    <dc:creator>Gunther</dc:creator>
    <dc:date>2017-12-15T10:34:41Z</dc:date>
    <item>
      <title>question about the mixture of two normal distributions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421051#M280730</link>
      <description>&lt;DIV&gt;Data generated using random number with Normal distribution (mean=5 std=2) as dataset D1 which has 100 elements.&lt;/DIV&gt;
&lt;DIV&gt;Data generated using random number with Normal distribution (mean=3 std=3) as dataset D2 which has 80 elements.&lt;/DIV&gt;
&lt;DIV&gt;Based on D1 and D2, data generated with Normal distribution at 30% Normal (mean=5, std=2)+70% Normal (mean=3, std=3) as D3 which has 120 elements&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;How to estimate proportion of D1 and D2 in dataset D3?&lt;/DIV&gt;</description>
      <pubDate>Fri, 15 Dec 2017 11:04:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421051#M280730</guid>
      <dc:creator>librasantosh</dc:creator>
      <dc:date>2017-12-15T11:04:04Z</dc:date>
    </item>
    <item>
      <title>question on estimating proportions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/420983#M280738</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data generated using random number with Normal distribution (mean=5 std=2) as dataset D1 which has 100 elements.&lt;BR /&gt;Data generated using random number with Normal distribution (mean=3 std=3) as dataset D2 which has 80 elements.&lt;BR /&gt;Based on D1 and D2, data generated with Normal distribution at 30% Normal (mean=5, std=2)+70% Normal (mean=3, std=3) as D3 which has 120 elements&lt;/P&gt;
&lt;P&gt;How to estimate proprotion of D1 and D2 in dataset D3?&lt;/P&gt;
&lt;P&gt;If any idea please let me know.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 15:24:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/420983#M280738</guid>
      <dc:creator>librasantosh</dc:creator>
      <dc:date>2017-12-14T15:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421056#M280731</link>
      <description>&lt;P&gt;Two ways pop to mind:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.Simulation&lt;/P&gt;
&lt;P&gt;2. Theory — look at joint distribution probability and see.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The correct method is likely what you’ve been taught in the course. If it’s theoretical, check your text, this isn’t a SAS question.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is simulation, what do you have so far? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also feel like the question may be missing something...Is this the word for word question from your assignment or have you paraphrased it?&amp;nbsp;&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/156990"&gt;@librasantosh&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;DIV&gt;Data generated using random number with Normal distribution (mean=5 std=2) as dataset D1 which has 100 elements.&lt;/DIV&gt;
&lt;DIV&gt;Data generated using random number with Normal distribution (mean=3 std=3) as dataset D2 which has 80 elements.&lt;/DIV&gt;
&lt;DIV&gt;Based on D1 and D2, data generated with Normal distribution at 30% Normal (mean=5, std=2)+70% Normal (mean=3, std=3) as D3 which has 120 elements&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;How to estimate proportion of D1 and D2 in dataset D3?&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;PS asking the same question multiple times is unhelpful.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 02:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421056#M280731</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-14T02:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421073#M280732</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Proc FMM&lt;/STRONG&gt; (Finite Mixture Models) does this kind of estimation.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 04:13:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421073#M280732</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-12-14T04:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421162#M280733</link>
      <description>&lt;P&gt;thanks for reply&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 13:14:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421162#M280733</guid>
      <dc:creator>librasantosh</dc:creator>
      <dc:date>2017-12-14T13:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421220#M280734</link>
      <description>&lt;P&gt;Not clear if you want to&amp;nbsp;do this in SAS or if it is a&amp;nbsp;theoretical question....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If in SAS, it sounds like you are &lt;A href="Generate a random sample from a mixture distribution" target="_self"&gt;simulating a random sample from a&amp;nbsp;mixture of normal distributions.&lt;/A&gt;&amp;nbsp;However, your question seems to imply that the data set that you want is a&amp;nbsp;random mixture of SAMPLES, where the samples are&amp;nbsp;obtained beforehand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, if you read the article, you will see that the general technique is&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Generate random Bernoulli variate:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; b = rand("Bern", 0.3);&lt;/P&gt;
&lt;P&gt;2. Use the 0/1 value to determine if you should choose a random sample from the first or second distribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think what I would do is use PROC SURVEYSELECT (or, easier, PROC IML) to&amp;nbsp;sample 120 elements from each data set with replacement. Then merge the results and use the&amp;nbsp;above technique to get your simulated sample:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this is a theoretical question, the answer is to look at the expected value of the proportions. You expect 0.3*120 = 36 observations from D1 and 0.7*120 = 84 observations from D2.Use those values and the sizes of D1 and D2 to answer the question.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 15:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421220#M280734</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-12-14T15:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421479#M280735</link>
      <description>&lt;P&gt;Congratulations Rick_Sas for all your badges !&lt;/P&gt;&lt;P&gt;Add me as a friend ? &lt;img id="heart" class="emoticon emoticon-heart" src="https://communities.sas.com/i/smilies/16x16_heart.png" alt="Heart" title="Heart" /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 10:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421479#M280735</guid>
      <dc:creator>Gunther</dc:creator>
      <dc:date>2017-12-15T10:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421488#M280736</link>
      <description>&lt;P&gt;You can add me as a friend. That enables you to get notified (if you wish) on my activity, such as when I answer a question.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 11:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421488#M280736</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-12-15T11:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421489#M280737</link>
      <description>&lt;P&gt;Thank you Rick, you're really the best ! &lt;img id="heart" class="emoticon emoticon-heart" src="https://communities.sas.com/i/smilies/16x16_heart.png" alt="Heart" title="Heart" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Dec 2017 11:04:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/421489#M280737</guid>
      <dc:creator>Gunther</dc:creator>
      <dc:date>2017-12-15T11:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: question on estimating proportions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/422329#M280739</link>
      <description>&lt;P&gt;Sounds like a job for PROC FMM. Given data set D3 with response values in Y:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc fmm;
model y = / k=2;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Dec 2017 15:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/question-about-the-mixture-of-two-normal-distributions/m-p/422329#M280739</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2017-12-19T15:52:16Z</dc:date>
    </item>
  </channel>
</rss>

