# probability of a success?

This is related to a simple greenhouse effect simulation. A photon of infrared radiation starts at the surface of the planet. On its path into space, it can have in its path 1, 2, or 3 molecules of CO2 that will absorb and then emit the photon. These molecules are along a line. Each time a photon hits a CO2 molecule, there is a 0.5 probability (coin flip heads) that it will be emitted toward space and a 0.5 probabiliy (tails) that it will be emitted toward Earth.

So, if there is only 1 CO2 molecule, then the chance of the photon returning to Earth is 50%.

If there are 2 CO2 molecules, then it becomes more difficult.

There is a 50% chance that the photon hits the first CO2 molecule and is directed toward earth. That would be a failure. There is a 25% chance that the photon hits the first CO2 molecule is emitted toward space and is emitted by the 2nd molecule to space is then "lost" (a success in terms of planetary cooling). Obviously, though, the photon can bounce around for a while between these two molecules before finally hitting Earth or ending up in space. For instance, there is a 12.5% chance of a failure along this path (toward space, toward Earth, toward Earth). You can just keep considering rarer and rarer cases, obviously.

The number of paths to take into account increases with the more molecules present.

I am looking at Bernouli trials and negative binomial distributions to wrap my head around how to analyze this problem and understand it. But with no luck so far. I could write a program that would carry this simulation out many times to get a % success/% failure for millions of trials (millions of photons simulated) but that seems inelegant.

Can someone get me started on how to view this? Perhaps a general area of study I am missing? I am not familiar with how to think of an unknown number of subtrials (coin flips) that determine the overall trial (a photon).

• Just did 1,000 runs with 2 CO2 molecules as described above. The proportion returned to Earth was 2/3 and 1/3 of photons were lost to space. The case with 3 molecules is too convoluted to do with a simple spreadsheet, I believe. May 4, 2015 at 6:10
• bet you can simulate this easily in R, Matlab/Octave, or Python May 4, 2015 at 12:45

As @ssdecontrol mentions, it sounds like you have a Markov chain. The Markov property is that your current state doesn't depend on states you visited previously. At each molecule, there is a 50% chance of going either way and doesn't depend on which other molecule you came from.

The transition matrix describes the probability of going from one state to another. In this case, you would have the states {earth, 1, 2, 3, sun} and the matrix would be:

$$\left| \begin{array}{ccc} 1.0 & 0 & 0 & 0 & 0 \\ 0.5 & 0 & 0.5 & 0 & 0 \\ 0 & 0.5 & 0 & 0.5 & 0 \\ 0 & 0 & 0.5 & 0 & 0.5 \\ 0 & 0 & 0 & 0 & 1.0 \\ \end{array} \right|$$

So the first row would be: I am on earth, and I stay on earth. The second row would be: I am at the first molecule, and I have 0.5 chance of going to earth and 0.5 chance of going to molecule 2.

Given my understanding if your problem, you're looking at the subset of the protons on earth that get to molecule 1. That is your starting state. Of course, you can change the model to start on earth and have a non-zero probability to make it to molecule 1. If do you this, you also probably want to have a non-zero probability to go from space to molecule 3.

If you want to find out how many protons end up in earth or space, you're looking for the stationary/equilibrium/steady-state probability. The matrix represents the probability of where you'd end up in one step, given where you started. If you multiply the matrix by itself, it now represents where you'd end up in two steps given where you started. If you multiply the matrix infinite times, that will represent where you'd finally end up given where you started. There is a clean way of solving for this probability without multiplying, but this should be good enough for now. In this case, if you're starting at state 1, you have a 75% chance of ending on earth and 25% chance on space.

m <- matrix(c(1, 0, 0, 0, 0,
0.5, 0, 0.5, 0, 0,
0, 0.5, 0, 0.5, 0,
0, 0, 0.5, 0, 0.5,
0, 0, 0, 0, 1),
nrow=5, ncol=5, byrow=TRUE)

for (i in 1:100) {
m <- m %*% m
}
m


There are other questions you can solve by modeling the question this way. For instance, you can find out the expected number steps before the photon returns to a state. You can also find the number of visits to a specific state.

Though you don't mention it, I would think you might have more than 3 molecules. In general, this is called a Countable state Markov chain instead of a Finite state Markov chain. But in this specific case, it looks like the probability of making it into space from molecule 1 is $\frac{1}{numberOfMolecules+1}$. I found this by experimenting and not through a formal mathematical proof.

This is a stochastic process. Depending on your model and assumptions, it might be a Markov chain.

Stochastic Processes was one of the hardest classes I took in college and I don't remember much of it. But at least the term should be enough to get you started searching.

You're trying to model the probability of the photon reaching Earth? Then, if you do have a Markov chain, you have an absorbing Markov chain in which the absorbing states are reaching Earth and getting lost in space.

• Thanks. I did some reading. This is an absorbing markov chain. I found an exact analogy to 3 carbon dioxide molecules in an example called "drunkard's walk" which you can probably find online. It was a bit more complicated than I expected. May 4, 2015 at 13:55