top of page

A Surprising Find

Today, I want to focus on a question: given two numbers, x and y, chosen randomly and independently from in between 0 and 1 (non-inclusive), what is the probability that x/y rounds to an even number?


At first this seemed quite difficult to me; in fact I had no idea where even to begin. But at the end, when I looked back after solving it, I realised that I used nothing more complicated than GCSE level maths and one identity. So, where do you even begin?


The first step in questions like these is to define what you know. In this case, I know exactly what the definition of what rounding to an even number is; any number that is between 0.5 up or down from an even number rounds even. To define it more concretely, we can use inequalities. As x and y are both positive and in between 0 and 1, x/y can only land in the positive real numbers; as y can be as small as we want it to be, x/y can be as large as we want it to be, but neither x nor y can be negative, so x/y is bounded to the positive real number line. Since x and y are chosen randomly, with any number between 0 and 1 having an equal chance of occuring, x/y can be literally any real positive number with equal probability. For it to round to an even number, it can land between 0 and 0.5, 1.5 and 2.5, 3.5 and 4.5, 5.5 and 6.5, and so on.


One sticky situation an astute mathematician may pick up on is the issue of the halves; what if, by complete chance, x/y happens to land exactly on 0.5 or 1.5 or any of the others? If we round up, then it's more likely that x/y will round to an even number; if we round down, the opposite. Luckily, number theory gives us an answer: the real numbers have an uncountably infinite size. The probability that it lands on exactly one of the uncountable infinity of real numbers is 0. Not basically 0, or close to 0, but exactly 0. In fact, the probability of it landing on any specific number is 0, as that number is just one speck in an infinite sea of the uncountable infinity that is the real number line. Even when there are a countably infinite number of numbers that look like something point 5, they can't hope to compete with the size of the real number line. This may seem paradoxical; if x/y has a 0 probability of landing on any one number, how can it possibly land on any number? To answer this, I recommend a great 3Blue1Brown video on this exact topic (this one), but for now suffice it to say that it will never land on the exact halves.


Now that we have inequalities for x/y, let's tidy it up and put it in a form we recognise and can work with. If we have it in the form y=mx+c, we know that this would create a straight line, so we rearrange the inequality so it does exactly this. Notice that when we invert x/y to make it y/x, we also swap the direction of the less than sign to make it a greater than sign. We do this because we are essentially applying the function 1/x to both sides of the inequality; since 1/x is a decreasing function, we must swap the inequality sign. Then we multiply out by x to get the y=mx format.




This format helps us because it tells us exactly where y needs to be relative to x in order for x/y to round to an even number. The next step should be to use the sampling space to find probabilities. As x and y are both chosen randomly from in between 0 and 1, we can draw axes which describe every possible place x and y can land; this is our sample space. Since we have the inequalities showing us the areas in which x/y round to an even number, we can draw and shade these on this sample space, which results in an infinite number of triangles. These triangles (more specifically their area) represent what proportion of the sample space x and y can land in and have their quotient round to an even number. If we add together the area of all of these triangles and divide by the area of the sample space (1) we can find the probability that x/y rounds to an even number, which answers the question!


As the area of the triangles is 1/2 * the base * the perpendicular height, the perpendicular height of each triangle is 1, and we know that the height of each line at x=1 is the gradient of each inequality, we can find the area of each triangle and sum the areas.




Doing so gives us an infinite series which seems to have a nice pattern; aside from the first term, the denominators of the terms are all of the odd numbers, with the sign of the terms alternating between positive and negative. This, in fact, is part of a famous identity, discovered by the famous mathematician Gottfried Leibniz, and is named after him as the Leibniz summation to pi. By taking the identity and rearranging, we can substitute it back into our summation and arrive at the solution: the probability that x/y rounds to an even number, given that x and y are chosen randomly from between 0 and 1, is exactly (5-pi)/4.



This seems rather startling; from a question about probability and rounding, we have arrived at an answer with pi, a constant fundamentally related to circles, using an identity which requires a solid understanding of calculus to understand and prove. This surprising find is why it's always worth asking bizarre, seemingly useless questions in maths; it leads to interesting, deep and nuanced knowledge you didn't even know existed and unlocks new methods of problem solving which can be used in a variety of fields of applied maths, which I think is absolutely fascinating.


Sorry for not posting for an extended period of time. Between university applications and schoolwork, it's been difficult to find the time to research and write these. I have a few more ideas lined up which I hope will be interesting to see in animation, and I hope to get these done soon!

Comments


Post: Blog2_Post
bottom of page