Add new comment


An additional level of randomness gets a lot closer to the theoretical distribution.

Generating 1 million numbers using the formula

randint(1, randint(1, randint(1, ranges_top))), where ranges_top is still 999,

produces this result.

{1: (0.31, 0.3), 2: (0.19, 0.18), 3: (0.13, 0.12), 4: (0.1, 0.1), 5: (0.08, 0.08), 6: (0.06, 0.07), 7: (0.05, 0.06), 8: (0.04, 0.05), 9: (0.04, 0.05)}

An additional level of randomness beyond three makes the result worse. So it's not a matter of converging to the result.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • Want facts and want them fast? Our Maths in a minute series explores key mathematical concepts in just a few words.

  • What do chocolate and mayonnaise have in common? It's maths! Find out how in this podcast featuring engineer Valerie Pinfield.

  • Is it possible to write unique music with the limited quantity of notes and chords available? We ask musician Oli Freke!

  • How can maths help to understand the Southern Ocean, a vital component of the Earth's climate system?

  • Was the mathematical modelling projecting the course of the pandemic too pessimistic, or were the projections justified? Matt Keeling tells our colleagues from SBIDER about the COVID models that fed into public policy.

  • PhD student Daniel Kreuter tells us about his work on the BloodCounts! project, which uses maths to make optimal use of the billions of blood tests performed every year around the globe.