English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I need a way of randomising sample files - I mean I need some kind of formula or table which would allow me to select some files from a bunch in a random way which would stand up to scrutiny.
Do you know of any way of doing this with a randomising table or programme or something?
Sorry I'm not clear about this - I know what I'm looking for, but don't know how to explain it very well.
Any help would be much appreciated.

2006-10-09 08:57:20 · 7 answers · asked by RM 6 in Science & Mathematics Mathematics

7 answers

in excel type

=rand()*10

and you will get a random number between 0 & 9 (ignore the decimals)

so if you have 999 files type

=rand()*999

press the f9 key to recalculate a new number

2006-10-09 09:08:38 · answer #1 · answered by Me 3 · 0 0

There's usually a random function in a spreadsheet.
There's also usually a pseudo-random one too.

I'd use a spreadsheet.

Or, other best way is usually to do it based on the computer's clock (the milliseconds) and scaled up to fit the range of value you expect,
but that would take some (although a trivial) amount of programing.

2006-10-09 16:08:11 · answer #2 · answered by Jon W 5 · 0 0

The following C program (taken from ANSI C recommendation) will give you pseudo-random numbers between 0 and 32767. The basic formula is recursive and uses congruence relationship. Please note that % stands for modulus.

With srand you can set the seed for your operation. Every time you run rand it will give a new pseudo-random number. While this is not the best way to generate pseudo-random numbers, it may be sufficient for what you need.

unsigned long next=1;
int rand(void) /* NOT RECOMMENDED (see text) */
{
next = next*1103515245 + 12345;
return (unsigned int)(next/65536) % 32768;
}
void srand(unsigned int seed)
{
next=seed;
}

2006-10-09 16:33:08 · answer #3 · answered by Nir T 2 · 1 0

There is no such thing. Chaos theory states that the more random the selection, the more positive a pattern emerges.
Any formula is a control.
Any table is formed from fixed rules.
So I wish you luck.

2006-10-09 16:08:52 · answer #4 · answered by rogerglyn 6 · 0 1

assign each thing a two- or three-digit #
then use a table of random numbers to determine the order:
http://www.mrs.umn.edu/~sungurea/introstat/public/instruction/ranbox/randomnumbersII.html

2006-10-09 16:05:47 · answer #5 · answered by Daisy® 5 · 0 0

if you have a scientific calculator you can give all your data numbers and then use the random button on the calculator to pick a number

2006-10-09 16:06:08 · answer #6 · answered by Lenny. 2 · 0 0

If you need some true random numbers, visit http://random.org

2006-10-09 16:24:53 · answer #7 · answered by kirun 6 · 0 0

fedest.com, questions and answers