ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   random number generation (https://www.excelbanter.com/excel-worksheet-functions/47824-random-number-generation.html)

DSpec

random number generation
 
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

Myrna Larson

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

On Thu, 29 Sep 2005 08:18:05 -0700, "DSpec"
wrote:

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


[email protected]

"DSpec" wrote:
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.


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

" wrote:

"DSpec" wrote:
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.



DSpec

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

"Myrna Larson" wrote:

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

On Thu, 29 Sep 2005 08:18:05 -0700, "DSpec"
wrote:

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



Harlan Grove

"DSpec" wrote...
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.



[email protected]

"DSpec" wrote:
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().


[email protected]

"DSpec" wrote:
"Myrna Larson" wrote:
The occurrence of duplicates does NOT mean the numbers are not selected
randomly. If you are drawing *with replacement*, duplicates are possible.


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.


All times are GMT +1. The time now is 08:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com