Visualize Optimal Parameter Values
Fit data to a Weibull distribution using maximum likelihood and visualize the optimal point in contour and 3D plots of the log-likelihood.
data = BlockRandom[SeedRandom[100];
RandomVariate[WeibullDistribution[4, 5], 50]];params = FindDistributionParameters[data, WeibullDistribution[α, β]];llfun = LogLikelihood[WeibullDistribution[α, β], data];
cp = Show[ContourPlot[llfun, {α, 2, 6}, {β, 3, 8}, Contours -> 20, ColorFunction -> "FallColors"], Graphics[Point[{α, β} /. params]]];
p3d = Show[Plot3D[llfun, {α, 2, 6}, {β, 3, 8}, MeshFunctions -> {#3&}, Mesh -> 20, PlotPoints -> 50, ColorFunction -> "FallColors"], Graphics3D[{Black, Sphere[{α, β, llfun} /. params, .05]}]];
GraphicsRow[{cp, p3d}]