I am preparing a lecture on Hypothesis testing for students and plan to go from the very basic, hopefully helping them understand the problems.
Last year, my notebook was in Jupyter with Interact package, which was a nightmare to set up. This year, I want to switch to Pluto. Currently, my biggest problem is that I cannot display sliders together with Plot. Specifically, I would like this
@bind μ Slider(-2:0.1:2; default=1, show_value=true) @bind σ² Slider(0.001:0.1:2, default = 1,show_value = true) @bind n Slider(2:1:1000, default = 1000, show_value = true) p₁ = Normal(μ,σ²) ts = [EqualVarianceTTest(rand(p₁,n), rand(p₁,n)).t for _ in 1:10000]; p = histogram(ts, normalized = true,alpha = 0.25) plot!(p, μ - 5σ²:0.2σ²:μ + 5σ², x -> pdf(TDist(2n-2), x),label = "Student-T distribution")
to be rendered such that I will have sliders over the plot in one output.
I can do this my putting every slider to its own line and the plot afterwards, but if the notebook contains several of these blocks, I need to choose everytime a different name, which is a bit annoying.
Thanks for answers in advance.