Half-Life Computation

== Probabilistic and Deterministic Computations ==
Because half life computations may be either probabilistic or deterministic it is important to consider the difference between each method since each method is used extensively in nuclear physics, chemistry, and medicine as well as in commerce, business and finance. In both cases half life computations refer to the amount of time it takes for one half of the components that make up a group to be eliminated from the group through successive half-life intervals of time. This book will explain both the probabilistic and the deterministic methods of half life computation and show how each method of computation is used. 
=== Growth and Decay ===
In the context of time when a group expands it grows and when it contracts it decays. The state of growth or decay is determined by means of comparing the current count of members with a previous count. If the previous count is less than the current count then the group is in a state of growth. If the previous count is greater than the current count then the group is in a state of decay. 
==== Linear Rates of Growth and Decay ====
Sometimes we need to know the rate at which a group is growing or decaying. If the time of the previous and the current count are known then the rate of change can be determined by subtracting the previous count from the current count to get the change in members and subtracting the previous time from the current time to get the change in time and then dividing the change in members by the change in time. Thus a previous count of 50 made last month and a current count of 60 made this month means a rate of growth of 10 members per month.
==== Exponential Rates of Growth and Decay ====
Using the example above it can be seen that it will take an additional 5 months to increase the membership from 50 to 100 and an additional 10 months to increase it from 100 to 200 and an additional 20 months to increase it from 200 to 400 at the rate of adding 10 members per month. Instead of doubling the number of months each time to get the same increase in membership we can instead double the number of members per month. Thus if we increase the number of members per month from 10 to 20 it will only take 5 additional months instead of 10 to increase the membership from 100 to 200 members. If we next increase the number of members per month to 40 it will again take only 5 additional months instead of 10 to reach 400 members. When the number of members doubles in the same interval of time the group may be said to double in size every 5 months and to follow a pattern of exponential rather than linear growth. This also applies to decay where groups which loose half of their members in 5 months are said to have a Half-life of 5 months duration. In this case and in the case of instantaneous compounding of interest Half-life computation is deterministic and the survival of it's members does not vary at random.
== The Deterministic Method - Compound Interest Rates ==
In the case of an annuity that is loosing money the half-life of the account may be determined if the age of the account and the percentage of the original value of the account that has survived is known by using the following deterministic formula: Half-life of the account equals the account's age times the natural logarithm of two divided by the natural logarithm of one divided by the percentage of the original value remaining in the account. (In this example the group is represented by the account and the members by the dollars.)
 {Half\ life} = age * \left[\frac{\ln \left({2}\right)}{\ln \left(\frac{1}{p}\right)}\right]
In some cases, however, Half-life is not deterministic but probabilistic and intended to represent cases in which the survival of each member is random. In other words the rate at which a group looses half of its members varies according to the laws of probability rather than according to a deterministic, stable, absolute, or fixed amount.
== The Probabilistic Method - Coin Flipping ==
The Half-life of any random activity such as tossing a coin is determined as simply one half of the possible outcomes. Any number of possible outcomes may be represented using the mathematical or computational equivalent of this method. The probability of survival for a group which has two possible outcomes or a Half-life of one can be represented by a coin with two sides where one side represents survival and the other side represents termination. Cards or balls of various numbers can be used to represent a higher number of possible outcomes. Each card or ball in the set is simply marked "terminal" except for one which is marked "survival" and the set is placed into a container. For each "toss" only one card or ball is retrieved, counted if it is labled "survival" and returned to the container to be ready for the next “toss.” (The container and contents are usually well shaken after each "toss.") If six balls or cards are used then the Half-life is three. Multiple items with only two possible outcomes may be considered as well by "tossing" each item and counting only the items which turn up "survival" sides. Multiple items with multiples sides may be used as well.
The starting number of tosses is determined (usually 100, but 1,500 is better) and all tosses are completed for the first Half-life period and the number of survivors are counted. The number of tosses for the next Half-life period is then set to the number of survivors that were previously counted and the process repeated until the number of tosses remaining is zero. This process is repeated once for each trial.
 Option Explicit
 Private Sub Form_Load()
 Randomize
 Dim a, i, j, c, n, d, e, h(), l
 n = 2 'number of sides, balls or cards
 l = n / 2 'number of tosses per Half-life
 a = 100 'number of tosses
 '----- initialize the array -------------
 ReDim h(a + 1, 20)
 For i = 0 To a + 1
 For j = 0 To 20
 h(i, j) = 0
 If i = 0 Then h(i, j) = j
 If j = 0 Then h(i, j) = i
 Next
 Next
 '----- begin doing trials --------------
 For j = 1 To 8 'number of trials
 e = 0 ' set number of half lives to zero
 a = 100 'initial number of tosses
 Do 'loop until remaining tosses reach zero
 e = e + 1 'count number of half lives
 c = 0 'reset survival count
 For i = 1 To a 'toss the number of times that equal previous survivors count
 d = Int(Rnd() * n) 'flip coin or retrieve ball or card
 If d <> 0 Then c = c + 1 'if coin, ball, or card survives then count it
 Next
 a = c 'reset number of tosses to count of survivors
 h(e, j) = c 'store count in the array
 'Debug.Print "Half-life:"; e; a; " tosses remaining"'verify operation
 'Stop
 Loop Until c <= 0
 Next j
 '-------- print chart ---------------
 For i = 0 To 20
 c = 0
 For j = 0 To 8
 Debug.Print h(i, j);
 If j > 0 Then c = c + h(i, j)
 Next
 Debug.Print
 If c = 0 Then Exit For
 Next
 '---------- end of program -------------
 End
 End Sub
