Showing posts with label math. Show all posts
Showing posts with label math. Show all posts

Wednesday, November 23, 2011

Clocks and Roulette Wheels


I've studied a fair amount of math during my education. Engineers were required to take four math classes: two semesters of calculus, differential and integral; multivariate calculus; ordinary differential equations. A fifth course in partial differential equations was recommended but optional. The engineering courses reinforced and built on this base. The prevailing wisdom was that the engineering department taught the same stuff as the math department, but better. I guess we all liked it better when the engineering department presented the material because it came with a context that fixed the ideas in your head.

I took all those and kept going. I decided to sign up for complex variables and linear algebra, just because I liked math. There were also two grad classes that presented integral transforms, calculus of variations, differential geometry, and generalized tensors. The numerical methods that I studied followed the same track: linear algebra for solving large systems of equations and eigenvalues; numerical integration; evaluation of special functions.

I never took a formal course in statistics or probability. The last two graduate classes that I took were in the statistics department: analysis of variance and design of experiments. I was glad to have taken them, but it certainly didn't turn me into a statistician.

I recount all this because it's finally occurred to me that I've missed out on something important. When faced with quantum mechanics and the loss of determinism, Einstein said the God did not play dice. I can't claim to know the gaming habits of God, but I can say that probability and statistics imbue everything around us. They're stand-ins for ignorance, an expression of what we don't know or are uncertain about.

Classical physicists, like Newton, Laplace and Einstein, viewed the universe as a clockwork. Anything could be predicted, given enough information. This is ironic in light of the great service that Laplace rendered to Bayes' theorem by putting it on such a firm mathematical footing. Quantum mechanics killed this idea in the small; non-linearity did the deed in the large. It's all a roulette wheel. Does that mean the universe is really a big casino?

I became aware of two schools of thought in statistics: frequentists and Bayesians. I read hints about the food fight that has been going on between the camps for two centuries, but I didn't understand exactly what it was about - until I read "The Theory That Would Not Die" by Bertsch MyGrayne. The writing style was a bit repetitive, but the story was wonderful.

There were two bits that I especially liked. The first was a quote from Jerry Cornfield to his two daughters as he lay dying: "You spend your whole life practicing your humor for the times when you really need it."

The second was from a section about Jimmie Savage and Dennis Lindley. As the amount of data increases, subjectivists move into agreement, the way scientists come to a consensus as evidence accumulates: "That's the way science is done."

I recently saw "Doing Bayesian Data Analysis: A Tutorial with R and BUGS" by John Kruschke on Amazon. I was intrigued. I knew Bayes and R; what was this BUGS thing about? But now I know, thanks to "The Theory That Would Not Die": it stands for Bayesian Inference Using Gibbs Sampling. There's even an open source project that implements it as a framework. I hope to check it out in the coming months.

I'm planning to add a few items to my must-read list. Probability will be on the list. So will Kruschke's book.





profile for duffymo at Stack Overflow, Q&A for professional and enthusiast programmers

Thursday, December 31, 2009

Still More LaTeX On The Web










A good friend has brought yet another library for embedding LaTeX into an HTML page to my attention. It's a JavaScript library called MathJax. It looks like MathJax builds on jsMath, a 2004 vintage JavaScript library.

The results look beautiful to me. If you're a scientist, it's got to be great to have such wonderful tools so freely available. The typesetting is taken care of for you; all you have to do now is imagine great applications. And the proof is left for you! QED, baby.



Sunday, November 29, 2009

More LaTeX On The Web












Sometimes I find myself in need of a GIF image of an equation or two. I want to be able to generate them quickly and easily, but I find that my MikTeX setup on Windows isn't helping.

Fortunately, Google found a utility that converts LaTeX to an image at EquationSheet.com. All I have to do is type in a snippet of LaTeX, hit the "convert" button, and I can see the equation rendered as an image. Even better, I can copy the URL and paste it into another HTML page as an image tag. Just what the doctor ordered!



Sunday, November 8, 2009

jsMath: Typesetting Math In A Browser










I just became aware of jsMath, a JavaScript library from the Math Union for typesetting mathematics in a browser.

The content from the web site says it far better than I will, but it looks like jsMath was inspired by the slow adoption of MathML support in browsers running under Windows, Mac, and *nix machines.

The examples that the web site offers look beautiful. It's based on TeX, so it's no surprise that the results look so good. I didn't get a chance to dive into it this weekend. Unseasonably nice weather on the East Coast made it possible for me to clean up all the leaves that were covering my yard, so time to program was hard to come by. But I'll be looking into this gem soon. It's a nice complement to my recent rediscovery of LaTeX.

It amazes me to see how smart people can come up with things like this. It's also another example of the increasing reach of JavaScript. Brendan Eich's language is becoming more important every day.