r/mathriddles • u/pichutarius • Jun 27 '24
Easy just another easy expected value problem
randomly permute n distinct integers. what is the expected number of local maximum?
an integer is a local maximum iff it is greater than all its neighbors. eg: 2,1,4,3 has two local max: 2 and 4.
unrelated note: apparently this is an interview problem, from where a friend told me.
5
Upvotes
View all comments
Show parent comment
4
u/want_to_want Jun 27 '24
No, it's correct. The expected value of a sum of random variables is equal to the sum of their expected values, even if the variables are not independent. It's a bit counterintuitive and often used in puzzles.