#ThisWeeksFiddler, 20240823

This week the question is: Round, Round, Get a Round, I Get a Round

Suppose you have two real numbers, like 3.14 and 2.718. If you round these two numbers and add these rounded values together, you get 3 + 3, or 6. Alternatively, if you add the original two numbers and then round the sum, you still get 6.

But rounding then adding doesn’t always give you the same result as adding then rounding. For example, if the two numbers are 2.4 and 3.4, rounding then adding gives you 5 (i.e., 2 + 3), whereas adding then rounding gives you 6 (i.e., 2.4 + 3.4 = 5.8, which rounds to 6).

How likely is it that rounding then adding gives you the same result as adding then rounding?

To be more precise, suppose you randomly, uniformly, and independently pick two real numbers between 0 and 1. What is the probability that rounding the two numbers and then adding gives you the same result as adding the two numbers and then rounding?

And for extra credit:

Instead of picking two numbers from the interval between 0 and 1, suppose you randomly and independently pick N numbers.

What is the probability that rounding each of the N numbers and then adding gives you the same result as rounding the sum of the N numbers?

Læs mere: #ThisWeeksFiddler, 20240823

Highlight to reveal solution:

WolframAlpha sheet. Integration sheet.

And for extra credit:

Program. Curve 1 and 2.

Skriv en kommentar