PLEASE DO ALL PARTS BESIDES (E) for full credit!!! thanks

Image text transcribed for accessibility: Consider the sample space mu ={H,T}2, and define the r.v. X as follows: X((H,H))=10; X((H,T))=5; X((T,H))=7; and X((T,T))=0. Calculate and plot the probability mass function for X Write a Matlab code to simulate this random variable n times. Estimate mu X using your simulation program as follows: for a given n, generate X, n times, and find its arithmetic mean. Plot this arithmetic mean as a function of n. Then increase n until your results begin to stabilize. Compare your estimated mean to the theoretical mean calculated from the usual formula for mu x. Write a short paragraph (1/3 page) on what you have learned from this exercise. You will be graded for your writing as well as the technical content of the paragraph.