FW: Mathematical Inquiry

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

FW: Mathematical Inquiry

Nick Thompson

 

Dear Mathematical Friammers,

 

What follows is a problem in mathematics, which, of course, has nothing to do with me. 

 

Jones is a diabetic, and he has a glucose monitor that gives him his exact blood glucose level moment to moment.  Jones notices at that after breakfast, his blood sugars behave in in very different manners, even though he eats exactly the same food every day, doesn’t exercise at that time of day ever, and takes exactly the same amount of insulin.  Some mornings, his blood sugar rises steadily for several hours after a meal, sometimes it falls steadily.  Only rarely does it remain steady.  One variable seems left for Jones to control and that is the exact timing of the relation between when he take his insulin and the time he begins his meal. 

 

So, Jones imagines a model as follows.  Because Jones always takes exactly the amount of insulin necessary to account for the amount of sugar he eats, he assumes that the curves of insulin activity and sugar activity are both normal curves, with the same median time and the same sd and, therefore, the same area under the curve.  However, one curve is offset from the other because sometimes Jones takes his insulin before he eats his sugar and sometimes he eats his sugar before he takes his insulin.  Bearing in mind that the Insulin curve SUBTRACTS from the sugar curve, Jones wonders about the shape of the difference curve that results from different offsets between eating his meal and taking his insulin.  He wonders if, perhaps, that this whole dramatic failure of control, could be due to the fact that on some days he takes his insulin a little too early and the sugar in the meal is slow to catch up and on other days, he takes it too late and the insulin is slow to  catch up.  Thus, the correct offset is a tipping point, an unstable equilibrium which is very difficult to achieve. 

 

Jones is not a mathematician, but he hangs around with mathematicians, and he suspects that there is a software that is readily available on line for free that would allow him to display the different curves that result from the different offsets and, perhaps, even better, display the function that relates the integral of the difference function as a function of the offset.   This function might have some interesting properties that could be used to guide Jones’s injection behavior. 

 

Does anybody have any thoughts on Jones’s predicament? 

 

Not that I care, but still,

 

Nick

 

Nicholas S. Thompson

Emeritus Professor of Psychology and Biology

Clark University

http://home.earthlink.net/~nickthompson/naturaldesigns/

 


============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
archives back to 2003: http://friam.471366.n2.nabble.com/
FRIAM-COMIC http://friam-comic.blogspot.com/ by Dr. Strangelove
Reply | Threaded
Open this post in threaded view
|

Re: FW: Mathematical Inquiry

Pieter Steenekamp
My approach would be as follows:
a) Start with MS Excel. It is very simple to use and help is very widely available. One can very easily draw very nice curves and dependent on what intuition comes out of observing the curves fit different simple models to the data and again draw curves of the model outputs against the original curves.
b) If this does not give satisfactory results, I would use H2O in R to build a deep learning model based on the data. There are very powerful data visualization packages in R to really go overboard to display the data in very fancy ways and then the deep learning models can very easily incorporate many more variables and more sophisticated models.

On Mon, 26 Aug 2019 at 11:42, Nick Thompson <[hidden email]> wrote:

 

Dear Mathematical Friammers,

 

What follows is a problem in mathematics, which, of course, has nothing to do with me. 

 

Jones is a diabetic, and he has a glucose monitor that gives him his exact blood glucose level moment to moment.  Jones notices at that after breakfast, his blood sugars behave in in very different manners, even though he eats exactly the same food every day, doesn’t exercise at that time of day ever, and takes exactly the same amount of insulin.  Some mornings, his blood sugar rises steadily for several hours after a meal, sometimes it falls steadily.  Only rarely does it remain steady.  One variable seems left for Jones to control and that is the exact timing of the relation between when he take his insulin and the time he begins his meal. 

 

So, Jones imagines a model as follows.  Because Jones always takes exactly the amount of insulin necessary to account for the amount of sugar he eats, he assumes that the curves of insulin activity and sugar activity are both normal curves, with the same median time and the same sd and, therefore, the same area under the curve.  However, one curve is offset from the other because sometimes Jones takes his insulin before he eats his sugar and sometimes he eats his sugar before he takes his insulin.  Bearing in mind that the Insulin curve SUBTRACTS from the sugar curve, Jones wonders about the shape of the difference curve that results from different offsets between eating his meal and taking his insulin.  He wonders if, perhaps, that this whole dramatic failure of control, could be due to the fact that on some days he takes his insulin a little too early and the sugar in the meal is slow to catch up and on other days, he takes it too late and the insulin is slow to  catch up.  Thus, the correct offset is a tipping point, an unstable equilibrium which is very difficult to achieve. 

 

