Hi All,
I'd like to define and use a truncated normal distribution with both lower and upper limits.
I use the general Wikipedia discription for reference:
Truncated normal distribution - Wikipedia, the free encyclopedia
My xmcd file is attached.
I managed to define the PDF function with only lower limit, and check returns its ok (its integral on the lower bound - infinite range equals 1).
However, trying with two limits, the check integral has big values, way more than one.
Can anybody help me with this? I don't see where I made something wrong.
Thanks in advance.
Zsolt
Solved! Go to Solution.
Zsolt Roman wrote:
Hi All,
I'd like to define and u,se a truncated normal distribution with both lower and upper limits.
I use the general Wikipedia discription for reference:
Truncated normal distribution - Wikipedia, the free encyclopedia
My xmcd file is attached.
I managed to define the PDF function with only lower limit, and check returns its ok (its integral on the lower bound - infinite range equals 1).
However, trying with two limits, the check integral has big values, way more than one.
Can anybody help me with this? I don't see where I made something wrong.
I think you're double-booking b and a by putting B and A in the pnorm functions.
Stuart
Zsolt Roman wrote:
Hi All,
I'd like to define and u,se a truncated normal distribution with both lower and upper limits.
I use the general Wikipedia discription for reference:
Truncated normal distribution - Wikipedia, the free encyclopedia
My xmcd file is attached.
I managed to define the PDF function with only lower limit, and check returns its ok (its integral on the lower bound - infinite range equals 1).
However, trying with two limits, the check integral has big values, way more than one.
Can anybody help me with this? I don't see where I made something wrong.
I think you're double-booking b and a by putting B and A in the pnorm functions.
Stuart
You don't need to define your own phi. You can just use:
Apart from Stuarts and Lucs comments - you missed a sigma when you defined your Phi-function.
And of course you don't need to do so as we have dnorm in Mathcad as you can see:
And as Stuart already remarked, you should not "double normalize" a and b.
LT
Thank you for all your answers, issue got solved very quickly.
As for the missing sigma - it was defined out of the formula, in the trf(x) function, as 1/sigma. But anyways, using dnorm is obviously preferred.