import math


def poisson_prob(n, _lambda):
    """The probability of k occurrences of a random variable having poisson distribution with expected value mu

    :param n: number of occurrences
    :type n: int
    :param _lambda: expected value
    :type _lambda: int
    :return: probability of k
    :rtype: float
    """
    return math.exp(-_lambda) * pow(_lambda, n) / math.factorial(n)