Add new comment


I did the experiment described in my previous comment and got a distribution that was similar to but not close enough to the expected one.

I generated 2 million numbers as follows. Let ranges_top = 999. Then generate a sequence of 2 million numbers based on this formula.

randint(1, randint(1, ranges_top))

In other words, to generate a number select a number at random between 1 and 999. Then select a number between 1 and that number.

The distribution was as follows (along with the expected results).

{1: (0.24, 0.30), 2: (0.18, 0.18), 3: (0.15, 0.12), 4: (0.12, 0.10), 5: (0.09, 0.08), 6: (0.08, 0.07), 7: (0.06, 0.06), 8: (0.05, 0.05), 9: (0.03, 0.05)}

That is, about 24% of my numbers began with 1 compared to an expected 30%, etc.

I did this experiment a number of times using Python's random number library. The results were all substantially the same.


Is there anything known about the distribution I generated?

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.