afeddersen

444 Reputation

7 Badges

11 years, 153 days
I study psychology and economics with a very quantitative approach to each. I specialised on statistical methods, quantitative diagnostics, portfoio analysis and econometrics. Furthermore I am interested (and above that theoretically and empirlcally involved) in poker, chess and performing arts.

MaplePrimes Activity


These are questions asked by afeddersen

When I solve a determined linear system of equations with two equations and two parameters I receive a set of equations.

E.g.

s1:=solve({mu = n*p, sigma^2 = n*p*(1-p)},{n,p});

                              2                 2
                            mu            -sigma  + mu
              s1 := {n = ------------, p = ------------}
                              2                mu
                        -sigma  + mu

BUT when I like to solve an overdetermined system of equations, solve is not applicable in the same way, i.e.

I have some expressions like the follwoing:

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

Moreover for some groups of expressions, I have a definition for mu and (sigma)^(2).

E.g.:

mu = n*p

(sigma)^(2) = n*p*(1-p)

 

First of all, I use Maple 14.
I tried to generate N samples from a defined normal distribution and then let Maple calculate sample mean, sample standard deviation and a statistic Z for each of the i samples:

with(statistics):

N:=100:
n:=100:
X:=RandomVariable(Normal(500,50));


for i to N do
X||i:=Sample(X,n):
mu||i:=1/n*sum(X||i(1,j),j=1..n):
sigma||i:=sqrt(1/(n-1)*sum(((X||i(1,j)-mu||i))^(2),j=1..n)):
Z||i:=(mu||i-500)*sqrt(n)/sigma||i:
end do:

 

I tried the following:

q:=(x)^(2)=a;
assume(0<x,0<a);
solve(q,x);
 

and received two solutions, though I assumed x and a to be positive.

Why? And what can I do, to make Maple account for my assumptions and only return the one possible solution?

I have an expression k:

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

 

and the two solutions of the following expression:

solve(n*p*(1-p)=(sigma)^(2), {p});


Now I want to substitute the solutions of the former for p in k.

Because there are two different expressions to account for, how may I tell Maple to return two solutions at once, without typing each of them extra?

First 6 7 8 9 10 11 12 Page 8 of 12