Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

In Matlab Given a random coin, i.e., one whose probability of heads p in a tossi

ID: 3277702 • Letter: I

Question

In Matlab

Given a random coin, i.e., one whose probability of heads p in a tossing is a random variable. In cases A, the probability of heads has (a priori) a uniform pdf in [0.3, 0.7 (i) Evaluate and plot the conditional (a posteriori) pdf of its probability of heads, given: Al. 12 heads outcomes in 20 tossings A2. 120 heads outcomes in 200 tossings A3. 12 heads outcomes in 30 tossings A4. 120 heads outcomes in 300 tossings (ii) Find the corresponding conditional expected values of p. (ii) Redo the above for cases B with the (wider) prior pdf given as uniform in [0.1, 0.9]. Cases B1-B4 have the same outcomes as Al-A4, only the prior is different. Comment on the results with these two priors How does the effect of the prior change the results from Al to B1 compared to the change from A2 to B2? (iv) Find the 90% probability region for p in each of the above cases. The probability region is defined as the smallest interval that contains a certain probability mass from the posterior pdf. This interval is obtained by finding two points on the pdf with equal height such that the integral of the pdf between them yields the desired probability. Note: you can do the (numerical) integration on your own or use existing software from the Internet.

Explanation / Answer

Rolling a single die

1) probability of rolling divisors of 6 :

Since its a single die, the possible outcomes are 1,2,3,4,5,6. All have equal probability(1/6) since its a fair die

Out of these divisors of 6 are 1,2,3,6. So P(divisors of 6) = 1/6*1/6*1/6*1/6 = 1/1296 = 0.0008

2) probability of rolling a multiple of 1: Since all(1,2,3,4,5,6) are multiples of 6 = 1/6*1/6*1/6*1/6*1/6*1/6= 1/46656 = 0.00002

3) probability of rolling an even number : There are 3 even numbers between 1-6 i.e. 2,4,6

Hence probability of rolling an even number = 1/6*1/6*1/6 = 1/216 =0.0046

4) List of all possible outcomes of rolling a single die ={1,2,3,4,5,6}

5) probability of rolling factors of 3 : Factors of 3 are 1,3

Hence probability of rolling factors of 3 = 1/6*1/6 = 1/36 = 0.0278

6) probability of rolling a 3 or smaller : 3 or smaller are 1,2,3. Hence the probability = 1/6*1/6*1/6 = 1/216 = 0.0046

7) probability of rolling a prime number: Prime numbers between 1-6 are 2,3,5 hence probability = 1/6*1/6*1/6=1/216=0.0046

8) probability of rolling factors of 4 : Factors of 4 are 1,2,4 hence the probability = 1/6*1/6*1/6 = 1/216 =0.0046

9) probability of rolling divisors of 30 : Divisors of 30 are 1,2,3,5,6 = 1/6*1/6*1/6*1/6*1/6 = 1/7776 = 0.0001

10) probability of rolling factors of 24: Factors of 24 are 1,2,3,4,6 = 1/6*1/6*1/6*1/6*1/6=1/7776=0.0001

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote