We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
the major mistake I made was to not consider the special case of E[Y} when x=0 after obtaining a general equation relating E[Y] to E[X] for x in [1,N-1].
the major mistake I made was to not consider the special case of
E[Y}
whenx=0
after obtaining a general equation relatingE[Y]
toE[X]
forx
in[1,N-1]
.hint 1: Y can be written as y = f(x)
hint 2: X can be thought of as unif random var on [0,N-1]
hint 3: E(Y) = Sum(f(x) P(X = x))
hint 4: sum can be appropriately approximated by integrals which will have closed form antiderivative
Now is drawn from and . However, the modulo function return integers in .
So, is drawn uniformly from . Therefore, is drawn from . Now I am lost. What is the expectation of the square root of a rv?
Could you please provide explanation for solutions to the first few test cases?