Thread: solver
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dana DeLouis
 
Posts: n/a
Default solver

Find c and smallest n that satisfy the constraints
c=23, n=16288


Hi John. I found this to be a hard one, even for a math program. I tried a
few optional evaluation methods, but still no luck.
Actually, I'm surprised that Solver even worked at all on a problem like
this.
Just messing around, I see that alpha & beta are the same. I tried plotting
both functions. Since .05 & .95 are far apart, I switched the first
equation around:

1 - binomdist(c,n,p1,true)<=beta
binomdist(c,n,p2,true)<=beta

With c=22, a plot showed that there is a very tiny corner that satisfies
both equations.
I show that c=22, and n = 15703 is a solution with the smallest n.
Again, this is done graphically, and not with a mathematical solution.

As a side note, the math program's function is:

CDF[BinomialDistribution[n,1/1000],c]
or...
BetaRegularized[999/1000,n-Floor[c],1+Floor[c]]

If Excel's "binomdist" function is also rounding down 'c, then this could be
the reason Solver doesn't work well. Solver doesn't work well at all if it
is using discontinuous functions.
--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"John" wrote in message
ps.com...
Find c and smallest n that satisfy the constraints

binomdist(c,n,p1,true)=1-alpha
binomdist(c,n,p2,true)<=beta

For the case p1=.001, p2=.002, alpha=.05, beta=.05, solver found the
solution

c=23, n=16288

Solver could not find the solution for the case p1=.01, p2=.05,
alpha=.05, beta=.10.

The solution, found by trial and error, is c=3, n=110.

Is this an idiosyncrasy of solver, or am I doing something wrong?

John Adams