Previous question has been solved (Gap in a continuous plot). Here is a new related question.
dist = MixtureDistribution[{6, 4}, {NormalDistribution[1, 0.3],
NormalDistribution[3, 0.3]}]
f[x_, y_] := y InverseSurvivalFunction[dist, x + y]
Given function f[x,y], for any x, we can get the optimal value y*[x] to maximize f[x,y]. Notice: for some range of x, there are two local maximums for the function and we should select the global one. My question is how to plot y*[x] on support [0,1].
The following codes may help you better understand what y*[x] looks like (decreasing-> jumping up-> decreasing):
Manipulate[
Plot[y InverseSurvivalFunction[dist, x + y], {y, 0, 1},
ImageSize -> 400, PlotRange -> {{0, 1}, {-1, 2}}], {x, 0, 1}]
Plot3D[y InverseSurvivalFunction[dist, x + y], {y, 0, 1}, {x, 0, .5},
ImageSize -> 400, PlotRange -> {0, 1}]
Comments
Post a Comment