random number generation

D

DSpec

When I use the Random Number Generation tool as part of the data analysis, it
repeats the same pattern of randon numbers every time I run it for the first
time. How can I get it to give me truly random numbers each time I run it?

Thank you for your help
 
M

Myrna Larson

The occurrence of duplicates does NOT mean the numbers are not selected
randomly. If you are drawing *with replacement*, duplicates are possible.
 
J

joeu2004

DSpec said:
When I use the Random Number Generation tool as part of the
data analysis, it repeats the same pattern of randon numbers
every time I run it for the first time. How can I get it to
give me truly random numbers each time I run it?

It sounds like you have "seeded" the RNG. Go to
Tools -> Data Analysis -> Random Number Generator,
and be sure that the Random Seed field is empty.
 
D

DSpec

I checked and it is not seeded. Every time I exit the worksheet and then
return, the random numbers generated are the same - I am generating 48
columns and 50 rows and my answers are always the same
 
H

Harlan Grove

What does drawing "with repalcement" mean? What should I be looking
for?

Drawing or sampling with or without replacement are fundamental statistical
concepts. Perhaps you should consider reading up on your statistics.
 
J

joeu2004

DSpec said:
I checked and it is not seeded. Every time I exit the worksheet and then
return, the random numbers generated are the same - I am generating 48
columns and 50 rows and my answers are always the same

Hmm, you might need to talk to an MVP or search the Microsoft KB.
Effectively, you __are__ seeding the RNG. The only way I know how
to do that is the method I described (Tools -> Data Analysis ->
Random Number Generator). Apparently, there is another way.

I say that you are "seeding" the RNG because what you describe is
a predictable, repeatable sequence of random numbers, not merely
a repeat appearance of some of the random numbers. But there are
possible explanations ....

What happens if you press F9 after you enter the worksheeet? Is it
possible that you disabled auto-calculation (Tools -> Options ->
Calculation)?

Exactly what formula do you have in one or more of the 48x50 cells
that you believe should have random results? Is it possible that you
are mistaken about your formula being truly random, in the first
place?

Perhaps you have an error in your formula that is causing the
evaluation to be non-random. A trivial example: 5 + 0*RAND().
 
J

joeu2004

DSpec said:
What does drawing "with repalcement" mean? What should I be looking for?

Based on the decription of your problem, the comment about
"with replacement" seems to be irrelevant. You are talking
about the entire sequence of random numbers (or values
derived from them) being repeatable each time you enter the
worksheet, not merely a repeat appearance of some values in
the sequence.

But to answer your remedial question, in order to understand with
and without replacement, image drawing from a deck of cards.
If you close your eyes and draw from somewhere in the middle of
the deck, that is a "random selection". If you draw multiple cards
and put them aside, that is "random selection without replacement".
If instead you return the card to the deck after each selection, that
is "random selection with replacement", assuming that you return
the card to a "random" location in the deck or you shuffle the deck
between each draw.

If you still do not understand, don't worry about it -- or move this
digression to another thread. It seems to have nothing to do with
your problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top