Question: Write a Python function likelihood taking die, an integer 1 giving the number of sides ofthe die, and roll, an integer 1 giving the roll.
Write a Python function likelihood taking die, an integer giving the number of sides ofthe die, and roll, an integer giving the roll. It should return the likelihood Prroll dieHint: It is a very short function only two or three lines
b
Write a Python function updatewithoneroll taking probs, a list of floatingpoint hypothesis probabilities Pr Pr Pr and roll, an integer from to giving thedie roll. The function should return a floatingpoint list of the updated probabilities. Hint: Useand include code for the likelihood function from part a
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