=== Results ===
 Half-Life Rate of Survival (with Half-life period equal to one)
Half	 	 	 	 	 	 	 	 	
Life	Survival	Trial 1	Trial 2	Trial 3	Trial 4	Trial 5	Trial 6	Trial 7	Trial 8
1 	100.00% 	100 	100 	100 	100 	100 	100 	100 	100
2 	50.00% 	49 	46 	50 	55 	43 	55 	53 	59
3 	25.00% 	27 	17 	28 	23 	21 	26 	31 	29
4 	12.50% 	10 	13 	17 	9 	11 	11 	15 	20
5 	6.25% 	3 	4 	9 	7 	4 	4 	7 	9
6 	3.13% 	2 	1 	5 	4 	2 	2 	3 	4
7 	1.56% 	1 	 	2 	4 	2 	1 	2 	2
8 	.78% 	1 	 	2 	2 	1 	1 	1 	1
9 	.39% 	 	 	1 	1 	1 	1 	1 	
10 	.20% 	 	 	 	1 	 	1 	 	
11 	.10% 	 	 	 	 	 	 	 	
=== Carbon 14 Dating Application ===
The probabilistic computation of Half-life is easy to understand when presented in a simple and meaningful way using mathematical symbols and basic computer source code together. The purpose of this example is to demystify and explain the use of Half-life computation in determining the age of an archaeological sample.
The Half-life of Carbon-14 is 5,730 years (plus or minus 40 years). This means that radioactive emission from the decay of Carbon-14 into Nitrogen-14 after 11,460 years will be one quarter as much or the amount shown in the table above where ~25% of the Carbon-14 has survived. Why? The transition of Carbon-14 into Nitrogen-14 proceeds at the rate of one Half-life every 5,730 years which means that there will be only half as much Carbon-14 in an archeological sample that is 5,730 years old as compared to a sample that is created today. The following is an example of Half-life computation applied to the decay of Carbon-14. (Note: the symbol "ln" in the formula's below is generated by the Wikipedia math markup language and stands for "logarithm." Since there are both natural and base 10 logarithms it must be clarified that "ln" stands for natural logarithms while "log" in the basic code below also represents the natural logarithms.)
==== The age equation (percent of isotope) ====
:Where h is the archaeological isotope half-life and
:where p is the percent or portion of the isotope in the archaeological sample where
: p = \frac {1}{{2^n}} and 
:where n is defined by the ratio of the age of the archaeological sample and the isotope half-life
: n = \frac{age\ of\ archaeological\ sample\ }{half\ life\ } or
:where the number of isotope half lives in the archaeological sample are defined by
: n = \frac{\ln \left(\frac{1}{p}\right)}{\ln \left({2}\right)}
:and where age of an archaeological sample is defined as 
: age=h*n\ 
Specifically:
:Where h is the half-life of Carbon 14: 
: h=5730\ 
:and 
: p = \frac{1}{2^{\left({\frac{11,460}{5,730}}\right)}} 
:and the percent or portion of Carbon-14 in the archaeological sample is 25%:
: p=.25\ 
:and the number of Carbon-14 half lives equal to:
: 2 = \frac{\ln \left(\frac{1}{.25}\right)}{\ln \left({2}\right)}
:then the age of the archaeological sample will be:
: 11,460 =5730 * 2\ years
Basic language computer code
 Option Explicit
 Dim h As Double, p As Double, n As Double, age As Double
 Private Sub Form_Load()
 h = 5730
 'Where h is the Half-life of Carbon 14
 p = 0.25
 '(where p is the percent or portion of Carbon-14 in the archaeological sample) and defined by'
 'p = 1 / (2 ^ n)
 'and n is defined as the number of half lives
 n = log(1/p) / log(2)
 'and age of the archaeological sample is defined as
 age = h * n
 Debug.Print "Half-life", "Percent", "Half-lives", "Age"
 Debug.Print h, p, n, age
 End Sub
=== Relationship between equation variables ===
Image:Half-life.PNG
=== Other methods ===
==== The age equation (isotope proportions) ====
Considering that radioactive parent elements decay to stable daughter elements , the mathematical expression that relates radioactive decay to geologic time, called the age equation, is : 
 t = \frac{1}{\lambda} {\times} {\ln \left(1+\frac{D}{P}\right)} 
where
 t = age of the sample
 D = number of atoms of the daughter isotope in the sample
 P = number of atoms of the parent isotope in the sample
 \lambda = decay constant of the parent isotope
 \ln = natural logarithm
where
 {\lambda} = \frac{\ln (2)}{t_{1/2}} Decay Constant 
The decay constant (or rate of decay) is the fraction of a number of atoms of a radioactive nuclide that disintegrates in a unit of time. The decay constant is inversely proportional to the radioactive half-life.
and 
 t_{1/2} = half-life of the parent isotope, which can be obtained from tables such as the one given in :
==== Warning when modeling this age equation ====
(See: General disclaimer)
In accordance with the concept of "infinite ratio" when P reaches a value of zero the value of t is infinite (therefore making t greater than the amount of time since the Big Bang) which suggests a lower limit of P = 1.25 * 10^{-9}\ where P = \frac {D}{\exp {\left({t * \lambda }\right)}-1} such that the value of t in the equation t = \frac{1}{\lambda} {\times} {\ln \left(1+\frac{D}{P}\right)} does not exceed the amount of time since the Big Bang or approximately 16 billion years. The inability for P to reach zero in this equation without t having a value greater than the Big Bang is misleading and suggests that if the date of the Big Bang is valid that there will always be some value of P that is greater than zero whereas the number of atoms of the parent isotope are actually zero whenever the value of P falls below one. 
To understand this consider that P represents the number of grains of sand in the top bulb of an hour glass and D the number of grains of sand in the bottom bulb. If the top bulb (P) is full at the Big Bang and empty on the current date and the bottom bulb (D) is empty at the Big Bang and full on the current date then the number of grains of sand represented by P must be zero on the current date rather than being an amount greater than zero but less than one although this is what the above equation suggests. This is not a problem so long as the fractional part of P is truncated and any value that is less than one is considered to be zero rather than a fractional isotope or grain of sand.
Atoms of Carbon-14 decay as units and all units of Carbon-14 can decay completely.Lomn It is calculated that a mole of Carbon-14 atoms would decay to less than one atom within about a half million years. The age equation represents a statistical prediction of the rate of decay rather than an infinite curve.Woodstone Suppose that we could take the entire atmosphere and put it in a perfectly-sealed container for a million years. The atmosphere has a mass of about 5*10^21 g of which about 0.053% is CO2 Density and Mass. Thus the atmosphere contains about 6*10^16 mol C, and so roughly 4*10^28 atoms of 14C. Consider any one of those atoms: after 5730 years, the probability that it has not decayed is 0.5; so after a million years, the probability that it has not decayed is about 3*10^(-53). The probabilities for the different atoms decaying are independent. Thus the probability that even one atom of 14C is left in the container after a million years is about 10^(-24), i.e. effectively zero.Daphne A. There are two equations that may be used to calculate age.imho The first equation is based upon the percent of isotope in the archaeological sample as compared with the amount of isotope in a recent sample as being equal to 100%. Whether utilizing or modeling this equation a zero amount of isotope in the recent sample is not accepted and attributed to sample error. Although the second equation is based upon the proportion of daughter to parent isotope in the archaeological sample and an initial zero amount of parent isotope would likewise be rejected in the case of modeling the equation a value of parent isotope greater than zero amount would be accepted and then decremented. However, since a divide by zero error occurs whenever the value of the parent isotope amount reaches zero in the equation making it appear that the number of parent isotopes can never reach a zero amount it must be clarified when this equation is used in the article that the number of parent isotope atoms will equal zero whenever the parent isotope amount in the equation is less than one.imho
==Notes and References==