Skip to content
QuantReadySign In
#184easyStochastic Processes

Poisson Arrival Probability

Time Limit: 2sMemory: 256MB
Asked at:Citadel

Problem

Given a Poisson process with arrival rate λ\lambda and a time interval tt, compute the probability that exactly kk events occur.

Input Format

Three space-separated values: lambda t k (where lambda and t are floats, k is an integer).

Output Format

The probability to 6 decimal places.

Examples

Example 1
Input
3.0 2.0 5
Output
0.160623

lambda*t = 6. P(N=5) = 6^5 * e^(-6) / 5! = 7776 * 0.002479 / 120 ≈ 0.160623.

Example 2
Input
1.0 1.0 0
Output
0.367879

P(N=0) = e^(-1) ≈ 0.367879.

Constraints

  • 0 < lambda ≤ 100
  • 0 < t ≤ 100
  • 0 ≤ k ≤ 100
  • Output probability to 6 decimal places
Loading interactive editor…