> In article
> <0332c69b-7e30-40cc-9ce0-f508a03b4...@l34g2000vbi.googlegroups.com>,
[quoted text clipped - 3 lines]
> For example, if u is a list of size 20, then you will get that error
> when you compute u[21]. Or u[3.5]. Or u[0].
A N Niel,
The program listed below correctly computes the answer to my problem,
but it also reports an error: invalid subscript selector.
with(Statistics):with(combinat,fibonacci):
> pbin:=(n,p,c)->stats[statevalf,dcdf,binomiald[n,p]](c):
> fib:=seq(fibonacci(i),i=1..25):
[quoted text clipped - 7 lines]
> end do;
> if pbin(L[3],p0,c)>=1-alpha then na:=L[3] else na:=L[2] end if;
[622, 766, 855, 998]
[622, 711, 766, 854]
[712, 766, 800, 854]
[712, 745, 766, 799]
[746, 766, 779, 799]
[746, 758, 766, 778]
[759, 766, 771, 778]
[767, 771, 774, 778]
[767, 769, 771, 773]
[770, 771, 772, 773]
[770, 770, 771, 771]
Error, invalid subscript selector
na := 771
A N Niel - 04 Jul 2009 01:11 GMT
In article
<47e03125-4411-49f5-aa83-44bb35a8ad6d@b9g2000yqm.googlegroups.com>,
> > In article
> > <0332c69b-7e30-40cc-9ce0-f508a03b4...@l34g2000vbi.googlegroups.com>,
[quoted text clipped - 15 lines]
>
> Error, invalid subscript selector
That's the spot where you compute fib[0] which is an invalid subscript
selector
> na := 771
Peter - 05 Jul 2009 22:07 GMT
> The program listed below correctly computes the answer to my problem,
>
> > fib:=seq(fibonacci(i),i=1..25):
> > n:=15:p0:=.01:alpha:=.05:c:=11:
> > L:=[c+fib[n],c+fib[n]+fib[n-3],c+fib[n]+fib[n-2],c-1+fib[n]+fib[n-1]]:
At this stage c=11, n=15, fib[15]=610.
Thus c+fib[n] = 621.
> > print(L);
> > [622, 766, 855, 998]
Your output shows 622 ?