We are often asked how ticket numbers are chosen when you enter one of our competitions. In short, a computer picks them for you at random, and nobody at McKinney Competitions can choose, change or influence which numbers you get.
On this page we explain, in plain English, exactly how that works. We also show you the actual lines of code that do the picking.
The Short Version
- Your ticket numbers are picked at random by our system once your order is complete.
- Every ticket number that hasn't been sold yet has the same chance of being picked.
- The randomness comes from a cryptographically secure source, the same kind used to protect online banking and encrypted communications.
- No staff member can choose, see in advance, or alter the numbers you receive.
- Our process has been independently tested and certified by Gaming Laboratories International (GLI).
Why Our Randomness Is Different
Computers are very good at following instructions, but on their own they are not good at being unpredictable. Most everyday "random" functions in computer programs are really just a maths formula that starts from a number (called a seed) and churns out a sequence that looks random. If someone learns the seed, or watches enough of the numbers it produces, they can work out what comes next. That is fine for shuffling a music playlist, but not for something that matters.
We don't use that kind of generator. Our system uses a cryptographically secure random number generator. It is constantly topped up with unpredictable real-world "noise" collected by the server itself, such as tiny variations in hardware timings and dedicated hardware randomness built into modern processors. That noise is mixed together using strong encryption, so the result is:
- Unpredictable: knowing every number it has produced before tells you nothing about the next one.
- Unbiased: every possible number is equally likely.
- Tamper-resistant: it is the same standard used to create the secret keys that keep online banking and card payments safe.
This makes it far closer to genuine randomness than the basic generators found in many systems.
How It Works, Step by Step
Below are the exact lines from our ticketing software that choose your
ticket numbers. We have removed the surrounding code so you can focus on
the parts that matter. Everywhere you see crypto.randomInt,
that is the secure random number generator described above being asked
for a number.
Step 1: Using the secure generator
import crypto from 'crypto';
From our ticketing software
This line loads the secure random number generator built into the software platform our system runs on. Every random choice on this page comes from it.
Step 2: Picking random ticket numbers
const num = crypto.randomInt(1, range + 1);
if (!selected.has(num)) {
candidates.add(num);
}
From our ticketing software
Think of this as reaching into a hat containing every ticket number in
the competition, from 1 up to the highest number, and pulling one out
at random. range is the total number of tickets in the
competition.
If that number has already been picked for your order, it is put to one side and another is drawn. This repeats until there are enough numbers to choose from.
Step 3: Checking the numbers are still available and shuffling them
for (let i = available.length - 1; i > 0; i--) {
const j = crypto.randomInt(0, i + 1);
[available[i], available[j]] = [available[j], available[i]];
}
From our ticketing software
Some of the numbers pulled from the hat may already belong to other entrants, so the system checks which ones are still free. Only unsold numbers are kept.
Our code works like shuffling a deck of cards properly: starting from the last card, it swaps each card with a randomly chosen card at or before it. This method (known as the Fisher–Yates shuffle) is mathematically proven to give every possible order an equal chance.
Your tickets are then taken from this shuffled list.
How the Winning Ticket Is Drawn
When it is time to draw a winner, we don't switch to a separate system or a different method. Our draw asks the same secure random number generator that assigned your ticket numbers to pick the winning number.
This means the draw is just as unpredictable as your ticket assignment, and nobody can see the result in advance.
What This Means for You
- Every unsold ticket number has an equal chance of being assigned to you, whether you buy one ticket or one hundred.
- Buying earlier or later doesn't make particular numbers more or less likely.
- The numbers are chosen by the system automatically. Nobody can pick them by hand.
- Every ticket allocation is recorded in a secure audit log, so the history of what was issued and when can always be checked.
Independently Certified by Gaming Laboratories International (GLI)
Gaming Laboratories International (GLI) is one of the world's leading independent testing and certification laboratories for gaming, lottery and random number generator systems. Gaming regulators and operators around the world rely on GLI to check that systems are fair, secure and work exactly as described.
GLI has independently tested and certified our process, including the way our system generates random numbers and assigns tickets. Their testing confirmed that our outcomes are statistically random, unpredictable and free from bias.
See our CertificationTo find out more about how we keep our competitions fair, read our Fair Play Policy. If you have any questions about your tickets, please contact us.