Normalfordeling.
Figuren viser tæthedsfunktionen for normalfordelingen. Der er to parametre: µ og σ, hhv. middelværdi og spredning.
Du kan variere på disse to parametre. Læg mærke til, hvordan kurven ændrer sig.
Figure figure = Position [0,0] Size[x,y*4/5] Origin[x/12,y*3/4] Unit x/24 Color "white";
Axes axes = Color "black";
Grid grid = Color "blue";
//Units units = Color "black";
Label x5 = "5" At [5,0] Offset [0,15] Color "black";
Label x10 = "10" At [10,0] Offset [0,15] Color "black";
Label x15 = "15" At [15,0] Offset [0,15] Color "black";
Label x20 = "20" At [20,0] Offset [0,15] Color "black";
Label y05 = "0.5" At [0,5] Offset [-30,-5] Color "black";
Label y10 = "1.0" At [0,10] Offset [-30,-5] Color "black";
SlidePot my = From 0 To 20 Initial 5 Position [20,y-45] Size [300,0];
Text my_txt = "μ = my,2" Offset [350,y-40] Color "blue";
SlidePot sigma = From 0.35 To 4 Initial 1 Position [20,y-20] Size [300,0];
Text sigma_txt = "σ = sigma,2" Offset [350,y-15] Color "blue";
Function normalfct( Number x, Number sigma, Number my ) =
1/(sigma*sqrt(2*pi))*exp(-.5*((x-my)/sigma)^2);
Graph graph = 10*normalfct( x, sigma, my ) Size 1.5 Color "red";
Tex descr = "f(x)=\\Large{\\frac{1}{\\sigma\\sqrt{2 \\pi}}e^{-\\frac12\\left(\\frac{x-\\mu}{\\sigma}\\right)^2}}" Offset [300,105] Color "black";