All problems
Posterior Predictive Variance
Problem
Compute the posterior predictive variance as post_var + obs_var, combining parameter uncertainty with observation noise.
Return the sum.
Hint
Predictive uncertainty is never smaller than observation noise alone.
Test cases
case 1
in: [1,2]
expected: 3
case 2
in: [0.5,0.5]
expected: 1
case 3
in: [0,4]
expected: 4
case 4
in: [3,0]
expected: 3
Starter codePython
def posterior_predictive_variance(post_var, obs_var):
# Your code here
pass4 test cases · run your code against them in the editor