Posts about nerdery

i can see clearly now

Here's a really excellent weather forecast graphic that the NOAA website has been producing for ages. I haven't found anyone else who makes one as useful. To find yours, go to weather.gov (easier to remember than to bookmark), put in your zip code, and search the forecast page for the word "hourly."

A plot of several different species of weather forecast, described
in detail in the main text.

I talk frequently about my wise who says "I believe weather reports, like 'it rained.'" But if I want to dissect how much to believe a forecast, this is the best one. Let's break it down.

Read more…

the james-stein estimator

I am reminded today by a video by "Mathemaniac" about the James-Stein estimator.

Suppose I'm trying to estimate a number $n$ of independent parameters simultaneously, by taking a sample from each one-dimensional normal distribution with unknown means $\mu_n$ and unit standard deviations $\sigma_n=1$. The naïve estimator is to use each sample $x_n$ as an estimate $\hat\mu_n$ of the mean. However, if my number of parameters is large enough, the zero-biased estimator

$$ \left(\begin{array}{c} \hat \mu_1 \\ \vdots \\ \hat \mu_n \end{array}\right) = \left( 1-\frac{n-2}{x_1^2 + \cdots + x_n^2} \right) \left(\begin{array}{c} x_1 \\ \vdots \\ x_n \end{array}\right) $$

actually produces a smaller mean-squared error on the ensemble as a whole.

Read more…

a fireball of a well-crafted sentence

I'm trying to decide which turn of phrase I like better here: the terrifically informative

the boiling temperature of paraffin wax is hotter than its autoignition temperature

or the low-hanging fruit that is

Don't try this at home! Do it at your friend's house first.

a time to repeat

Consider the following decimal expansions:

$$\begin{aligned} \textstyle \frac{1}{ 1 } &= 1.0 & \textstyle \frac{1}{ 11 } &= 0.[09] & % 0.09090909090909091 \\ \textstyle \frac{1}{ 21 } &= 0.[04761\,9] \\ % 0.047619047619047616 \\ % \textstyle \frac{1}{ 2 } &= 0.5 & \textstyle \frac{1}{ 12 } &= 0.08[3] & % 0.08333333333333333 \\ \textstyle \frac{1}{ 22 } &= 0.0[45] \\ % 0.045454545454545456 \\ % \textstyle \frac{1}{ 3 } &= 0.[3] & % 0.3333333333333333 \\ \textstyle \frac{1}{ 13 } &= 0.[07692\,3] & % 0.07692307692307693 \\ \textstyle \frac{1}{ 23 } &= 0.[04347\,82608\,69565\,21739\,13] \\ % 0.043478260869565216 \\ % \textstyle \frac{1}{ 4 } &= 0.25 & \textstyle \frac{1}{ 14 } &= 0.0[71428\,5] & % 0.07142857142857142 \\ \textstyle \frac{1}{ 24 } &= 0.041[6] \\ % 0.041666666666666664 \\ % \textstyle \frac{1}{ 5 } &= 0.2 & \textstyle \frac{1}{ 15 } &= 0.0[6] & % 0.06666666666666667 \\ \textstyle \frac{1}{ 25 } &= 0.04 \\ % \textstyle \frac{1}{ 6 } &= 0.1[6] & % 0.16666666666666666 \\ \textstyle \frac{1}{ 16 } &= 0.0625 & \textstyle \frac{1}{ 26 } &= 0.0[38461\,5] \\ % 0.038461538461538464 \\ % \textstyle \frac{1}{ 7 } &= 0.[14285\,7] & % 0.14285714285714285 \\ \textstyle \frac{1}{ 17 } &= 0.[05882\,35294\,11764\,7] & % 0.058823529411764705 \\ \textstyle \frac{1}{ 27 } &= 0.[037] \\ % 0.037037037037037035 \\ % \textstyle \frac{1}{ 8 } &= 0.125 & \textstyle \frac{1}{ 18 } &= 0.0[5] & % 0.05555555555555555 \\ \textstyle \frac{1}{ 28 } &= 0.035[71428\,5] \\ % 0.03571428571428571 \\ % \textstyle \frac{1}{ 9 } &= 0.[1] & % 0.1111111111111111 \\ \textstyle \frac{1}{ 19 } &= 0.[05263\,15789\,47368\,421] & % 0.05263157894736842 \\ \textstyle \frac{1}{ 29 } &= 0.[03448\,27586\,20689\,65517\,24137\,931] \\ % 0.034482758620689655 \\ % \textstyle \frac{1}{ 10 } &= 0.1 & \textstyle \frac{1}{ 20 } &= 0.05 & \textstyle \frac{1}{ 30 } &= 0.0[3] \\ % 0.03333333333333333 \\ \end{aligned}$$

Each of these either terminates, like $\frac18 = 0.125$, or repeats, like $\frac{1}{27} = 0.[037]$. What determines the length of these repeating sequences?

Read more…

positing variable precision

A semicircular arrangement of numbers
and bit patterns.

From this year's "summer of math exposition" collection , an explainer on the posit, a variable-precision representation of floating-point numbers.

The posit uses fewer bits to encode small exponents, so numbers whose magnitude is roughly unity can get a few extra bits of precision in the mantissa.

The intuition that most floating-point values have magnitude roughly unity is certainly consistent with my experience, and also consistent with guidance that I have received from various computing mentors. But it would be interesting to build a virtual CPU and monitor which values enter the FPU during normal operation, to check.

there were microtonal bells

I am interested in hearing from perfect-pitchers and ethnomusicologists about this delightful physics-of-music video.

I'm particularly interested in an aside observation that the "least dissonant" major third based on this overtone analysis is a little flat relative to the equal-temperament major third. In choral singing, the conductor is always complaining that the major third needs to tune a bit higher.