Re: populate a list with random numbers from normal distribution?

• To: mathgroup at smc.vnet.net
• Subject: [mg49924] Re: [mg49855] populate a list with random numbers from normal distribution?
• From: sean kim <sean_incali at yahoo.com>
• Date: Fri, 6 Aug 2004 03:09:44 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```hi Bob

I want to pick integers because of the issues
addressed in this group. I've heard that Random
Integers are better because it uses wolfram's CA.

Problem i can't figure out is How to pick random
integers in a Range from a given distribution, say
normal.

Now i can use,

Needs["Statistics`ContinuousDistributions`"]
NormalDistribution[50000, 25000]

and then sample...

RandomArray[l1, 1000];

just as many have sugested, but if I do that, I'm not
picking froma range. I even get negative numbers.

this is demonstrated well by listploting as wolfgang
suggested.

ListPlot[RandomArray[l1, 1000]]

isn't there a way to pick integers in a given range
AND from a distribution?

any insights will be thoroughly appreciated.

sean

--- Bob Hanlon <hanlonr at cox.net> wrote:

> Needs["Statistics`ContinuousDistributions`"];
>
>
data=RandomArray[NormalDistribution[50000,25000],{1000}];
>
> #[data]& /@ {Mean, Variance, StandardDeviation} // N
>
> {49212.297808892145, 6.388327485991619*^8,
>   25275.140921450107}
>
> Since you seem to want Integers
>
> data=Round /@ data;
>
> #[data]& /@ {Mean, Variance, StandardDeviation} //N
>
> {49212.299, 6.388324440996987*^8,
> 25275.134897754724}
>
>
> Bob Hanlon
>
> >
> > From: sean_incali at yahoo.com (sean kim)
To: mathgroup at smc.vnet.net
> > Date: 2004/08/04 Wed AM 10:46:33 EDT
> > To: mathgroup at smc.vnet.net
> > Subject: [mg49924] [mg49855] populate a list with random
> numbers from normal
> distribution?
> >
> > hello group.
> >
> > I looked at the help browser but i can't figure
> this out. I weant to
> > make a list of random numbers sampled from a
> normal distribution
> >
> > In[90]:=
> Needs["Statistics`ContinuousDistributions`"]
> >
> > l1 = Table[Random[NormalDistribution[50000,25000],
> Integer, {10000,
> > 99999}], {1000}];
> >
> > Variance[l1]//N
> > StandardDeviation[l1]//N
> >
> >
> > From In[90]:=
> > Random::"randt":
> > Type specification NormalDistribution[50000,
> 25000] in
> > <<1>> should be Real, Integer, or Complex.
> >
> > Out[92]=
> > 0.
> > Out[93]=
> > 0.
> >
> > thanks in advance for any insights
> >
> > sean
> >
> >
>
>

__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

```

• Prev by Date: Re: populate a list with random numbers from normaldistribution?
• Next by Date: Re: Why overloaded arithmetic operations are so slow?
• Previous by thread: Re: populate a list with random numbers from normal distribution?
• Next by thread: Re: populate a list with random numbers from normal distribution?