Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
David Hoaglin <dchoaglin@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: generate random sample |

Date |
Sun, 15 Jan 2012 23:47:52 -0500 |

Steve, Isn't it simply a discrete distribution that has the values 1 through 5 with the indicated probabilities? And the aim is to generate three random observations from that distribution? David Hoaglin On Sun, Jan 15, 2012 at 9:17 PM, Steve Samuels <sjsamuels@gmail.com> wrote: > > > Ning Li: > > Your example is too unrealistic and your question too vague for us to answer. > > Is N (population size) really 5? If so, then the "probability distribution" cannot be that of the population. > > If population N>5 and there are five "types" of population elements, with the distribution shown, then there is not enough information for Phil's (or anybody's) algorithm to work. Suppose Phil's algorithm draws a selection with x = 3. With the information you have provided, there is no way to link this selection to a specific population element.: > > But perhaps you want to draw the sample of n = 3 from N =5 with probability proportional to size, in which case the size measures can be arbitrary. But such size measures will rarely look like the proportions that you show. > > So please describe your problem better. . > > > Steve > sjsamuels@gmail.com * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: RE: generate random sample***From:*brendan.halpin@ul.ie (Brendan Halpin)

**Re: st: RE: generate random sample***From:*Steve Samuels <sjsamuels@gmail.com>

**Re: st: RE: generate random sample***From:*Steve Samuels <sjsamuels@gmail.com>

**References**:**st: generate random sample***From:*ningli_yang@fastmail.fm

**Re: st: RE: generate random sample***From:*Steve Samuels <sjsamuels@gmail.com>

- Prev by Date:
**Re: st: esttab and xtmixed** - Next by Date:
**Re: st: RE: generate random sample** - Previous by thread:
**Re: st: RE: generate random sample** - Next by thread:
**Re: st: RE: generate random sample** - Index(es):