Category: Mathematics
-
Probability of a run of heads
The question is: If you flip coins in a row, what is the probability that somewhere in those flips you’ll get a series of (or more) heads in a row? This is one that comes up periodically on Reddit, and I’ve answered it, though I’m not 100% I’ve always answered it exactly the same way…
-
Square roots
This post gives three methods for calculating square roots. You may have heard that, back in the stone age, we were taught how to calculate square roots by hand, by a method that looks something like long division. It’s true, and I was taught that method as part of Algebra class. So if you’ve wondered…
-
General Linear Least Squares Fitting
You might have heard of linear regression for fitting a straight line to data, such as in the picture below. But did you know that you can fit much more complicated functions to data, and the procedure is almost as simple? You may be surprised to learn that “linear” covers a lot more than straight…
-
Matrix calculus
This seems kind of esoteric but it’s the basis for really simplifying some complicated mathematics, like the general theory of least squares. It’s well worth working through if you’re going to be doing the linear algebra version of least squares or multivariable optimization. The two main results proved as theorems below: