0

I need help with a part of the following question:

The rounding error obtained when rounding to the nearest whole number can be regarded as a stochastic variable with uniform distribution on the interval $(−0.5, 0.5)$. Suppose you round two numbers and let $Z$ be the total error. Determine the distribution function for $Z$ and calculate $P(Z > 0.5)$. Determine the probability density function for $Z$ and draw it.

The solution suggests drawing the area of $\{(x, y) \in [-0.5, 0.5]^2 : x + y \leq z\}$, probably to find the bounds to calculate the function.

My first question is: how do I draw this area?

For $-1<z<0$ the bounds are $ -0.5 \leq x\ ≤ z + 0.5$ and $-0.5 ≤ y ≤ z-x$, but why wouldn't the upper bound for the integral of $x$ be $z-y$?

Thanks in advance for help.

frogi
  • 11

1 Answers1

0

You have to choose if you're going to do your double integral

$$\int \int^{A(y)}_{B(y)} .... dx dy$$

or

$$\int \int^{A(x)}_{B(x)} .... dy dx$$

These correspond to "adding up" along horizontal line first, or vertical lines first. (Note that all integration limits can involve $z$ - I've only indicated where $x$ and $y$ might depend on each other.)

By mentioning $-0.5 \leq x\ \le z + 0.5$ first, it looks like your using the second version, with the $dx$ on the outside. It's like the inner integral can depend on the outer variable, but not vice versa.

If you're worried that we might be integrating over too much area, remember that we only cover $(x,y)$ points where both $x$ and $y$ fall within their designated ranges.

JonathanZ
  • 10,615
  • I'm aware of how double integrals work, I just don't get how they found the bounds for the integral, for x and y, since I can't draw or imagine the area they suggested. I mean, x can be all values between -0.5 and 0.5 so why are they not the bounds instead? Where does the z + 0.5 come from? x can't exceed 0.5? – frogi Jan 02 '24 at 21:08
  • Well, you start with the unit width square centered on the origin. Then, as an intuition builder, pick some $z$ value like -0.3. Do you know what the sets $x+y=$ constant look like? Can you figure out which of those sets have their "constant" less than -0.3? And then intersect those with your underlying square. – JonathanZ Jan 02 '24 at 21:34
  • Oh, and for your last question, yes $x$ can't exceed 0.5, but for negative values of $z$, there's an even smaller limit on $x$, so we have to go with that. It's too bad there isn't a shared whiteboard feature here, because it's so much easier one you start drawing the regions in question. – JonathanZ Jan 02 '24 at 21:39
  • Yes, it's certainly difficult without a shared whiteboard :c If I understand you correctly, for example, if −1 < < 0 then it's a region between the lines y=-1-x and y=-x within the underlying square. If so, I still don't get how to calculate the bounds for x or y. – frogi Jan 02 '24 at 22:21