All problems
Renewal Expected Event Count
Problem
By the elementary renewal theorem, the expected number of renewals by time t is approximately t / mean_interarrival.
Given t and the mean interarrival time, return the expected count.
Hint
Long-run renewal rate is the reciprocal mean.
Test cases
case 1
in: [10,2]
expected: 5
case 2
in: [100,0.5]
expected: 200
case 3
in: [1,1]
expected: 1
Starter codePython
def renewal_expected_count(t, mean_interarrival):
# Your code here
pass3 test cases · run your code against them in the editor