Expected value from array

Revision en1, by jaigurudev, 2019-01-27 16:35:21

I have an array of N integers (a[N]). I start removing numbers from the array one by one. If at any point I remove an element a[i] and the sum of the remaining numbers is S, then the happiness increases by an amount of S/a[i]. What is the expected value of the total happiness ?

Initial happiness can be considered as 0.

Tags expected value, math and programming, probabililty

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English jaigurudev 2019-01-27 16:35:21 349 Initial revision (published)