Números aleatorios

Top  Previous  Next

 

 

En las simulaciones en las que la suerte influye, son necesarios los números aleatorios. Antes se usaban las tablas de números aleatorios. EN la actualidad, los números aleatorios se suelen obtener con un programa de ordenador. Puesto que estos números se calculan usando una fórmula, no son realmente aleatorios, por lo que se les llama pseudo-aleatorios. Es muy difícil diferenciar los auténticos números aleatorios de los pseudo-aleatorios.

Los números aleatorios deben ser totalmente aleatorios. Deben ser completamente independientes unos de otros y cada número debe tener la misma probabilidad de aparecer.

Los números aleatorios para simular las puntuaciones de un dado, por ejemplo, deben ser números del 1 al 6 y cuando el número de simulaciones es grande el porcentaje de veces que aparece cada número debe ser casi el mismo.

En la generación de números aleatorios se pueden elegir  diferentes distribuciones. Los resultados se pueden ver en una tabla o en un gráfico. El valor de los números aleatorios se muestra en una escala vertical. Si el gráfico muestra alguna regularidad, indica que los números no se han generado aleatoriamente.

 

In simulations where chance plays a role, you need random numbers. In the past, tables were used. Now, random numbers are usually produced by a computer. Because they are calculated using a formula, they are not really random numbers, so they are called pseudo-random numbers. It is very difficult to distinguish between real random numbers and pseudo real numbers.

Random numbers must be totally random. They should be completely independent of each other, and every number should have an equal probability of appearing.

The random numbers for simulating the score on a die, for example, should be whole numbers from 1 to 6 and, with a large number of simulations, the percentage of times each appears should be almost the same.

In the random number generator you can select different distributions. The results can be seen either in a table or a graph. The value of the random number is shown on a vertical scale. If the graph shows any regularity it would indicate that the numbers have not  been generated randomly.

 

Settings and buttons

Settings

In the Settings window you can select a distribution and the accompanying parameters.

Each experiment consists of generating at least one number. However, it is possible to let an experiment consist of generating more than one number. In that case, you have the options to show the mean of that experiment with a small red bar, and to represent the data with a boxplot to obtain an impression of the spread of the numbers generated within an experiment.

 

Tempo bar

With the tempo bar you can change the speed of the simulation before and during the simulation.

With Step you can track the experiment step by step.

Fast is designed to enable you to create a large quantity of data.

 

Interrupt/continue

With the space bar you can interrupt or resume the simulation.

 

wisser clears all results.

 

opslaan saves the results in a file.

 

excel sends the results of the simulation direct to Excel. Excel will appear on the taskbar.

 

Simulation formulas

v1, v2, ..  are individual random number variables. In formulas, notation [V1] or [v1] is compulsory.

v  put all random variables in one record

 

Every name is suitable for defining a variable.

Both capitals and lower-case characters can be used.

Examples: altogether = sum(v) or var=Sum(v) or statisGREAT = SUM(V)

 

count

values

var = count(v=6) counts number of sixes

var = count((v=3) or (v>5))

counts number of threes and values greater than 5

countpar

number of values in a part

var = countpart(v=6;1;4)

counts number of sixes at variables V1 , .... V4

var = countpart(v=6;5;7)

counts number of sixes at 5th , .... 7th variable

sum

sum of values

var=sum(v)

computes sum of all values

sumpart

sum of part

var = sumpart(v;4;10)

computes sum of  V4 , .... V10

mean

mean

var = mean(v)

computes mean of all values

meanpart

mean of a part

var = meanpart(v;4;10)

computes mean of V4 , .... V10

SD

standard deviation

var = SD(v)

computes standard deviation of all values

SDpart

standard deviation of a part

var = SDpart(v;4;10)

computes standard deviation of V4 , .... V10

max

maximum

var = max(v)

selects maximum value in a record

min

minimum

var = min(v)

selects minimum value in a record

uniquenumbers

number of different values

var = uniquenumbers(v)

computes number of different values

med

median

var = med(v)

computes median of all values

medpart

median of a part

var = medpart(v;4;10)

computes median of V4 , .... V10

q1

first quartile

var = q1(v)

computes first quartile of all values

q1part

first quartile of part

var = q1part(v;4;10)

computes first quartile of V4 , .... V10

q3

third quartile

var = q3(v)

computes third quartile of all values

q3part

third quartile of a part

var = q3part(v;4;10)

computes third quartile of V4 , .... V10

nvar

number of variables

var = nvar(v)

computes  number of variables

 

More possibilities

Summarizing selected variables:  var = [v1]+[v2]+[v3]

Linear transformation of all random values and summarize:  var = sum(2v+3)