You are stranded on a deserted island, and along the way you stumble across a genie. He says he will get you off the island provided that you can meet his conditions. He hands you a 20-sided die, and says that you need to roll it 1000000 (one million) times. If you can roll between 100000 and 100005 rolls of the numbers 8 – 10, he will teleport you off this island. Otherwise you are stuck here. What is the probability you will roll between 100000 – 100005 rolls of the numbers 8 – 10 while rolling the die 1000000 times?

Im afraid you are stuck, the probability is too small to calculate.
This is a simple binomial distribution problem; either you roll an 8,9,10 or you dont. The probability of yes is 3/20 = .15 So, with 1M rolls, the expected mean 8-10 is 150000, with a standard deviaiton of sqrt(.15*.85*1000000) = 357. Since 100,000 is 5000 rolls or 14 standard deviations away from the mean, there is virtually no chance.

To calculate the probability of rolling between 100,000 and 100,005 rolls of the numbers 8-10 while rolling the die 1,000,000 times, we can use the binomial probability formula.

The formula for the binomial probability is:

P(x) = (nCx) * p^x * (1-p)^(n-x)

Where:
P(x) is the probability of getting exactly x successes,
n is the number of trials,
x is the number of successes,
p is the probability of success in a single trial.

In this case, using a 20-sided die, rolling an 8, 9, or 10 is considered a success, so the probability of success in a single trial is p = 3/20 = 0.15.

To calculate the probability of rolling between 100,000 and 100,005 successes, we need to calculate the probability of rolling exactly 100,000, 100,001, 100,002, 100,003, 100,004, and 100,005 successes, and then sum them up.

P(100,000 to 100,005) = P(100,000) + P(100,001) + P(100,002) + P(100,003) + P(100,004) + P(100,005)

The formula can be simplified as:

P(x) = (nCx) * p^x * (1-p)^(n-x)

P(100,000 to 100,005) = (1,000,000C100,000) * (0.15^100,000) * (0.85^900,000) + (1,000,000C100,001) * (0.15^100,001) * (0.85^899,999) + (1,000,000C100,002) * (0.15^100,002) * (0.85^899,998) + (1,000,000C100,003) * (0.15^100,003) * (0.85^899,997) + (1,000,000C100,004) * (0.15^100,004) * (0.85^899,996) + (1,000,000C100,005) * (0.15^100,005) * (0.85^899,995)

However, calculating this value directly would be computationally intensive and time-consuming. Thus, we can conclude that the probability is extremely small.