3 ms·
Log-odds difference from contingency table: ln (4×11) - ln (1×8) = ln (44/8) = ln 5.5 ~= 2.3 × lg 5.5 ~= 2.3 × 0.75 = 1.75. Standard error of log-odds differen
by kqr 1y ago
Log-odds difference from contingency table: ln (4×11) - ln (1×8) = ln (44/8) = ln 5.5 ~= 2.3 × lg 5.5 ~= 2.3 × 0.75 = 1.75.
Standard error of log-odds difference: √(1/1 + 1/11 + 1/4 + 1/8) ~= √(1 + 0.09 + 0.25 + 0.13) = √(1.47) = 1.47^0.5 = 10^(0.5 × lg 1.47) ~= 10^(0.5 × 0.16) = 10^0.08 ~= 1.2.
The effect is 1.75/1.2 ~= 1.5 standard errors from zero, thus not significant by common thresholds. You would find Fisher's exact test in agreement, but I like the (vepry slow) party trick of doing this all in my head. Techniques:
- Poor man's logistic regression: https://entropicthoughts.com/contingency-table-for-poor-mans-logistic-regression https://entropicthoughts.com/contingency-table-for-poor-mans...
- Mental logarithms: https://entropicthoughts.com/learning-some-logarithms https://entropicthoughts.com/learning-some-logarithms
- FabHK 1y agoVery neat! Just one comment: For square root of 1.47 you don't need to take the log, half it, and exp it again. It's just sqrt(147/100), or a bit more than sqrt(144/100) = 12/10 = 1.2. (If you like mental math you can then run an iteration of Newton's method: you take the remainder between the number and the square of your guess, 1.47-1.44 = 0.03, and divide it by twice your current guess, and add it to the current guess: 0.03 /(2x1.2) = 3/2.4 / 100 = 1.25 / 100 = 0.0125, so the next guess would be 1.2 + 0.0125 =1.2125. And the actual sqrt of 1.47 is 1.2124355653..., so that's pretty close. Newton's method roughly doubles the number of accurate digits at each iteration.)
- kqr 1y agoOh. That's actually very helpful. I hadn't realised Newton--Raphson could be that easy to use in practice. The closeness between 1.47 and 144 did strike me.
- FabHK 1y agoIndeed - taking the square root of numbers iteratively is very satisfying, because of the super fast convergence. Sqrt 10: Guess 3, then residual is 10 - 33 = 1, so next guess add 1/(23) = 1/6, so now we're at 3.166..., and the square of that is 10.0277..., so you're very close already.
- jacquesm 1y agoI did this in high school when we weren't allowed a calculator during tests and got into an argument with a teacher who told me that it is impossible to do this in your head so I must have cheated. A short demonstration on random numbers sufficed. I've taught my kids the method and they are now set up for similar arguments ;) The hardest part if you want to generate more digits is to keep track of the intermediary sum during the multiplication, that's why I never got past three significant digits. That would be an interesting little contest though!