You have an urn with 10 coins in it: 9 fair, and one that is heads only. You draw a coin at random from the urn, then flip it 5 times. What is the probability that you get a head on the 6th flip given you observed head on each of the first 5 flips?
Let $H_i$ be the event we observe head on the $i$th flip, and let $C_i$ be the event we draw the $i$th coin, $i = 1,…,10$.
Then we wish to calculate (using range syntax for brevity)
$$(
P(H_6 | H_1 H_2 H_3 H_4 H_5) = P(H_6 | H_{1:5})
$$)
Conditioning on which coin we drew, and exploiting the symmetry between coins 1 to 9:
Alternatively, you can use R to calculate the probability via brute force by repeatedly sampling according to our problem and counting the number of heads observed.