You are viewing a single comment's thread. Return to all comments →
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
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Kevin and Expected Value
You are viewing a single comment's thread. Return to all comments →
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