Here is the trick: set Y = x - q(x) Then observe Y is uniform [0,1/n] so the PDF of Y = n. After that just do simple formula plug in!!

Alumni Liaison

To all math majors: "Mathematics is a wonderfully rich subject."

Dr. Paul Garrett