Before I compute anything, let me name the objects. Two numbers, each uniform on the interval from nought to one, chosen independently, so the sample space is the unit square and every event here is a subset of that square.
The condition is a floor condition on the sum. Floor equal to one means the sum lies in the half-open band from one up to but not including two, and I want that band as a region of the square rather than as an equation, because the equation x plus y equals one is only the edge of the region.
One sentence of clarification, then I press on. The condition is written inside a pair of parentheses, and the parenthetical that defines the notation tells me how to read it: floor of x plus y equals one. That is what I will solve. I am taking the printed sentence at face value and not inventing an extra condition.
And because a reading costs nothing to check, I will price the two neighbours as I go: value nought gives the mirror triangle, which also has area one half, and value two gives the single corner point, which has area nought. So the only reading that is neither trivial nor self-contradictory is the one I committed to, and I will say so once and then do the mathematics.
Here is the licence I am about to use, and I want it written down rather than smuggled in. The probability of an event is the integral of the joint density over it. Uniformity says each marginal density is the constant one on the interval; independence is exactly the statement that the joint density is the product of the marginals. So the joint density is one everywhere on the square, and integrating one over a region is measuring it.
That is why I am allowed to say the word area where the question said the word probability, and it is worth being explicit that two separate assumptions paid for it.
To show I am not being pedantic for free: keep independence but tilt the marginal to the density two x on the interval, and the very same triangle now has probability five sixths. Keep uniformity but tie the two numbers together by y equals x, and the probability law sits on a diagonal so shading a region of the square no longer computes anything. Same picture, different numbers, or no number at all.
So my working rule for this problem is: check the measure, then use the picture.
I draw the sample space before I compute, because here the drawing is the proof. The square, x along the bottom, y up the left. The line x plus y equals one runs from the top-left corner to the bottom-right corner - it is the other diagonal.
That line does all the splitting. Below it the sum is less than one so the floor is nought. Above it the sum is at least one and strictly less than two, so the floor is one. And the sum reaches two at exactly one place, the top-right corner, which I mark as a dot.
So the favourable set is the upper-right triangle, its two legs are the top edge and the right edge of the square, each of length one, and its area is one half times one times one, which is one half. Since the density on the square is the constant one, that area is the probability.
Two warnings from the picture itself. First, both triangles have area one half, so the number one half does not by itself confirm that I shaded the right one - the labels do that work, and I will check the labels with an integral. Second, the diagonal and the corner are drawn but they carry no area, and that is precisely the fact that lets me be careless about strict versus weak inequalities in the next beat. Careless on purpose, with the reason written down.
The three sets are disjoint, and together they fill the whole square.
Two small claims have to be on the board before the number is earned, because both are places where a candidate quietly cheats.
Claim one, the boundary. Why may I write at least one and not worry? Because the line where x plus y equals one is a line segment, and I can cover a line segment by a strip of arbitrarily small area - the strip of points within perpendicular distance epsilon of the diagonal has area two root two epsilon minus two epsilon squared, so it is bounded above by two root two epsilon. A set that sits inside regions of arbitrarily small area has area nought itself, so adding or removing the boundary cannot change an area. That is the measure-theoretic fact I am spending, and it is the whole reason the strict-versus-weak distinction is free in this problem.
Claim two, the far end of the band. The floor equals two only where the sum reaches two, and inside the square that is exactly one point, the corner. I am not going to say 'a point is an atom of nought mass' and glide past: the reason the point costs nothing is that the joint law here has a density with respect to area, so it assigns nought to every set of area nought, and a single point has area nought.
Now the arithmetic, three ways, all of them one line. Slice the favourable set vertically: at abscissa x the favourable part of the vertical segment runs from one minus x up to one, so its length is x, and the integral of x from nought to one is one half. Or do the complement: the triangle below the diagonal has area the integral of one minus x, again one half, and one minus one half is one half. Or condition: given x, the number y is still uniform on the interval, so the chance it lands at or above one minus x is x, and averaging that over x is just the expectation of X, which is one half - the tower property doing my integral again in probability clothing.
And I will label those honestly: they share one engine. They are three notations for the same slice, so I do not count them as three checks. Independent evidence is next.
Second route, and this one really is different: forget the square and study the sum as a random variable in its own right. The density of a sum is the convolution of the densities, and with both densities equal to one on the interval the convolution has a beautiful geometric reading - it is the length of the overlap between the unit interval and a copy of it shifted to s.
That overlap grows linearly from nought to one as s runs from nought to one, then shrinks linearly as s runs to two. So the density of the sum is the tent function: s on the first half, two minus s on the second, peak one at the middle.
Before I use it, I check it is a law at all: the two triangular halves integrate to one half each, total one. Then the event floor equals one is just the statement that the sum lies in the interval from one to two, and the integral of two minus s over that interval is two minus three halves, which is one half. Same number, different engine.
The route pays two dividends. One: because the tent is symmetric about one and one is exactly my cut point, the answer one half is explained rather than computed - it is the mirror-image argument promoted to the density level. Two: I get the moments for the same work - mean one, variance one sixth, standard deviation point four zero eight two four eight two nine, and the expectation of the floor of the sum, which is one half since the floor only ever takes the values nought and one with probability one half each and the value two for free.
And a self-check on my own arithmetic: the variance one sixth also equals one twelfth plus one twelfth, the variances of the two uniforms added - which is only legal because they are independent. Additive checks are a good way to catch a lucky wrong number.
The additivity check agrees with the direct integral, because independence makes the covariance term vanish.
Numerical check, and I want to say what kind of evidence it is. I drew a million independent uniform pairs and counted how often the floor of the sum came out one: five hundred and one thousand and nine hits, a frequency of point five zero one zero zero nine.
The theory of my own estimator tells me how to read that. A count of hits over N is binomial with probability one half, so its standard error is one over twice root N, which at a million draws is point zero zero zero five. My number is two standard errors high - not alarming, but not something I would present as a single confirmation.
So I ran a second stream with a different seed: five hundred thousand five hundred and eighteen per million, point five zero zero five one eight, about one standard error high. Two streams, both within the noise the exact answer predicts, and the whole trace on the plot stays inside the two-standard-error band.
Honest accounting: this is evidence, not proof. What the simulation buys me is a guard against a structural blunder - if I had shaded the lower triangle and mislabelled it, or lost a factor, the Monte Carlo limit would move. Against a one-half-versus-one-quarter error it is sharp; against the last decimal place it is useless.
Two more checks, deliberately of different types. First, a route that uses no calculus at all. Fold the square through its centre by sending each point to the one with both coordinates reflected. That is a rigid motion of the square onto itself, so it preserves area, and it turns the lower triangle into the upper one. The two open triangles therefore have the same area, call it a. The square is those two triangles plus the diagonal, the diagonal has area nought by the strip argument, so two a plus nought is one and a is one half.
I like that route because it isolates exactly where measure theory enters: the reflection needs no probability at all, and the one delicate step is the boundary, which I already paid for. It is still not enough to identify the favourable side - symmetry never tells you which half is which - so beat 3's labels remain load-bearing.
Second check, an internal consistency test on my own numbers rather than on the answer. I claimed the mean of the sum is one, and I claimed the mean of the sum given the floor is nought is two thirds, while given the floor is one it is four thirds. The tower property says averaging those two conditionals with weights one half each must return the unconditional mean. Two thirds plus four thirds is two, half of that is one. It does.
And notice those two conditional means add up to exactly two, which is twice the centre of symmetry - a fact I did not use to get the answer but which is a genuine check on the arithmetic of both of them.
Where are we: the slice, the complement and the conditioning of beat 4 are one engine in three notations, so I never counted them as three checks. The convolution of beat 5, this reflection and this moment identity are three genuinely different engines, and all three land on one half. The candidate answer is now a conclusion.
Two directions of generalisation, because the question is really about a step function of a sum.
The first is the one an examiner likes: the floor of a sum is the carry. In general the floor of x plus y is the floor of x, plus the floor of y, plus one if the two fractional parts overflow past one. That last term is nought or one, so it is literally the carry digit you produce when you add columns. Here both numbers already lie below one, so the integer parts are nought and the whole question is: how often does adding two random fractional parts overflow? The answer one half says a carry from the first fractional column happens exactly half the time. If you restrict to single base-b digits instead of continuous fractions, the same count gives b minus one over two b: one quarter in binary, nine twentieths for decimal digits, creeping up towards one half as the base grows.
It also gives a clean way to say what my answer is not. The floor of x plus y is not the sum of the floors; they disagree whenever there is a carry, so here the two expressions disagree with probability one half. My triangle is precisely the disagreement set, and that keeps the reading honest for anyone who worries that floor of a sum equals sum of floors.
The second direction is more numbers. Add three uniforms and the floor of the sum takes values nought, one, two with masses one sixth, two thirds, one sixth; with four uniforms the masses are one twenty-fourth, eleven twenty-fourths, eleven twenty-fourths, one twenty-fourth. I computed those by n-fold integration over the cube rather than recalling them, and they are the three groups of bars on the figure, our own case boxed in dashes.
There is a neat invariant underneath: the expectation of the floor of the sum of n uniforms is always n minus one over two. The reason is that the fractional part of the sum is exactly uniform on the interval - the shifts of the Irwin-Hall density add up to a constant, which is the partition of unity property of cardinal B-splines - so the mean n over two splits into a half from the fractional part and the rest from the floor. For two numbers that reads: expectation of the floor equals one half, which is the answer again, this time as a first moment.
Let me close. The probability is one half. The favourable set is the upper-right triangle of the unit square, the value two occurs only at the top-right corner and is worth nothing because the law has a density with respect to area, and adding or removing the diagonal is free for the same reason.
What the answer cost, stated as honestly as I can: it cost the two hypotheses that license area at all, one measure-zero accounting for the boundary and the corner, and then one integral. Everything else - the convolution, the reflection, the moments, the sampling - was checking that I had not fooled myself.
What I am not claiming as proved, in the same breath. The closed formula for the sum of n uniforms I only used after checking it against n-fold integration at two, three and four numbers; the digit-carry fraction I verified by exact enumeration in six bases rather than derived in general; and the Monte Carlo is evidence about factors, not about digits. The slice family of beat 4, the convolution, the reflection and the moment identity are theorems, the sampling is a measurement, and I will not blur the two.
What would break it, which is the part an examiner probes: tilt the marginals and the same triangle costs five sixths; tie the two numbers together and shading stops meaning anything; move from a continuum to dice and the boundary suddenly carries an atom, seven twelfths against five twelfths; and change the target value from one to two and the answer drops to nought. So one half is not a reflex about halves, it is the price of this particular region under this particular measure.
And one slogan I would keep off this problem, on the board so it is on record: by symmetry it is a half. Symmetry is a proof here only because one happens to be the midpoint of the interval from nought to two and the tent density really is mirror-symmetric about it - which I checked, rather than assumed. Move the cut point, or tilt the marginals, and the identical reflex returns a wrong number with a straight face. Use symmetry when you have a transformation and a reason it preserves the measure; otherwise it is a guess wearing a costume.
If I had written one line on the wall it would be: read a floor condition as a band, check that the measure is area, and then only argue about shapes.
Target nought: the event is the sum strictly below one, the mirror triangle, and its area is the integral of one minus x from nought to one, which is again one half. Target two: the event is the single corner, probability nought. The three cases are exhaustive and disjoint, and one half plus one half plus nought is one, which is how I know no sliver of the square escaped the accounting.
Conditioning is more interesting than it looks. If I am told that x is bigger than y, I am inside the lower half of the square, the favourable set becomes the triangle with vertices one half and one half, then one nought, then one one, which shoelacing gives as one quarter, and one quarter over one half is still one half. So the event is independent of the order of the two draws - that is a genuine little theorem, not a rounding, and it is worth saying because it tells me the shape of the answer is not an artefact of which corner I happened to shade.
Conditioning on the floor being one just truncates the tent to its right half and renormalises: the density becomes two times two minus s on the interval from one to two, which is decreasing, so the mass sits nearer one than I would guess by eye.
The mean is four thirds, the median is two minus root two over two, which is one point two nine two eight nine, and the upper quartile is exactly one and a half. The mean exceeds the median, which is what a right-skewed density does - I computed its skewness as plus 0.5657 - and the standard deviation is point two three five seven zero two two six.
Two sanity ties: the mirror conditional mean, given the floor is nought, is two thirds, and the two conditionals average to the unconditional mean of one; and their sum is exactly two, twice the centre of symmetry. So the conditional picture is consistent with the density route and with the reflection route without any new integration.
Drop uniformity, keep independence. Take both marginals to have density two x, which is a legitimate non-uniform law on the interval and pushes mass towards one. The integral of four x y over the same triangle is five sixths: the region never moved, only the measure did, so area and probability have decoupled.
Try a different tilt for honesty about the size of the effect: a truncated exponential marginal, density e to minus x over one minus e to minus one, pulls mass towards nought and the same region costs point three three eight six nine six eight nine. So the number can move in either direction - five sixths above a half, point three three nine below it - and nothing in the picture tells me which applies unless the hypotheses are stated.
Drop independence. If y equals x the law lives on the diagonal and the shading stops being a probability, but the question is still answerable by one variable: the floor of two x is one exactly when x lies from one half to one, giving one half - the right number reached by a method that would be wrong here. If instead y equals one minus x, the sum is identically one, so the answer jumps to one, and the strict version of the same inequality gives nought. That pair is the cleanest demonstration that the free boundary of beat four is a property of the measure, not of the inequality.
Two dice give thirty-six equally likely ordered pairs, so counting is the analogue of shading. Twenty-one of them have sum at least seven, so the probability is twenty-one thirty-sixths, that is seven twelfths. Strictly more than seven is fifteen out of thirty-six, five twelfths.
The gap between those two is exactly the atom sitting on the boundary, six out of thirty-six, one sixth - and that is the point of the exercise. In my problem the boundary was a line of area nought, so at least and greater than were the same question; here the boundary is a value of positive mass, so they differ by one sixth, which is not a rounding error but a seventh of the whole sample space.
So the licence I spent in beat four was not a stylistic choice. It was a statement about this measure: absolutely continuous with respect to area, hence blind to sets of area nought. Change the measure to a lattice and the same habit of dropping the boundary is simply wrong.
Precisely: for any two reals, the floor of x plus y is the floor of x plus the floor of y plus the floor of the two fractional parts added together, and that last term is nought or one. It is one exactly when the fractional parts overflow past one. On the unit square both integer parts are nought, so my whole question is the question of whether that overflow happens, and the answer one half says the first fractional column overflows half the time.
Discretise to digits: pick two uniform base-b digits and add them. A carry means the sum is at least b, and counting pairs gives b minus one over two b. Concretely one quarter in binary, three eighths in base four, nine twentieths for decimal digits, and the sequence creeps up to one half as the base grows - which is exactly the continuum answer I got, so the two computations agree in the limit.
And the identity: the floor of a sum is not the sum of the floors. The two disagree on precisely the carry set, so here they disagree with probability one half - my favourable triangle is the disagreement set, which is a tidy way to remember what the region is. If instead x and y are uniform on a longer interval, the integer parts contribute but the fractional parts stay independent and uniform, so the disagreement probability stays exactly one half for any integer length; I checked that at one, two and three by simulation and got point four nine nine three, point four nine nine seven, point four nine nine two.