I have a function with the following form:
P0 = 1 / Sum[(lambda^i)/((mu^i)*i!), {i, 0, B1}]
P = N[P0*lambda^B1/(mu^B1*B1!)]
Where mu and lambda are fixed parameters and B1 is unknown.
The code refers to a Markov chain process that I am calculating.
And I need to find the minimum integer value of B1 that corresponds to the constraint P(B1) <= 0.05
Since I am new to the Mathematica, I find it a bit hard to use a correct function. Could you please point me to a correct way of solving such a problem with Mathematica?
Thank you.
UPD
@ulrich-neumann provided a better way to define the function:
F[mu_, lambda_] := (E^(-(lambda/mu)) lambda^B1 mu^-B1 Gamma[1 + B1])/(B1! Gamma[1 + B1, lambda/mu])
And @akku14 has built on top of the previous commentaries to define B1's boundaries:
NMinimize[{(F[1/3, 8] - .05)^2, F[1/3, 8] <= 0.05, B1 > 1, Element[B1, Integers]}, {B1, 5, 50}]
to get {0.0000976008, {B1 -> 30}}
Ceiling[x /. FindRoot[f[x] == 0.05, {x, 100}]]
$\endgroup$