I'm looking to use the Manipulate command to take a distribution with multiple parameters (e.g., mean and sigma for the normal), generate some variates, then plot the density with kernel smoothing. Ideally I'd like to have sliders for all parameters, the number of variates used, and the bandwidth for smoothing.
Here's what I've got:
Manipulate[
Plot[
SmoothKernelDistribution[RandomVariate[NormalDistribution[μ, σ], numbVars], bw],
{x, -5, 5}],
{μ, -1, 1},
{σ, 0, 5},
{numVars, 10, 1000, 10},
{bw, .1, 5}]
But it looks like I'm not indicating things correctly, getting errors for the RandomVariate parameters and for SmoothKernelDistribution and perhaps others that are supressed.
