Unable to understand how to compute CDF using python. I get the sum array but from there, how do I compute the probability of the cdf being <= 0.5. Any direction on the math would help.

Hello, @ninadmehta34

Recall from C3 W1 Lesson 2 that CDF is a sum of probabilities from the PDF, and it shows how much probability the variable has accumulated until a certain value.

One hint to solve this exercise is that you can do many (e.g. thousands) simulations of two dice rolls, sum each roll, and record the probabilities of the sums from those two rolls. Now, what have you obtained from that record of probabilities?

Cheers!

Ok. I was more confused about the python part than the math part but I figured some of the code out. Thank you for the prompt reply.

1 Like