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

analysis of algorithm 1. Consider the following game: You roll k fair six-sided

ID: 3796177 • Letter: A

Question

analysis of algorithm

1. Consider the following game: You roll k fair six-sided dice. For every 6 you roll you win S6, for rolling any other number you lose $1. (a) First assume k 1, so you only roll one six-sided die. Describe the sample space and the random variable for this experiment. (b) Compute the expected value of the random variable for k 1. (c) Now assume k 2, so you roll two six-sided dice. Describe the sample space and the random variable for this experiment. (d) Use linearity of expectation to compute the expected value of the random variable for k 2. Hint: Express your random variable as the sum of two random variables.) (e) Would you play this game?

Explanation / Answer

k fair six sided dice

on each dice for every roll of {6} we get $6.
for all other values of roll {1,2,3,4,5} we lose $1:

(a) Sample space and random variable for k=1
K=1 i.e. rolling one six sided die
sample Space = {1,2,3,4,5,6}

Random Variable at k=1 is given by:
   f(x)    = -1, for x = {1,2,3,4,5}
= 6 , for x = {6}
      

(b) Expected value of the random variable for k=1


Values of Random variable for k=1
Sample_Space    -> Win/Lose (In dollars($))    -> probability of outcome
{6}     ->    +6          ->   1/6
{1,2,3,4,5} ->     -1          ->   5/6
  

Expected Value = (-1)*(5/6) + (6)*(1/6) = -5/6 + 1 = 1/6 = 0.16666...


(c) Sample space and random variable for k=2
K= i.e. rolling two six sided die simultaneously
sample Space at k=2 is:
{1,2,3,4,5,6} * {1,2,3,4,5,6}   

= { (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),
(2,1),(2,2),(2,3),(2,4),(2,5),(2,6),
(3,1),(3,2),(3,3),(3,4),(3,5),(3,6),
(4,1),(4,2),(4,3),(4,4),(4,5),(4,6),
(5,1),(5,2),(5,3),(5,4),(5,5),(5,6),
(6,1),(6,2),(6,3),(6,4),(6,5),(6,6) }


Random Variable at k=2 is given by:
   f(x1,x2) = -2 , for (x1,x2) = ({1,2,3,4,5},{1,2,3,4,5})
= 5 , for (x1,x2) = ({1,2,3,4,5},{6}) or (x1,x2) = ({6},{1,2,3,4,5})
= 12, for (x1,x2) = ({6},{6})

(d) Expected value of the random variable for k=2, given by the sum of 2 random variables:


Values of Random variable for k=1
Sample_Space(x1,x2) -> Win/Lose (In $)    -> probability of outcome
({1,2,3,4,5},{1,2,3,4,5}) ->    (-1)+(-1)=-2 ->   25/36
({1,2,3,4,5},{6}) or ({6},{1,2,3,4,5}) ->     (6)+(-1)=+5 ->   10/36
({6},{6})   ->    (6)+(6)=+12 ->   1/36
  
Expected Value = (-2)*(25/36) + (5)*(10/36) + (12)*(1/36) = (-50/36)+(50/36)+(12/36) = 12/36 = 1/3 = 0.3333...

(e) Would you play the game?
   Yes I'll play the game because I am expected to win money. The chances of more win
   will increase If I play by rolling more dices in one go (k is large) and I play the
   game for more number of times.