Ad
-

Über Zufallszahlen

A random number generator (RNG) produces numbers that lack any predictable pattern. This page generates random integers between any two bounds you choose, entirely in your browser. Typical uses include picking giveaway winners, assigning presentation order, sampling items for review, generating lottery-style picks, dice rolls, and randomized practice problems.

Computers cannot produce true randomness from arithmetic alone — a fact formalized by John von Neumann's 1951 remark that anyone considering arithmetic methods of random digits is "in a state of sin." Software RNGs are therefore pseudorandom: they run a deterministic algorithm whose output passes statistical tests for randomness. JavaScript's Math.random(), which this tool uses, is a pseudorandom generator; for cryptographic keys or gambling-grade fairness, use a cryptographic RNG such as the Web Crypto API's crypto.getRandomValues, which browsers implement from a cryptographically secure source.

So funktioniert das Zufallsziehen dieses Generators

To draw a random integer between min and max inclusive, the generator produces a uniformly distributed value and maps it onto the integer range. When every number in the range is equally likely, each individual draw of a number between 1 and N has probability 1/N. Uniform draws are independent: the generator has no memory, so a number that has not appeared recently is not "due" — the belief otherwise is known as the gambler's fallacy.

Für Ziehen ohne Zurücklegen (etwa beim Zuweisen eindeutiger Positionen an eine Personenliste): ziehen Sie wiederholt, überspringen aber bereits vergebene Zahlen, bis jede einmal vergeben ist — oder mischen Sie die Liste und lesen Sie die Reihenfolge ab.

Häufige Zufallsbereiche und Wahrscheinlichkeits-Referenz

Die Tabelle unten listet häufig verwendete Bereiche und die Wahrscheinlichkeit, dass ein bestimmter Wert bei einer einzelnen gleichverteilen Ziehung erscheint.

None

RangeWerteChance auf einen bestimmten Wert
Würfelwurf (1–6)61/6 ≈ 16.7%
Münzwurf-artig (0–1)21/2 = 50%
Rouletterad (0–36, europäisch)371/37 ≈ 2.7%
Lotterie 6/49, einzelner Treffer491/49 ≈ 2.0%
1 aus 100 wählen1001%
Verlosung unter 250 Teilnehmern2501/250 = 0.4%

Seeds, Pseudozufälligkeit und Reproduzierbarkeit

A pseudorandom generator starts from an internal state (a seed) and advances deterministically; the same seed yields the same sequence, which is why scientific simulations often accept a seed for reproducibility. Browser Math.random() implementations are seeded automatically and are not designed to be reproducible or cryptographically secure. For statistics-grade simulations, tools supporting fixed seeds or the Python NumPy Generator API are a better fit; for drawings where fairness matters publicly, prefer a transparent method such as a filmed dice roll or a certified lottery terminal.

Randomness is a foundational resource in computing, statistics, and cryptography. Monte Carlo methods — used across physics, finance, and engineering — obtain numerical results by repeated random sampling, a technique named after the casino district of Monaco and developed on early computers by Stanislaw Ulam and John von Neumann at Los Alamos in the 1940s. Randomized algorithms also underpin modern machine-learning training, in the form of random weight initialization, shuffling, and dropout.

Randomized controlled trials, the gold standard in medicine, depend on unbiased random assignment of participants to treatment and control groups. Proper randomization prevents selection bias from systematically favoring one group; that is why trial registries publish the randomization method. The same principle applies at smaller scale: randomly assigning chore orders, presentation slots, or A/B test variants removes the quiet biases of alphabetization or self-selection.

In games, dice and shuffled decks are physical randomizers with centuries of history; digital games replicate them with pseudorandom calls, and competitive formats increasingly publish their randomization procedures so participants can verify fairness. Tabletop role-playing games use polyhedral dice — d4, d6, d8, d10, d12, d20 — each a uniform draw over its face count, exactly what a range-limited integer generator reproduces.

A brief fairness note for drawings: assign each entrant a number first, generate one integer in the full range, and record the result before announcing it. Avoid re-rolling "until it feels right," which introduces human bias and, over many drawings, systematically distorts outcomes. For high-stakes selections, publish the method and the seed or use an independent third-party drawing service.

Häufig gestellte Fragen

Ist dieser Generator wirklich zufällig?

Kein Software-Generator ist wirklich zufällig. Dieses Tool verwendet JavaScripts Math.random(), einen Pseudozufallsgenerator, dessen Ausgabe statistische Zufallstests besteht. Für kryptografische Zwecke verwenden Sie eine sichere Quelle wie crypto.getRandomValues.

Kann ich eine Zahl zwischen zwei beliebigen Werten erzeugen?

Ja. Setzen Sie die Unter- und Obergrenze, und jede Ziehung liefert eine ganze Zahl in diesem Bereich inklusive — mit gleicher Wahrscheinlichkeit für jeden Wert.

Warum kam zweimal hintereinander dieselbe Zahl?

Bei einem gleichverteilten, unabhängigen Generator sind Wiederholungen zu erwarten. Bei Ziehung von 1–6 beträgt die Chance, dass der nächste Wurf dem vorherigen entspricht, 1/6; über viele Ziehungen sind Serien und Häufungen normal und kein Beleg für Bias.

Ist das fair für eine Verlosung?

Es ist gleichverteilt und unvoreingenommen im üblichen statistischen Sinn, aber nicht von Dritten auditierbar. Für öffentlich umkämpfte Verlosungen verwenden Sie eine Methode, die Beobachter prüfen können, oder einen zertifizierten Randomisierungsdienst.

Was ist der Unterschied zwischen pseudorandom und kryptografisch sicher?

Pseudozufallsgeneratoren sind deterministische Algorithmen, gut für Spiele und Stichproben; kryptografisch sichere Generatoren (CSPRNGs) widerstehen der Vorhersage selbst nach Beobachtung vieler Ausgaben und sind für Schlüssel, Tokens und sicherheitsrelevante Zufälligkeit Pflicht.

Ad