I would like to obtain samples of the value $\underset{x}{\arg\max} f(x)$, where the function $f$ is sampled from some distribution of functions $F$, i.e. $f\sim F$.
$x \in \mathbb{R}$, and $f:\mathbb{R}\to\mathbb{R}$.
My intuition tells me that if I first sample a function $f$ and then solve for the $\arg\max$, I would obtain a sample from $\underset{x}{\arg\max} f(x)$. I'm skeptical of this, but I didn't find a way to prove or disprove this statement yet. Any help would be appreciated.