## How Far is xy From yx on Average for Quaternions?

ModelingStatisticsposted by John Cook July 16, 2018

Given two quaternions x and y, the product xy might equal the product yx, but in general the two results are different. How different are xy and yx on average? That is, if you selected quaternions x and y at random, how big would you expect the difference xy – yx to be? Since this difference would increase proportionately if you increased the length of x or y, we can just... Read more

## Low-Rank Matrix Perturbations

ModelingStatisticsposted by John Cook July 12, 2018

Here are a couple of linear algebra identities that can be very useful, but aren’t that widely known, somewhere between common knowledge and arcane. Neither result assumes any matrix has low rank, but their most common application, at least in my experience, is in the context of something of... Read more

## Linear Regression and Planet Spacing

ModelingStatisticsposted by John Cook July 6, 2018

Linear Regression and Planet Spacing A while back I wrote about how planets are evenly spaced on a log scale. I made a bunch of plots, based on our solar system and the extrasolar systems with the most planets, and said noted that they’re all roughly straight lines. Here’s the... Read more

## Statistical Software Matters

ModelingStatisticsposted by Thomas Lumley June 29, 2018

This is a picture of all the genetic associations found in genome-wide association studies, sorted by chromosome. You can find more detail at the NHGRI GWAS catalog There are two chromosomes with many fewer associations. One is the Y chromosome. There isn’t much there because there isn’t much... Read more

## Partition numbers and Ramanujan’s approximation

ModelingStatisticsposted by John Cook June 25, 2018

The partition function p(n) counts the number of ways n unlabeled things can be partitioned into non-empty sets. (Contrast with Bell numbers that count partitions of labeled things.) There’s no simple expression for p(n), but Ramanujan discovered a fairly simple asymptotic approximation: How accurate is this approximation? Here’s a little Matheamtica code to see. p := PartitionsP... Read more

## Talking About Clinical Significance

ModelingStatisticsposted by John Mount June 22, 2018

In statistical work in the age of big data we often get hung up on differences that are statistically significant (reliable enough to show up again and again in repeated measurements), but clinically insignificant (visible in aggregation, but too small to make any real difference to individuals). An example would be: a diet... Read more

## Stirling Numbers, Including Negative Arguments

ModelingStatisticsposted by John Cook June 20, 2018

Stirling numbers are something like binomial coefficients. They come in two varieties, imaginatively called the first kind and second kind. Unfortunately it is the second kind that are simpler to describe and that come up more often in applications, so we’ll start there. Stirling numbers of the second kind... Read more

## Fixed Points of Logistic Function

ModelingStatisticsposted by John Cook June 15, 2018

Here’s an interesting problem that came out of a logistic regression application. The input variable was between 0 and 1, and someone asked when and where the logistic transformation f(x) = 1/(1 + exp(a + bx)) has a fixed point, i.e. f(x) = x. So given logistic regression parameters a and b, when does the logistic curve... Read more

## Relative Error in the Central Limit Theorem

ModelingStatisticsposted by John Cook June 12, 2018

If you average a large number independent versions of the same random variable, the central limit theorem says the average will be approximately normal. That is the absolute error in approximating the density of the average by the density of a normal random variable will be small. (Terms and conditions apply.... Read more

## Quantifying Uncertainty with Bayesian Statistics

ModelingStatisticsposted by Mat Leonard June 5, 2018

Whenever we’re working with data, there is necessarily uncertainty in our results. Firstly, we can’t collect all the possible data, so instead we randomly sample from a population. Accordingly, there is a natural variance and uncertainty in any data we collect. There is also uncertainty from missing data, systematic... Read more