Thanks.
I just feel that it is better to make ProbabilityDistribution
function to use the range of Piecewise
. For the second quesiton, I have a different view from you. From the original Probability Distribution fuction
ProbabilityDistribution[
Piecewise[{{2*x/(Pi^2), 0 < x < Pi}, {0,
x <= 0 || x >= Pi}}], {x, -Infinity, Infinity}]
which has stated that when x=0
or x>=Pi
, the Probability Distribution is 0. So, when y=0
and y=1
, its Probability Distribution should be 0 too.
May you check this:
The first
D[Probability[Sin[X] < y,
Distributed[X,
ProbabilityDistribution[
Piecewise[{{2*x/(Pi^2), 0 < x < Pi}, {0,
x <= 0 || x >= Pi}}], {x, -Infinity, Infinity}]]],
y] // Simplify
The second
D[Probability[Sin[X] < y,
Distributed[X,
ProbabilityDistribution[
Piecewise[{{2*x/(Pi^2), 0 < x < Pi}}], {x, -Infinity,
Infinity}]]], y] // Simplify
They have the same results. Not weird?