Tag Info

Hot answers tagged

3

You can get the function explicitly : Probability[70 < x < 80, x \[Distributed] TruncatedDistribution[{65, 100}, NormalDistribution[m, std]]] (* (Erfc[(-80 + m)/(Sqrt[2] std)] - Erfc[(-70 + m)/(Sqrt[2] std)])/(2 (1/2 Erfc[(-100 + m)/(Sqrt[2] std)] - 1/2 Erfc[(-65 + m)/(Sqrt[2] std)])) *) I think most of the numerical errors are due to the ...


2

To make clear the explanation in my Comments, your curves can be plotted with ContourPlot[4 (x - (1/2))^2 + (y + 1)^2 - 2, {x, -5, 5}, {y, -5, 5}, ContourStyle -> Black, Contours -> {-1.999, -1, 1}, PlotPoints -> 200, ColorFunction -> (White &)] It differs from your original expression as follows: The equation involving z is ...


2

Evaluate inside of ContourPlot is how I would do it... kVals = {-1.95, -1.9, -1.5, -1, 0, 1, 2}; levelCurve = (4 x^2 - 4 x + y^2 + 2 y) -4 x + 4 x^2 + 2 y + y^2 levelCurve2 = (4 (x - 1/2)^2 + (y + 1)^2 - 2) -2 + 4 (-(1/2) + x)^2 + (1 + y)^2 Simplify[levelCurve2 == levelCurve] True ContourPlot[ Evaluate[Table[levelCurve2 == k, {k, ...


1

The expression x<>x evaluates to the STRING "xx", but the Save command only saves symbols, so Save["file",x] works fine and Save["file",x<>x] does not work. You can assign the result to an expression and "Save" this expression.


1

Using b.gatessucks tips, I managed to get a better solution. I'm using constrained optimization with some reasonable limits on the parameters: In[1115]:= ClearAll[likelihoodf] likelihoodf[m_?NumericQ, std_?NumericQ] := Evaluate[Probability[70 < x < 80, x \[Distributed] TruncatedDistribution[{65, 100}, NormalDistribution[m, std]]]] ...



Only top voted, non community-wiki answers of a minimum length are eligible