MATLAB Answers

Error when solving an equation involving a poisson pdf

3 views (last 30 days)
Hello, I am trying to find for what values of lambda P(X=10) = 0.1, if X~Po(lambda)
My code is:
syms lambda
solve(poisspdf(10,lambda)==0.1, lambda)
the error I get is:
'error using symengine. Unable to prove 'lambda<0' literally . Use 'isAlways to test the statement mathematically
any help would be much appreciated!


Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 17 Nov 2019
Try this (instead of using the Symbolic Math Toolbox):
lambda = fzero(@(lambda) poisspdf(10, lambda) - 0.1, 5)
lambda =


Louis Sharma
Louis Sharma on 18 Nov 2019
Thanks this is great! By looking at my plot, I see that there are 2 solutions to this equation (I selected lambda=0:1:20). Any idea how I could get the second solution?
Thank you so much!
Louis Sharma
Louis Sharma on 18 Nov 2019
actually I was able to ge the second solution by changing the range. Thanks
Star Strider
Star Strider on 18 Nov 2019
As always, my pleasure!
(I was sleeping, not ignoring you!)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by