<?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: According to a group of data, how to simulate a distribution in Mathematical Optimization, Discrete-Event Simulation, and OR</title>
    <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364676#M1850</link>
    <description>&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for my late response.&lt;/P&gt;&lt;P&gt;The initial probability table looks&amp;nbsp;like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9242i380CF56E4D78C3E7/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the above figure. I want the Probability of 'No-show' = 6&amp;nbsp;be smaller than 'No-show' = 5; and 'No-show' = 7&amp;nbsp;be in the middle of&amp;nbsp;'No-show' = 6 &amp;amp; 9. Which looks like a Normal or Poisson Distribution, and finally returns probability for&amp;nbsp;each value of 'No-show'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current approach is to obtain mean for this group, and generate Poisson Distribution according to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like the following (Not exact the same data, but similar case)&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9244iA2977DA36B856EAC/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture1.PNG" title="Capture1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;In this way, the probability keeps increasing before the mean value, and then keeps decreasing after that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other approach? Thank&amp;nbsp;you!&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2017 19:01:04 GMT</pubDate>
    <dc:creator>Crubal</dc:creator>
    <dc:date>2017-06-06T19:01:04Z</dc:date>
    <item>
      <title>According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/340963#M1688</link>
      <description>&lt;P&gt;Hi, I have a group of data as following: Value / Count (Frequency) / Probability among all:&lt;/P&gt;&lt;P&gt;And I make a histogram on Probability as attachemnt. While I would like to make the percentage increasing before it reaches mean; and decreasing after it reaches mean. How could I change the data to satisfy that? (Like the trend of Poisson or Normal Distribution)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And can it be a procedure that automatically do that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Value &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Count &amp;nbsp; &amp;nbsp; &amp;nbsp;Probability&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;16&lt;/TD&gt;&lt;TD&gt;16.66666667&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;21&lt;/TD&gt;&lt;TD&gt;21.875&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;19&lt;/TD&gt;&lt;TD&gt;19.79166667&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;14&lt;/TD&gt;&lt;TD&gt;14.58333333&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;8.333333333&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;9.375&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;7&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1.041666667&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;8&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;4.166666667&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;9&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;1.041666667&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;3.125&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13561iF8A0E66BBF96D142/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="DISTRIBUTION.PNG" title="DISTRIBUTION.PNG" /&gt;</description>
      <pubDate>Tue, 14 Mar 2017 21:13:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/340963#M1688</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2017-03-14T21:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/340968#M1689</link>
      <description>&lt;P&gt;I think you need to show an example of what you are looking for as output. I am not quite sure what you mean by &amp;nbsp;percentage increasing before it reaches mean. How is the posted data going to be related to the output?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 21:31:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/340968#M1689</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-03-14T21:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/341033#M1690</link>
      <description>&lt;P&gt;So you want bell shape (normal) distribution?&lt;/P&gt;
&lt;P&gt;better post it at IML forum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check PROC MCMC to us Box-Cox transformation to make it as normal distribution.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 02:04:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/341033#M1690</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-03-15T02:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/341215#M1691</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for not explaining well. I would like the output to be like normal or poisson distribution&amp;nbsp;or left skewed is okay. Like the one in the attachment. So that I may need to change the data value. Thanks!&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/13569iF558346E9FD9A319/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="left skewed.PNG" title="left skewed.PNG" /&gt;</description>
      <pubDate>Wed, 15 Mar 2017 14:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/341215#M1691</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2017-03-15T14:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/341217#M1692</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will check on it, And post at IML board if I still have no idea.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 14:53:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/341217#M1692</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2017-03-15T14:53:07Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/341411#M1701</link>
      <description>&lt;PRE&gt;

Maybe you want this.

http://blogs.sas.com/content/iml/2016/11/02/reverse-data-before-fit-distribution.html

&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Mar 2017 03:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/341411#M1701</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-03-16T03:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/343721#M1709</link>
      <description>&lt;P&gt;If you have the original data, you can use a bootstrap (or &lt;A href="http://blogs.sas.com/content/iml/2016/08/17/smooth-bootstrap-sas.html" target="_self"&gt;smoothed bootstrap&lt;/A&gt;) technique to simulate the data.&lt;/P&gt;
&lt;P&gt;If you only have the quantiles, you can &lt;A href="http://blogs.sas.com/content/iml/2014/06/18/distribution-from-quantiles.html" target="_self"&gt;simulate the (approximate) distribution from a piecewise linear approximation to the empirical CDF.&lt;/A&gt;&amp;nbsp; The technique uses the&lt;A href="http://blogs.sas.com/content/iml/2013/07/22/the-inverse-cdf-method.html" target="_self"&gt; inverse CDF method to&lt;/A&gt; simulate from the approximate empirical CDF.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2017 14:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/343721#M1709</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-03-23T14:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364676#M1850</link>
      <description>&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry for my late response.&lt;/P&gt;&lt;P&gt;The initial probability table looks&amp;nbsp;like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9242i380CF56E4D78C3E7/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, the above figure. I want the Probability of 'No-show' = 6&amp;nbsp;be smaller than 'No-show' = 5; and 'No-show' = 7&amp;nbsp;be in the middle of&amp;nbsp;'No-show' = 6 &amp;amp; 9. Which looks like a Normal or Poisson Distribution, and finally returns probability for&amp;nbsp;each value of 'No-show'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current approach is to obtain mean for this group, and generate Poisson Distribution according to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like the following (Not exact the same data, but similar case)&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9244iA2977DA36B856EAC/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture1.PNG" title="Capture1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;In this way, the probability keeps increasing before the mean value, and then keeps decreasing after that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other approach? Thank&amp;nbsp;you!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 19:01:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364676#M1850</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2017-06-06T19:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364680#M1851</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read through your blogs, those are extermely helpful. Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this particular question,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My initial probability distributon is like this :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9242i380CF56E4D78C3E7/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the actrual case, however, I want to adust the probability ofr some values: For example, in the above figure. I want the Probability of 'No-show' = 6&amp;nbsp;be smaller than 'No-show' = 5; and 'No-show' = 7&amp;nbsp;be in the middle of&amp;nbsp;'No-show' = 6 &amp;amp; 9. Which looks like a Normal or Poisson Distribution, and finally returns probability for&amp;nbsp;each value of 'No-show'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current approach is to obtain mean for this group, and generate Poisson Distribution according to it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like the following (Not exact the same data, but similar case)&amp;nbsp;:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/9243i2DCAA4B5E7F66F7A/image-size/original?v=1.0&amp;amp;px=-1" border="0" alt="Capture1.PNG" title="Capture1.PNG" /&gt;&lt;/P&gt;&lt;P&gt;So that in this way, the probability is increasing&amp;nbsp;before the mean and then decreasing after it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any other approach? Thank&amp;nbsp;you!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 18:59:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364680#M1851</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2017-06-06T18:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364685#M1852</link>
      <description>&lt;P&gt;It sounds like you are trying to transform the distribution towards normality.&amp;nbsp;Usually, you would use a LOG transformation or a square-root transformation to transform a continuous distribution into another continuous distribution, but you seem to want to transform a discrete distribution. It is not clear to me if the new distribution is supposed to be discrete or continuous. &amp;nbsp;If it can be continuous, try the LOG transformation on your&amp;nbsp;data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it would be helpful if you describe what you are trying to accomplish scientifically. What are the data? What scientific question are you trying to answer or model? &amp;nbsp;Why are you trying to transform the data towards normality?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 19:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364685#M1852</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-06T19:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364714#M1853</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your quick reply!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data is historical 'No-show' information. ('No-show' mean already booked but not appear in hospitality industry) so that it must be integer (not continuous).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And X-axis is the count for 'No-show' that appears in the past: Y-axis is its regarding probability. ('No-show' = 1 takes about 17% and 'No-show' = 2 takes about 22%).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In real case, probability for 'No-show' = 6&amp;nbsp;might be higher than 'No-show' = 5 and also higher than 'No-show' = 7. However, I would like to transfer the data so that the probability for 'No-show' = 6 is between 'No-show' = 5 and 'No-show' = 7. Normality will work I think, but data should be discrete instead of continuous (that's why I tried Poisson myself). In doing so, it would be easier to interpret the distribution to the business.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thnak you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 19:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364714#M1853</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2017-06-06T19:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364725#M1854</link>
      <description>&lt;P&gt;&amp;nbsp;&amp;gt;&amp;nbsp;&lt;SPAN&gt;In real case, probability for 'No-show' = 6&amp;nbsp;might be higher than 'No-show' = 5 and also higher than 'No-show' = 7.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Not sure what "in real case" means. You say this is historical data, so the data is real, right?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Are either of the following what you are trying to do?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;1. Adjust/modify the observed proportions so that they better fit some theoretical model or pre-held beliefs.&lt;/P&gt;
&lt;P&gt;2. Find some discrete parametric distribution that you can fit to the data. You want the fitted distribution to look somewhat normal.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 20:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364725#M1854</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-06T20:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364740#M1855</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks! And in real case means historical data, and it is real as you said.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And the second thing you mentioned is that&amp;nbsp;I want, which is to fit the distribution to look somewhat normal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 20:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364740#M1855</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2017-06-06T20:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364787#M1856</link>
      <description>&lt;P&gt;You can't change the distribution. The data have the shape that they have. What you can do is fit&amp;nbsp;a discrete distribution to the data. I still don't understand how the data are generated, so I can't recommend whether you should use a Poisson, binomial, or something else. However, there is a SAS Knowledge Base article that shows how to fit discrete distributions:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/48/914.html" target="_blank"&gt;http://support.sas.com/kb/48/914.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/24/166.html" target="_blank"&gt;http://support.sas.com/kb/24/166.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a fit to the binomial distribution:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data A;
input freq @@; 
N = _N_;
NTrials = 96;    /* you need the sample size to model the Binomial distrib */
datalines;
16 21 19 14 8 9 1 4 1 3
;
run;
proc means sum; run;

proc genmod data=A;
  freq freq;
  model N/NTrials = / dist=binomial;
  output out=predbin p=p;
run;

proc print data=predbin(obs=1);
var p;   /* print the parameter estimate */
run;

data fit;
p = 0.037218;
set A;
pct = 100 * pdf("Binomial", N, p, NTrials);  /* expected values */
run;

proc sgplot data=fit; 
vbar N / response=freq;         /* raw data */
vline N / response=pct markers; /* expected values under binomial model */
yaxis grid;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 22:52:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364787#M1856</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2017-06-06T22:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: According to a group of data, how to simulate a distribution</title>
      <link>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364798#M1857</link>
      <description>&lt;P&gt;Hi Rick,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's great. I will take a look at it and try.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2017 23:29:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Mathematical-Optimization/According-to-a-group-of-data-how-to-simulate-a-distribution/m-p/364798#M1857</guid>
      <dc:creator>Crubal</dc:creator>
      <dc:date>2017-06-06T23:29:26Z</dc:date>
    </item>
  </channel>
</rss>

