Peter Mond

36 Reputation

4 Badges

16 years, 355 days

MaplePrimes Activity


These are answers submitted by Peter Mond

All questions solved. Your cantribution was of great help.

Peter

Thank you very much for this reply. Your theoretical considerations are very helpful. But, my little program below produces an unrealistic and unpredictable result, as the resulting probability function becomes negative. The reason is that depending on the difference of these two distribution functions there is a restriction on probability p. Do you know something about these restrictions and how they can be calculated?

K:=200;
M:=RandomVariable(Normal(80,15));
N:=RandomVariable(Normal(100,15));
p:=0.3;
f_all:=t->PDF(N,t);
f_B:=t->PDF(M,t);
f_C:=t->((f_all(t)-p*f_B(t))/(1-p));
Apx:=plot(f_all(x),x=0..K);
Bpx:=plot(f_B(x),x=0..K);
Cpx:=plot(f_C(x),x=0..K,color=blue);
plots[display](Apx,Bpx,Cpx);

Thanks Peter

Thank you very much all of you. With your help I got the solution, which is listed below, at least for my sample. I'll now turn to my real problem.

restart;
f1 := x -> x*1/2;
f2 := y -> y+20;
plot([f1(t),f2(t),t=-20..20]);
solve(x=f1(t),t);
f1_inv:= unapply(%,x);
f3 := x -> f2(f1_inv(x));
plot(f3(x),x=-10..10);

Axel, the square brackets have been the solution for the parametric plot problem and solve, unapply, and subsequent substitution help to find the function behind the plot. Consequently both plots show the same result.

Thanks again for your time

Peter

 

Thank you for your reply.

The task is quite simple:

For each t (element of real numbers) I get a pair of y and x values and I want to plot the function y=f(x), but also I want to get the equation of the function y=f(x) for further processing.

I'm just experimenting with solve, eval, and subs but with no success.

Thanks for considering this.

Peter

Page 1 of 1