Jones is not a mathematician, but he hangs around with mathematicians, and he suspects that there is a software that is readily available on line for free that would allow him to display the different curves that result from the different offsets and, perhaps, even better, display the function that relates the integral of the difference function as a function of the offset.   This function might have some interesting properties that could be used to guide Jones’s injection behavior. 

 

Does anybody have any thoughts on Jones’s predicament? 

 

Not that I care, but still,

 

Nick

 

Nicholas S. Thompson

Emeritus Professor of Psychology and Biology

Clark University

http://home.earthlink.net/~nickthompson/naturaldesigns/

 

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
archives back to 2003: http://friam.471366.n2.nabble.com/
FRIAM-COMIC http://friam-comic.blogspot.com/ by Dr. Strangelove

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
archives back to 2003: http://friam.471366.n2.nabble.com/
FRIAM-COMIC http://friam-comic.blogspot.com/ by Dr. Strangelove
Reply | Threaded
Open this post in threaded view
|

Re: FW: Mathematical Inquiry

gepr
Maybe start here?

https://rdrr.io/cran/CGManalyzer/

--
☣ uǝlƃ

============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
archives back to 2003: http://friam.471366.n2.nabble.com/
FRIAM-COMIC http://friam-comic.blogspot.com/ by Dr. Strangelove
uǝʃƃ ⊥ glen
Reply | Threaded
Open this post in threaded view
|

Re: [EXT] FW: Mathematical Inquiry

John Kennison
In reply to this post by Nick Thompson
Hi Nick,

I'm not a probabilist nor a statistician
but I think you could find a math web site that would give you what you want. The Wolfram Mathematica gives the normal distribution and I imagine that you could subtract one distribution function from another .

I'm not certain why you seem to think it would be normally distributed, which is symmetric in both directions. I vaguely think it would be some kind of beta function, in part because I remember pictures of beta distributions and they seen to be about right--but I have forgotten the hypotheses that would lead to such a function.

--John


From: Friam <[hidden email]> on behalf of Nick Thompson <[hidden email]>
Sent: Monday, August 26, 2019 5:41 AM
To: Friam <[hidden email]>
Subject: [EXT] [FRIAM] FW: Mathematical Inquiry
 

 

Dear Mathematical Friammers,

 

What follows is a problem in mathematics, which, of course, has nothing to do with me. 

 

Jones is a diabetic, and he has a glucose monitor that gives him his exact blood glucose level moment to moment.  Jones notices at that after breakfast, his blood sugars behave in in very different manners, even though he eats exactly the same food every day, doesn’t exercise at that time of day ever, and takes exactly the same amount of insulin.  Some mornings, his blood sugar rises steadily for several hours after a meal, sometimes it falls steadily.  Only rarely does it remain steady.  One variable seems left for Jones to control and that is the exact timing of the relation between when he take his insulin and the time he begins his meal. 

 

So, Jones imagines a model as follows.  Because Jones always takes exactly the amount of insulin necessary to account for the amount of sugar he eats, he assumes that the curves of insulin activity and sugar activity are both normal curves, with the same median time and the same sd and, therefore, the same area under the curve.  However, one curve is offset from the other because sometimes Jones takes his insulin before he eats his sugar and sometimes he eats his sugar before he takes his insulin.  Bearing in mind that the Insulin curve SUBTRACTS from the sugar curve, Jones wonders about the shape of the difference curve that results from different offsets between eating his meal and taking his insulin.  He wonders if, perhaps, that this whole dramatic failure of control, could be due to the fact that on some days he takes his insulin a little too early and the sugar in the meal is slow to catch up and on other days, he takes it too late and the insulin is slow to  catch up.  Thus, the correct offset is a tipping point, an unstable equilibrium which is very difficult to achieve. 

 

Jones is not a mathematician, but he hangs around with mathematicians, and he suspects that there is a software that is readily available on line for free that would allow him to display the different curves that result from the different offsets and, perhaps, even better, display the function that relates the integral of the difference function as a function of the offset.   This function might have some interesting properties that could be used to guide Jones’s injection behavior. 

 

