Q:

Poisson process, probability

I would like to get a package. Packages arrive according to a Poisson process with rate . You believe in the magic of Easter (lets call it as time T) and you would like to get the very last package before Easter, meaning before time T. Your friend proposes a strategy to wait until a certain time (lets call it time S, where S

Note: So, your goal of this problem is to get the last package before time T whereas your strategy is to get the first package after time S. What would the probability that your strategy helps you achieve this goal?
The way I see this problem is we have 2 scenarios either first or last, but I have hard time figuring if there are more packages if that affects in any way.

A:

You'll get the last package before Easter exactly if exactly one package arrives between $S$ and $T$. Thus you want to maximize the probability for this to happen. The probability for a Poisson process with rate $\lambda$ to contain exactly one event during the time $\tau=T-S$ is $\lambda\tau\mathrm e^{-\lambda\tau}$. Setting the derivative with respect to $\tau$ to zero yields $\mathrm e^{-\lambda\tau}-\lambda\tau\mathrm e^{-\lambda\tau}=0$ and thus $\tau=\frac1\lambda$.

