Optimalization from pdf