DAT 520 Problem Set 3Cumulative and Conditional ProbabilityOverview:The last problem set in Module Two exposed you to dependent trials that caused the probability to shift slightly with each choice of sock from the drawer. Kind of sneaky, eh? This problem set gets you a little further into conditional probability with a direct look at Bayes’ theorem. Since this is a course in decision analysis and not a course in probability, we are going to introduce these concepts, use them once or twice by hand, but then let R and Excel do the heavy lifting for us the rest of the time. This problem set, however, requires hand calculations. All you should need is a calculator and your wits. Example Problem:Example 1: You are flipping a fair coin four times in total, but you are flipping it in groups of two. In order to flip the coin for flips three and four, you have to get heads two times in a row for flips one and two.Problem Notes:Define success: Success for this problem is flipping a head, which is p=50%. Recall the binomial equation:Recall the Law of Total Probability equation: probability(item_1) * (item_1_%contribution) + probability(item_2) *(item_2_%contribution) + … Recall Bayes’ theorem:Questions for Example Problem:Q1: What is the probability of flipping heads four times in a row, generally?A1: Flipping 4 heads in a row is “4 choose 4” with p=.5 oUsing the binomial equation - (4!/(4-4)!*4!)*.5^4*(1-.5)^0oWe calculate this as .0625chance of flipping four heads on four flips, generally.Q2: The way this problem is set up, what is the total probabilityof getting four heads?A2: There are two identical events of two coin flips each. So, each one is “2 choose 2” with p=.5 ...use the binomial equation to calculate cumulative probability of each:(2!/(2-2)!*2!) * .5^2 * (1-.5)^0 = .25 or 25%We calculate this as 25% chance of flipping two heads on flips one and two. Same thing for flips three and four.