Answer:
The expected value is 14/3 = 4.666
Step-by-step explanation:
When you throw a roll the expected value is 3.5 (the average of 1,2,3,4,5 and 6). This means that any roll with value 3 or below is worth changing, because the expected value will transform into 3.5 from the 3 or less you had before.
This means that in your second roll you will keep the result as long as it is 4 or more and you will roll once more if it is 3 or less, hence, you can
Rolling a third time has a probability of 3/6 = 0.5, obtaining a 4 has a probability of 1/6, same for 5 and 6. Thus, the expected value from the second roll onwards is
1/2 * 3.5 + 1/6 * 4 + 1/6 * 5 + 1/6 * 6 = 4.25
This means that, after the first roll, we can keep that value or throw again with an expected value of 4.25 (using the strategy depicted above). We can roll again if we got a result of 4 or below expecting a higher value or keep a result of 5 or 6.
The strategy can be ssummarized as follows
The probability of getting 4 or below is 4/6 = 2/3, and the expected value for the second roll onwards is 4.25, hence the expected value of the strategy we pick is
1/6 * 5 + 1/6*6 + 2/3* 4.25 = 4.666 = 14/3