Problem 56483. Cricket - Average Partnership Contribution
The (infamous) Duckworth-Lewis method uses statistical models of how much each wicket partnership is worth to an innings (on average). Given an 10-by-n matrix representing the score at the end of each partnership (either by the fall of a wicket or the innings ending) for n innings, return a 10-element vector that gives the average proportion of the total score each wicket contributes. For innings that are completed without all 10 wickets falling, there will be NaNs for the partnerships that did not occur. (This means the total team score is the last non-NaN value in each column.) The average across the n sample innings should ignore NaNs.
If the total innings score is 200 and the first wicket fell at a score of 40, the first wicket was worth 0.2 of the total. If the second wicket fell at 60, it was worth 20 runs = 0.1 of the total. And so on.
Solution CommentsShow comments
Problem Recent Solvers33