# Add new comment

As COP28, the 2023 United Nations Climate Change Conference, kicks off we look at how maths can help understand the climate crisis.

How do you create dramatic film out of mathematics? We find out with writer and director Timothy Lanzone.

Mathematics plays a central role in understanding how infectious diseases spread. This collection of articles looks at some basic concepts in epidemiology to help you understand this fascinating and important field, and set you up for further study.

Find out why the formula we use to work out conditional probabilities is true!

- We talk about a play that explores the fascinating mathematical collaboration between the mathematicians GH Hardy and Srinivasa Ramanujan.

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.

Disappointing.

Is there anything known about the distribution I generated?