Monday, September 25, 2017

Prony Method

Given N equispaced data-points \(F_i = F(t = i \Delta t)\), where \(i = 0, 1, ..., N-1\), the Prony method can be used to fit a sum of m decaying exponenitals: \[F(t) = \sum_{i=1}^{m} a_i e^{b_i t}. \] The 2m unknowns are \(a_i\) and \(b_i\).

In the Prony method, the number of modes in the exponential (m) is pre-specified. There are other methods, which are more general.

Here is a python subprogram which implements the Prony method.
If you have arrays t and F, it can be called as:

a_est, b_est = prony(t, F, m)

Friday, September 22, 2017

MCMC Samplers Visualization

A really nice interactive gallery of MCMC samplers

You can choose different algorithms, and target distributions, change method parameters and observe the chain evolve.

This might come in handy next semester, when I teach a Monte Carlo class.

Tuesday, September 19, 2017

Some Useful Math Links!

1. The history of the division  symbol (obelus) is fascinating! (DivisionByZero)

2. On the same blog: "What is the difference between a theorem, a lemma, and a corollary?"

3. The "glue function"

4. Free abridged Linear Algebra book from Sheldon Axler.

Saturday, September 16, 2017

Implicit Bias Test

I thoroughly enjoyed this Jesse Singal interview on Rationally Speaking on the problems with  the "implicit association test" for diagnosing implicit bias.

The following Dateline video shows how the test was sold to the public as scientifically robust.

For fun, you can take the test yourself.

For the problems with the test, check out Jesse Singal's piece from earlier this year, "Psychology’s Favorite Tool for Measuring Racism Isn’t Up to the Job". It is a thoughtful essay, that should be read in its entirety.
A pile of scholarly work, some of it published in top psychology journals and most of it ignored by the media, suggests that the IAT falls far short of the quality-control standards normally expected of psychological instruments. The IAT, this research suggests, is a noisy, unreliable measure that correlates far too weakly with any real-world outcomes to be used to predict individuals’ behavior — even the test’s creators have now admitted as such. The history of the test suggests it was released to the public and excitedly publicized long before it had been fully validated in the rigorous, careful way normally demanded by the field of psychology.
Singal is careful to point out that just because IAT is flawed it doesn't imply that implicit bias doesn't exist. I liked an analogy he used in the podcast. If a thermometer is flawed, you can't use it to determine if a person has a fever. The person may or may not have a fever, but the thermometer should probably be tossed away. 

Tuesday, September 12, 2017

Euler and Graph Theory

I have been enjoying Marcus du Sautoy's fine podcast of famous mathematicians for BBC4. 

Yesterday, I listened to the Leonhard Euler episode. While I always knew Euler was one of the top mathematicians of all time, his contributions are truly remarkable.

The podcast talks about how he solved the seven bridges of Konigsberg problem by inventing graph theory, and proving its first theorem. I looked at that theorem as it applies to a "kids game" in a previous blog.

Tuesday, September 5, 2017

Teacher's Day 2017

I did not expect writing this post would be so bittersweet. Last Teacher's Day, I decided I would use the occasion to highlight specific teachers, who have had an outsized impact on me.

Today, I am going to tell you about Kartic C. Khilar, or KCK as he was called at IIT Bombay. KCK was a central figure, and participant, as I navigated a period of multiple transitions.

Interestingly, I first "met" KCK even before I met him. The year I took the Joint Entrance Exam (JEE) to apply for admission to IIT, he was the principal administrator. The only reason I remember is because he had a "killer" last name (so juvenile, I know!).

Like 200,000 other rats, I studied relentlessly for two years. JEE is like academic Olympics. We trained like mental athletes: cardio, weights, pilates, the whole nine yards. Then, the starting gun went off, and we scampered. The first two thousand got in.

Miraculously, I tumbled my way into IIT Bombay first, and then to the chemical engineering department. KCK was the head of the department, when my "batch" arrived.

He taught us fluid mechanics and solid-fluid operations. He was a fantastic teacher - one of the best I've had. His lectures were crisp. He was always cheerful. And he cared about all his students - not just toppers.

He had one striking attribute: no ego. No made up sense of self-importance, which is all the more remarkable given the power gap between teachers and students (especially in India). If you went to his office, he would listen, despite how busy he was, or how unimportant you were.

A highlight of the undergrad program at IIT is the B. Tech project (BTP), which is the undergrad equivalent of a PhD dissertation. Again, due to a random set of circumstances, he ended up being my BTP mentor. Over the course of the last year and half at IIT our interaction deepened, if only because we met one-on-one on a weekly basis to discuss research.

Research in the Fluid Mechanics lab was fun. I don't think I would have embarked on a research career, if I hadn't enjoyed this experience so much. This work on "colloid-facilitated contaminant transport" with KCK and his grad student at that time - Tushar Sen - would end up becoming my first peer-reviewed publication.

I ended up at the University of Michigan as a grad student, in no small part due to his kind word. Michigan was his alma mater too. He visited Ann Arbor twice, while I was there. Once, when I was a PhD student, and later just before I started my new academic job at Florida State. Each time I went to Bombay, I would meet him; usually over lunch or dinner.

Throughout this period, he selflessly offered his mind for me to pick, and his ocean of experience for me to draw from. At several points during this journey, I abandoned hopes of an academic career. Each time, he listened without judgment, and quietly held a mirror to my desire for autonomy and passion for teaching. For better or for worse, he was instrumental in me ending up on the trajectory I am currently on.

And I couldn't be more grateful! Sometimes you try to peek over the horizon, but you can't see what a taller person who has been to more places can (in my case, that is literally true too).

In 2009, I shut the door to my office and wept, when I learnt about his untimely passing. He was 57, in great mental and physical shape, and I always expected him to be around forever.

When I first encountered KCK in 1994, I knew him as an administrator. Later at IIT he became my chairman and teacher, before becoming my BTP supervisor.

Somewhere along the way, he became a mentor, and a close friend; emails that started with "Dear Prof. Khilar" eventually started with "Dear Kartic".

Today, even though I knew it would bounce, I nearly wrote (to his familiar email address), "Dear Kartic, you are sorely missed." 

Saturday, September 2, 2017

Complex Numbers: Part Deux

I was pointed to this excellent series on complex numbers from Welch labs, following my last post on complex numbers. It in the 3Blue1Brown mold, with just the right dose of insight and animation. The complex number series starts with basic ideas, and ends with a discussion of Riemann surfaces.

I also came across an interesting way of proving exp(ix) = cos x + i sin x (@fermatslibrary), which I feel compelled to share, since we are already talking about complex numbers.

Let \(f(x) = e^{-ix} (\cos x + i \sin x)\).

The derivative of this function is \[f'(x) = e^{-ix} (i\cos x - i \sin x) - i e^{-ix} (\cos x + i \sin x) = 0.\] Since \(f'(x) = 0\), the function is a constant.

Also f(0) = 1, which implies f(x) = 1.

Thus, \(e^{ix} = \cos x + i \sin x\).

PS: One of my students told me last week about the new podcast (Ben, Ben, and Blue) that Grant Sanderson (of 3Blue1Brown) hosts on math, computer science and education. It is delightful.