Sort by

recency

|

105 Discussions

|

  • + 0 comments
    import math
    
    lambd = float(input())
    k = int(input())
    
    poisson_prob = ((lambd ** k) * math.exp(-lambd)) / math.factorial(k)
    
    print(round(poisson_prob,3))
    
  • + 0 comments

    meanX = float(input()) value = int(input())

    p = ((meanX**value)math.e*(-meanX))/factorial(value)

    print("{:.3f}".format(p))

  • + 0 comments
    import math
    
    mean = 2.5
    k = 5
    
    p = pow(mean, k) * pow(math.e, -mean) / math.factorial(k)
    
    print(round(p, 3))
    
  • [deleted]
    + 0 comments

    Python Code :

    from math import factorial, exp
    
    miu = float(input())
    x = int(input())
    poisson_prob = ((miu ** x) * exp(-miu)) / factorial(x)
    print("%.3f" %poisson_prob)
    
  • + 0 comments
    from math import factorial as fc
    e, l, k = 2.71828, 2.5, 5
    print(f'{(l**k * e**-l) / fc(k):.3f}')