Heavens Thunder Hammer

MaplePrimes Activity


These are questions asked by Heavens Thunder Hammer

I have the following maple code: restart:with(Statistics):with(plots): X := RandomVariable(NonCentralFRatio(nu, omega, delta)); nu:=3;omega:=3*n; delta:=4/(2*100)*(2.5^2+1.5^2+3.5^2+4.5^2); I then want to try and solve: fsolve(CDF(X,100)=0.9,n); but I get the error: Error, (in fsolve/checkrange) cannot determine if this expression is true or false: 1.*abs(Re(_t))+1.*abs(Im(_t))

In a previous thread here I was looking at working with a noncentral F distribution. I have since found out what I need to be doing is a bit different.

The theory is as follows:

So, The F(1-alpha, nu1,nu2) is actually a Quantile value of the central F distribution. In my case, I'm trying to find a minimum sample size where nu1=3 and nu2=3*n. I transform the Power Equation into a function of into a cumulative distribution question using the formula P(A>B)=1-P(A<=B).

I have this formula:g:=Sum(Sum(Sum(n!/m!/j!/k!*(1+p/20-c-h)^m*(h-p/20)^j*c^k*( j*(w+r*p)+Sum( k!/(k-l)!/l!*(c+h-p/20)^l*(1+p/20-c-h)^(k-l)*( (k-l)*(w+r*p)+l*(w+r*p)*X),l=0..k)),k=n-m-j..n-m-j),j=0..n-m),m=0..n);

which I realized was silly after a few minutes of looking at it, that I should be able to reduce it to a double and triple sum instead of a triple and quadruple sum. However: when I got to reduce the triple to the double, with the formula

 

 

I am having trouble with the following sum not adding properly:

sum(sum(sum(1/k!/j!/m!,k=2-m-j..2-m-j),j=0..2-m),m=0..2);

By my hand calculations, this should be 4 (?), but maple says it is zero. If we remove a factorial (like below) we will get a non zero sum. What am I doing wrong,or is this a bug in maple?

sum(sum(sum(1/k!/j!,k=2-m-j..2-m-j),j=0..2-m),m=0..2);

thanks.

Page 1 of 1