Re: Re: random matrix from row and column sums
- To: mathgroup at smc.vnet.net
- Subject: [mg53854] Re: [mg53831] Re: random matrix from row and column sums
- From: DrBob <drbob at bigfoot.com>
- Date: Sun, 30 Jan 2005 03:18:15 -0500 (EST)
- References: <csinpt$njk$1@smc.vnet.net><200501200847.DAA04066@smc.vnet.net> <csqqs1$1mh$1@smc.vnet.net> <200501291102.GAA24672@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
"Random" covers a lot of territory, of course. Choosing overall solutions EQUALLY OFTEN probably requires listing them all, first, and that's what my first solution did. Bobby On Sat, 29 Jan 2005 06:02:39 -0500 (EST), Valeri Astanoff <astanoff at yahoo.fr> wrote: > Bob, > > Your solution is by far faster than mine, but what kind of random is > it? > > Consider this example : > [...] > In[9]:= > bob=Table[randomFill[{10,10,10,10,10},{10,10,10,10,10}],{100}]//Flatten; > > In[10]:= > BinCounts[bob,{-1,10}] > Out[10]= > {1147,355,224,191,134,117,105,68,70,53,36} > > In[11]:= > val=Table[rand[{10,10,10,10,10},{10,10,10,10,10}],{100}]//Flatten; > > In[12]:= > BinCounts[val,{-1,10}] > Out[12]= > {348,613,740,445,226,102,24,2,0,0,0} > > In[13]:= > rep=N[{Mean[#],Mode[#],Median[#],StandardDeviation[#],Skewness[#]}]&; > > In[14]:= > rep[bob] > Out[14]= > {2.,0.,1.,2.64809,1.33292} > > In[15]:= > rep[val] > Out[15]= > {2.,2.,2.,1.37228,0.525969} > > With your fast but too much skewed solution 0 is three times > more likely to occur than 1 and five times more likely to occur than 2, > > which is the mean (and is also the mode and median with my solution). > I wonder whether it is what the initial poster expected... > > > Valeri > > > > -- DrBob at bigfoot.com www.eclecticdreams.net
- References:
- Re: random matrix from row and column sums
- From: "Astanoff" <astanoff@yahoo.fr>
- Re: random matrix from row and column sums
- From: "Valeri Astanoff" <astanoff@yahoo.fr>
- Re: random matrix from row and column sums