Deriving the Poisson distribution, can I symbolically compute this limit?

16 views
Skip to first unread message

Kyle Andrews

unread,
Jan 7, 2018, 6:02:02 PM1/7/18
to FriCAS - computer algebra system
Part of a derivation of the Poisson distribution involves computing the limit of:

p := product((n-i)/n, i=1..(x-1))

I can numerically "confirm" this limit by playing around with the values of n and x:

numeric eval(p, [n, x], [1000000, 30])

But I can't seem to come to a symbolic result:

limit(p, n=%plusInfinity) -- hint: should be 1

Is there some machinery already in FriCAS that would make this work?

oldk1331

unread,
Jan 8, 2018, 4:37:39 AM1/8/18
to fricas-devel
It should be solvable:

p1 := eval(p, n = 1/n)
limit(p1, n = 0)

The result is "1^(x-1)"

I think this is a bug. There should be something added for 'exprToGenUPS',
like r1645 for 'exprToUPS'.

Kyle Andrews

unread,
Jan 8, 2018, 8:08:04 AM1/8/18
to fricas...@googlegroups.com

Thanks for looking. I don't want to be to hard on FriCAS since I know this involves 2 variables. I know I can do better than numeric eval:

If I eval(p, x=30) :: FRAC POLY INT and then take the limit it works, and I can map across many x's to check.

But it if course would be nice to check every possible x in one go.


--
You received this message because you are subscribed to a topic in the Google Groups "FriCAS - computer algebra system" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/fricas-devel/zlKLkJrcddI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to fricas-devel...@googlegroups.com.
To post to this group, send email to fricas...@googlegroups.com.
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.

Kyle Andrews

unread,
Jan 8, 2018, 8:11:06 AM1/8/18
to fricas...@googlegroups.com
FYI, here was the code I was thinking about in my last reply.

map(j +-> limit(eval(p, x=j) :: FRAC(POLY(INT)), n = %plusInfinity), [-5, 0, 1, 15, 20, 23, 30, 50, 100])

oldk1331

unread,
Jan 8, 2018, 7:54:16 PM1/8/18
to fricas-devel
> I don't want to be to hard on FriCAS since I know this involves 2 variables.

It's not about 2 variables.

p := product((n-i)/n, i=1..(x-1))
limit(p, n=%plusInfinity)

That is equvalent to

p1 := product(1-i*n, i=1..(x-1)) -- eval(p, n = 1/n)
limit(p1, n=0)

FriCAS can handle that limit.
But due to the defect I mentioned, it can handle limit
from both side of 0, but not from one side of 0:

limit(p1, n=0, "right") -- gives "failed"

Waldek Hebisch

unread,
Feb 8, 2018, 12:20:10 PM2/8/18
to fricas...@googlegroups.com
I am not sure which one is worse: not getting one sided limit
or how we get two sided one. Namely, 'exprToUPS' contains
"last chance" expander which expands function into series
by taking successive derivatives. This expander should be
used for computing limits only when we know that there is
an expansion (and when there is an expansion we must be careful
as this expander can fail due to division by 0). Gruntz-Shackell
routines (mrv_*) perform checks that function is of expected form.
'limit' blindly passes expression to expander...

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages