Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This platform has got so much limitations that makes asking questions so much difficult. Please bear with me. 1. An occasionally dishonest casino uses two

This platform has got so much limitations that makes asking questions so much difficult. Please bear with me.

1. An occasionally dishonest casino uses two kinds of dice. A fair dice that has 1/6 probability of rolling any number, and a loaded dice that has 1/2 probability to roll a 3 and 1/10 probability to roll any other number. The probability that the casino switches from the fair to loaded dice is 0.01 and the probability of switching back from loaded to fair is 0.25. 

Sequentially record dice by Q={q1, q2, q3...}, and numbers rolled by O={o1,o2,o3...}, for example:q1=F, o1=2 means the first die is Fair, and by rolling the first die the number observed is 2. We also know P(q1=F)=P(q1=L)=0.5.

a) AreQ and OMarkov chains? If yes, find the transition matrix and stationary distribution. If no, explain why? (1pt)

b) using R to simulate q1,q2,......q200, and o1,o2,...o200. (1pt)

c) suppose we observe O={ o1=4,o2=2,o3=4,...,o1000=6} but do not observe Q={q1,q2,...q1000}, and after some calculation we know P(O,q1000=F)=a, P(O,q1000=L)=b, (0

d) suppose we observe O={ o1001=6,o1002=2,o1003=4,...,o2000=4} but do not observe Q={q1,q2,...q2000}, and after some calculation we know P(O|q1000=F)=a, P(O|q1000=L)=b, (0

e) suppose, you generate O={o1,o2,...,o200} as

> O

[1] 3 3 6 4 2 4 5 4 4 2 5 1 4 3 3 3 3 5 3 4 4 6 3 3 3 3 3 3 1 6 3 4 1 3 3 2 1

[38] 3 6 2 5 4 4 3 1 3 2 1 6 2 6 6 1 6 4 4 3 4 2 2 3 3 2 4 5 3 2 5 6 5 5 5 1 3

[75] 4 2 4 3 5 1 2 5 5 4 4 4 5 4 1 1 4 5 3 2 5 1 2 6 6 6 2 5 1 1 4 5 6 3 3 6 2

[112] 4 1 1 1 6 1 6 2 3 2 6 2 5 3 6 3 3 4 4 3 5 2 4 5 2 4 1 5 5 2 6 6 1 2 1 6 6

[149] 5 3 3 2 2 2 6 3 3 5 5 3 5 3 6 3 2 1 1 6 5 2 2 1 1 5 6 3 5 2 1 1 6 4 3 4 4

[186] 2 1 3 5 4 5 1 5 3 1 2 3 4 4 5

and Q={q1,q2,...,q200} as

> Q

[1] "L" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[19] "F" "F" "F" "F" "F" "L" "L" "L" "L" "L" "L" "L" "L" "L" "L" "L" "L" "L"

[37] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[55] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[73] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[91] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[109] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[127] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[145] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[163] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[181] "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F" "F"

[199] "F" "F"

Pretend you don't know Q, use Forward-Backward algorithm to estimate (Q'), and compare Q'with Q, what's the accuracy?print Forward table and Backward table, What are P(qi=F|O) and P(qi=L|O) for each i=1,2,...200 ? what is P(O) ? (8pt)

f) using the same O and Q as in e), use Viterbi to figure out Q*, and compare with Q, what's the accuracy? print table A and table B in log scale, print matrix q (6 pt).

g) suppose P(qi+1=L|qi=F)=0.4 for i being even number, P(qi+1=L|qi=F)=0.01 for i being odd number. Everything else remains the same.

We have

> O

[1] 6 2 2 4 3 3 5 3 4 1 5 4 2 2 2 6 6 5 6 3 6 3 3 6 3 4 3 5 6 3 5 3 2 3 2 4 6 3 6 5

[41] 3 3 3 5 1 1 4 5 3 3 3 3 4 3 3 3 4 5 3 5 3 4 4 6 3 4 6 3 3 3 3 3 3 4 3 1 2 3 6 6

[81] 4 2 1 3 3 5 3 4 3 3 1 3 5 3 3 3 3 3 3 4 6 3 3 2 6 6 5 3 2 3 6 3 3 3 5 1 3 3 3 3

[121] 3 2 3 4 5 6 3 5 6 6 6 2 2 4 2 6 4 4 3 5 4 3 3 3 3 1 3 4 2 1 1 5 2 6 1 6 5 3 3 6

[161] 5 3 1 1 1 6 3 5 3 1 4 3 2 5 3 3 2 5 6 4 1 2 1 3 2 1 2 1 5 1 3 3 1 4 1 1 3 1 3 5

> Q

[1] "F" "F" "F" "F" "L" "L" "L" "L" "F" "F" "L" "L" "F" "F" "F" "L" "F" "L" "L" "L"

[21] "L" "L" "L" "F" "F" "F" "L" "L" "F" "F" "F" "L" "L" "L" "L" "L" "F" "L" "F" "L"

[41] "L" "L" "L" "L" "F" "F" "F" "F" "L" "L" "F" "F" "L" "F" "L" "L" "F" "F" "L" "L"

[61] "L" "L" "L" "L" "L" "L" "L" "L" "L" "L" "L" "L" "L" "F" "F" "F" "L" "F" "F" "F"

[81] "F" "L" "L" "L" "F" "F" "L" "L" "L" "L" "F" "F" "F" "L" "L" "L" "F" "L" "F" "F"

[101] "F" "L" "L" "F" "L" "F" "L" "L" "L" "L" "L" "L" "L" "L" "F" "F" "L" "L" "F" "L"

[121] "L" "L" "L" "L" "F" "L" "L" "L" "L" "L" "L" "F" "F" "F" "F" "F" "L" "L" "L" "L"

[141] "L" "L" "L" "L" "F" "F" "L" "F" "F" "L" "F" "F" "L" "L" "L" "L" "F" "L" "L" "F"

[161] "F" "L" "F" "F" "F" "L" "F" "F" "F" "F" "F" "L" "F" "F" "L" "L" "F" "F" "F" "F"

[181] "F" "F" "F" "F" "F" "F" "F" "L" "L" "L" "L" "L" "L" "F" "F" "F" "L" "L" "L" "L"

>

Pretend you don't know Q, use Forward-Backward algorithm to estimate (Q'), and compare Q'with Q, what's the accuracy? What are P(qi=F|O) and P(qi=L|O) for each i=1,2,...200 ? what is P(O) ? (5 bonus pt)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Finite Mathematics and Its Applications

Authors: Larry J. Goldstein, David I. Schneider, Martha J. Siegel, Steven Hair

12th edition

978-0134768588, 9780134437767, 134768582, 134437764, 978-0134768632

More Books

Students also viewed these Mathematics questions