Question: How do I substitute the right way?

Ok, here is what I tried to do:

restart;
with(Statistics):

X3 := RandomVariable(Binomial(n, p)):

k3 := n*(phi+ln(-1/(-exp(phi)+exp(phi)*p-p)))/phi;

j3:=algsubs(sqrt(Variance(X3))=sigma,k3);

 

When I do this, I receive an error message: "Error, (in algsubs) no variables appearing rationally in pattern".

On the other hand Maple has no problem in dealing with the following procedure, where I just omitted the square root:

 

restart;
with(Statistics):

X3 := RandomVariable(Binomial(n, p)):

k3 := n*(phi+ln(-1/(-exp(phi)+exp(phi)*p-p)))/phi;

j3:=algsubs(Variance(X3)=sigma,k3);

 

So, what can I do?

Are there any alternative commands, or proceedings to convince Maple to do that?

 

Thanks for answering.

Please Wait...