A point is chosen uniformly at random from a unit square. Let D be the distance of the point from the midpoint of one side of the square. Find E(D^2).
I'm having trouble finding either P(D = x) or P(D >= x). Up to D = 1/2, the geometry is straightforward, but for values higher than that, I'm having trouble. I think if I can find those probabilities I can find the expected value using the integral definitions for the expected value of the second moment.
However, maybe there is a way of doing it that I don't see.
Any help is greatly appreciated.
I don't know why I didn't see that earlier--this works out very well. For some reason when I saw D^2 I was only thinking about the areas of circles emanating from the midpoint. This strategy makes a lot more sense.
Also, the expected value ends up being the same regardless of which midpoint is used.