CHAPTER 06.04: NONLINEAR REGRESSION: Exponential Model: Example: Part 1 of 2

 

In this segment, we'll talk about how to regress data to an exponential model with an example.  So let's go ahead and see what kind of example we are looking at.  This is a typical example of radiation which is . . . which exists when you go to do a CT scan, let's suppose.  So there are a lot of people who go for CT scans, about, there are about 20 million nuclear medicine procedures done in the world at one point or another . . . in a year, I should say.  And they use technetium 99m as the isotope which they put into the patient, and then able to do a CT scan on them.  Now, every time you put some kind of radioactive material, people get concerned that, hey, you are putting some radioactive material in the person. So, what we want to be able to do is that we want to be able to see that, hey, let's suppose we are given the relative intensity of this technetium 99m at particular time. So that's why you find out that the relative intensity right here is 1, because it is . . . it corresponds to time, t equal to 0, and we are given this relative intensity at different times, and what we want to do is we want to best fit this particular data to an exponential model.  So the relative intensity is exponentially decaying as a function of time, and we want to be able to find out what the value of A is, and what the value of lamda is, those are the two constants of the regression model, and then we want to find out that what is the intensity of the technetium 99m left over after the person has gone through a procedure, after 24 hours. Now, technetium 99m is a good isotope to use for these CT scans, because its half-life is about 6 hours.  So since the half-life is 6 hours, it gives you enough time to do the diagnostics, but at the same time, it gets out of your body soon enough. So it's a good isotope to be using, and there are quite a number of procedures which, in nuclear medicine, which use technetium 99m.  So let's go ahead and see that how we can go ahead and find out what these constants first are, for A and lamda, and then we will go ahead and find out what the relative intensity is after 24 hours. So this is the data which was given to us in the previous slide here.  So the gamma, the relative intensity is shown as data points as a function of time.  So you have one . . . you have one right here, which is the relative intensity, because the intensity is measured with respect to the intensity you have at time, t equal to 0.  So let's go ahead and see that how we're going to go about finding gamma and lamda . . . A and lamda.  Now, the value of lamda, if you look at the previous segment where we derived these equations, is found by solving a nonlinear equation.  So we have to, in order to be able to find out what the A and what this lamda is for this particular model, we have to solve a nonlinear equation.  This nonlinear equation which you have is f of lamda equal to 0.  Now, many times when people look at this particular equation, they find out that it's going to be very complicated.  That's not the case.  What you have is basically is that you have these four summations, you have summation number 1, summation number 2, and summation number 3, and summation number 4, and if you calculate these . . . if you calculate these summations, of course, all these summations are in terms of lamda.  lamda is the only unknown which you have in these summations. So each of these would be a function of lamda, and when you take this summation, minus the second summation, divided by the third summation, multiplied by the fourth summation, you are going to get what this f of lamda is, because that's what you are trying to find.  And then you can use any of the nonlinear equation techniques, such as bisection method, or secant method, or Newton-Raphson method, to be able to find out what the value of lamda is.  Now, A is then simply given by this expression.  So that's a simple expression, because once we know lamda, we can calculate A by simply calculating these summations in the numerator and the denominator. So the main focus here is that how do I go ahead and . . . how do I find out the root of this particular equation, f of lamda? So what I did was I took the data which was given to us, so this is the data which is given . . . which was given to us, and I calculated f of lamda, and I drew this plot in MATLAB, and what I find out is that the root of the equation is somewhere here. So this is the root of the equation, because that's where it's crossing the x-axis, and it turns out to be approximately equal to -0.1.  So that's where I'm getting lamda equal to -0.1 from a graphical point of view, because, again, what you've got to understand that what I am plotting is the left-hand side of the equation, which is f of lamda, I'm plotting this as a function of lamda, because everything else is known, because the gamma-is and tis are the data points which are given to us, so those are known quantities, from the data pairs, and then when I plot it as a function of lamda, this is the plot which I get, and I find out the root is close to -0.1. And the reason why I did a graphical plot is because it gives me a starting point.  It gives me a starting point for my root of the equation, because I'll have to use some kind of a numerical method to find out what lamda is.  Now, in the next slide, what I'm going to show you is that how did I set this up in MATLAB, this function, f of lamda.  So what I did was, in MATLAB, or any other program, if you are using Java and things like that, you can do similar things in those programs also, or any of the computational packages, such as Mathcad, Maple, Mathematica, you can do the same thing.  So here what we have is the . . . is the time taken which was have given to us, this is the relative intensity data which was given to us, gamma, and I'm calling it to be syms lamda.  The reason, the syms lamda means that lamda is a symbolic variable, that's what syms lamda means, and then what I am doing is I am calculating my four summations.  As I said that this is my first summation, this is my second summation, this is my third summation, and this is my fourth summation.  So these four summations which I have, I'm calculating them here.  This is my first summation, this is my second summation here, this is my third summation here, and this is my fourth summation which I am calculating, and I am using the sum . . . sum command of MATLAB to do these summations. You could very well do these summations in a loop, in a do loop to be able to do that, but in order to be able to conserve some space here, and also utilize MATLAB's . . . MATLAB's capabilities, I just used the sum command to calculate the four summations, and then the function f of lamda is nothing but sum1 minus sum2, divided by sum3, times sum4.  So then once the function f was . . . f was established, what I did was I used the solve command, but the solve command took a long time in MATLAB, it stayed busy for a long time on my . . . on my good old PC.  So what I did was I wrote my own routine for Newton-Raphson method, and started with an initial guess of -0.1, as I showed you from the previous slide, and within about a few iterations or so, it converged into . . . onto the root of lamda would be equal to -0.1151, that's what turned out to be the root of the equation.  So once we have lamda, then things are very simple, because lamda can be now substituted into . . . into this summation here, because lamda is known, and gamma and the tis are the data pairs, I can substitute it into the numerator and denominator, and I get the value of a to be 0.9998, that's what I get.  So from there, so since I know the value of lamda, which is -0.1151, the lamda -0.1151 and a is 0.998, I have been able to calculate what the regression model is.  Now, the question arises that, hey, if that's the regression model now which I have been able to calculate, now, what is the value of the . . . value of the relative intensity after 25 hours? What I did was now, I just plotted the data and the regression curve just to show you that how well the regression curve is close to the data points.  This is just a visual inspection, this does not mean that you are showing that the model is adequate, that's a separate segment. Here we are just showing a visual plot of the data points and the curve which we have.  So our goal was not only to find out the constants of the model, but also the relative intensity of the radiation after 24 hours. So all I have to do is to take my model and substitute the value of 24 for time, that's what I have done here, and it turns out to be that gamma is 6.31 times 10 to the power -2.  So if I look at how much relative intensity is left after 24 hours, I divide it by the intensity which . . . relative intensity which I have at time, t equal to 0, which is approximately 1, so I'll find out that after 24 hours, you are left with only about 6.317 percent of the intensity which you had once . . . after 24 hour relative to what you had when it was first injected into your body, which is a normal radiation, so you should not be worried about that, because that's something which you would even get in the sun any day, any summer day.  So technetium 99m seems to be a very safe radioactive material to use for nuclear medicine.