Does anybody have any thoughts on Jones’s predicament? 

 

Not that I care, but still,

 

Nick

 

Nicholas S. Thompson

Emeritus Professor of Psychology and Biology

Clark University

http://home.earthlink.net/~nickthompson/naturaldesigns/

 


============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
archives back to 2003: http://friam.471366.n2.nabble.com/
FRIAM-COMIC http://friam-comic.blogspot.com/ by Dr. Strangelove
Reply | Threaded
Open this post in threaded view
|

Re: [EXT] FW: Mathematical Inquiry

Nick Thompson

Hi, John,

 

Thanks for answering.  I will look into the Wolfram site. 

 

Nick

Nicholas S. Thompson

Emeritus Professor of Psychology and Biology

Clark University

http://home.earthlink.net/~nickthompson/naturaldesigns/

 

From: Friam [mailto:[hidden email]] On Behalf Of John Kennison
Sent: Thursday, August 29, 2019 4:22 PM
To: Friam <[hidden email]>
Subject: Re: [FRIAM] [EXT] FW: Mathematical Inquiry

 

Hi Nick,

 

I'm not a probabilist nor a statistician

but I think you could find a math web site that would give you what you want. The Wolfram Mathematica gives the normal distribution and I imagine that you could subtract one distribution function from another .

 

I'm not certain why you seem to think it would be normally distributed, which is symmetric in both directions. I vaguely think it would be some kind of beta function, in part because I remember pictures of beta distributions and they seen to be about right--but I have forgotten the hypotheses that would lead to such a function.

 

--John

 


From: Friam <[hidden email]> on behalf of Nick Thompson <[hidden email]>
Sent: Monday, August 26, 2019 5:41 AM
To: Friam <[hidden email]>
Subject: [EXT] [FRIAM] FW: Mathematical Inquiry

 

 

Dear Mathematical Friammers,

 

What follows is a problem in mathematics, which, of course, has nothing to do with me. 

 

Jones is a diabetic, and he has a glucose monitor that gives him his exact blood glucose level moment to moment.  Jones notices at that after breakfast, his blood sugars behave in in very different manners, even though he eats exactly the same food every day, doesn’t exercise at that time of day ever, and takes exactly the same amount of insulin.  Some mornings, his blood sugar rises steadily for several hours after a meal, sometimes it falls steadily.  Only rarely does it remain steady.  One variable seems left for Jones to control and that is the exact timing of the relation between when he take his insulin and the time he begins his meal. 

 

So, Jones imagines a model as follows.  Because Jones always takes exactly the amount of insulin necessary to account for the amount of sugar he eats, he assumes that the curves of insulin activity and sugar activity are both normal curves, with the same median time and the same sd and, therefore, the same area under the curve.  However, one curve is offset from the other because sometimes Jones takes his insulin before he eats his sugar and sometimes he eats his sugar before he takes his insulin.  Bearing in mind that the Insulin curve SUBTRACTS from the sugar curve, Jones wonders about the shape of the difference curve that results from different offsets between eating his meal and taking his insulin.  He wonders if, perhaps, that this whole dramatic failure of control, could be due to the fact that on some days he takes his insulin a little too early and the sugar in the meal is slow to catch up and on other days, he takes it too late and the insulin is slow to  catch up.  Thus, the correct offset is a tipping point, an unstable equilibrium which is very difficult to achieve. 

 

Jones is not a mathematician, but he hangs around with mathematicians, and he suspects that there is a software that is readily available on line for free that would allow him to display the different curves that result from the different offsets and, perhaps, even better, display the function that relates the integral of the difference function as a function of the offset.   This function might have some interesting properties that could be used to guide Jones’s injection behavior. 

 

Does anybody have any thoughts on Jones’s predicament? 

 

Not that I care, but still,

 

Nick

 

Nicholas S. Thompson

Emeritus Professor of Psychology and Biology

Clark University

http://home.earthlink.net/~nickthompson/naturaldesigns/

 


============================================================
FRIAM Applied Complexity Group listserv
Meets Fridays 9a-11:30 at cafe at St. John's College
to unsubscribe http://redfish.com/mailman/listinfo/friam_redfish.com
archives back to 2003: http://friam.471366.n2.nabble.com/
FRIAM-COMIC http://friam-comic.blogspot.com/ by Dr. Strangelove