Re: compelling evaluation
- To: mathgroup at smc.vnet.net
- Subject: [mg93221] Re: compelling evaluation
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Fri, 31 Oct 2008 03:08:13 -0500 (EST)
On 10/30/08 at 2:01 AM, randolph.silvers at deakin.edu.au wrote:
>I have created a function from a PDF and so it is non-zero on the
>unit interval and 0 elsewhere. But when I try to integrate some
>function of that function, it is not evaluated. How can I get it to
>be evaluated?
>For example,
>project=UniformDistribution[{0,1}];
>f[y_]:=PDF[project,y]/(CDF[project,1] - CDF[project,0]);
>F[y_]:=Integral_0^y f[z]dz;
You seem to be making things needlessly complex here. By
definition for any distribution CDF[dist,a]-CDF[dist,b] must be
1 when a and b are chosen to be the distribution bounds. So,
defining f as
f[y_]:= PDF[UniformDistribution[{0,1}],y]
does exactly the same as your f[y] above.
As for your F[y] what you wrote above isn't Mathematica syntax.
I assume you mean F[y] to be the cumulative distribution
function. If so, F can be defined as
=46[y_]:=CDF[UniformDistribution[{0,1},y]
>Now, I define
>pi0[y_]:= F[y]
>pi1[y_]:= Integral_y^1 (1-q) f[q] dq
Again, you use Integral, something you have not defined. Perhaps
the problem is you are unfamiliar with the Mathematica syntax to
do integration? I think the syntax you want would be
p11[y_]:=Integrate[(1-q) f[q],{q, y, 1}]