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]
Re: st: RE: RE: Generation of three uniform random variables that sum to one
From
Fabien Bertho <[email protected]>
To
[email protected]
Subject
Re: st: RE: RE: Generation of three uniform random variables that sum to one
Date
Thu, 21 Oct 2010 17:14:32 +0200 (CEST)
Thank you.
> ----------------------------------------
> From: Nick Cox <[email protected]>
> Sent: Thu Oct 21 16:24:11 CEST 2010
> To: '[email protected]' <[email protected]>
> Subject: st: RE: RE: Generation of three uniform random variables that sum to one
>
>
> I may be being stupid, but I think your conditions can not be satisfied.
>
> If
>
> a + b + c = 1
>
> then
>
> E(a) + E(b) + E(c) = 1
>
> And as a, b and c have the same distribution their means must be equal at 1/3.
>
> (This problem is familiar to me as data that "fill" a triangular plot, as e.g. -triplot- from SSC.)
>
> Nick
> [email protected]
>
> Fabien Bertho
>
> Thank you for this.
>
> Actually, I would like that the three random variables have an uniform distribution too. If their distributions were uniform, means would be .5 and standard deviations .28
>
> But, with the formula you suggest means = .33 and standard deviations = .16
>
> What do you think? What can I do?
>
> Nick Cox <[email protected]>
>
> > foreach v in a b c {
> > gen `v' = runiform()
> > }
> > gen total = a + b + c
> > foreach v in a b c {
> > replace `v' = `v' / total
> > }
> >
> > Nick
> > [email protected]
> >
> > Fabien Bertho
> >
> > I would like to generate three uniform random variables. And, the sum of these three variables equals to one.
> >
>
> *
> * 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/
--------------------------------------------------------------------------
Tous les courriers électroniques émis depuis la messagerie
de Sciences Po doivent respecter des conditions d'usages.
Pour les consulter rendez-vous sur
http://www.ressources-numeriques.sciences-po.fr/confidentialite_courriel.htm
*
* 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/