Live data from Hacker News

The Lost Art of Logarithms

lostartoflogarithms.com

41–50 of 204 posts

Re: The Lost Art of Logarithms

#41
post #18
post #13

Earlier quoted context omitted.

Yes the office door stop as it was known as at our place. Top book though just faded in utility and no one had the heart to dispose of it because of the good memories.

Good book indeed, just that I wouldn't use a book to look up Win32 API functions.

Oh, the hours I'd spend browsing through tech books back in the day... good times.

Re: The Lost Art of Logarithms

#42
post #24

Earlier quoted context omitted.

How long do I have to study math to understand this?

to understand what they said, or to understand a proof of why it would be true? any stats class would be enough to understand what they said

I know what all these words mean, it "makes sense" to me in the sense that I read it and I think "ok.." but I wouldn't have the slightest idea how to use this to get weighted random samples or "generate event times."

So I guess I "understand it" in the sense that it doesn't sound like a foreign language, but I can't apply it in any meaningful way.

Re: The Lost Art of Logarithms

#43

Earlier quoted context omitted.

The Triangle of power explanation of logarithms is what really got me across logs. It wasn't until seeing the triangle and having the relationships explained that I had any clue about logarithms, up until then logs had been some archaic number that meant nothing to me. Because of the triangle of power, I now rock up to B and B+ Trees and calculate the number of disc accesses each will require in the worst case, depen…

Ironically, that notation, which I just discovered, confuses me more than anything else. Logs clicked for me when someone online said "amongst all the definitions we have for logs, the most useful and less taught is that log() is just a power". At that exact instant, it's like if years of arcane and foreign language just disappeared in front of my eyes to leave only obviousness and poetry.

That is not without humour :)

I don't understand the comment about it just being a power, but, for me, knowing that it's filling in the third vertice on the triangle with exponents at the top, and n on the other is what makes it work for me - I now know in my head when I am looking for the log of n, I am looking for the exponent that would turn the log into n.

I don't go looking for the exact log, I only look for whole numbers when I am calculating the value in my mind.

But it makes sense when I am looking for the log2 of 8 to know that the answer is "what exponent will make 2 into 8"? and that's "3"

Re: The Lost Art of Logarithms

#44

Here's an logarithmic fact that I've made use of frequently: If X is a random variable having a uniform distribution between zero and one, then –ln( X )/ λ has an exponential distribution with rate λ . This relationship comes in handy when, for example, you want to draw weighted random samples. Or generating event times for simulations.

The general version of this is called inverse transform sampling [0], which uses the fact that for the cdf F of any random variable X the random variable Y = F(X) has a standard uniform distribution [1]. Since every cdf increases monotonically on the unit interval, every cdf is invertible [2]. So apply the inverse cdf to both sides of the previous equation and you get F^-1(Y) = X is distributed like X.

Sampling from a standard uniform distribution and then using the inverse transform is the commonest way of generating random numbers from an arbitrary distribution.

0. https://en.m.wikipedia.org/wiki/Inverse_transform_sampling

1. https://en.m.wikipedia.org/wiki/Probability_integral_transfo...

2. Not every cdf is one-to-one, however, so you may need a generalized inverse.

Re: The Lost Art of Logarithms

#45
I found that looking at the original motivation of logarithms has been more elucidating than the way the topic is presented in grade-school. Thinking through the functional form that can solve the multiplication problem that Napier was facing (how to simplify multiplying large astronomical observations), f(ab) = f(a) + f(b), and why that leads to a unique family of functions, resonates a lot better with me for why logarithms show up everywhere. This is in contrast to teaching them as the inverse of the exponential function, which was not how the concept was discussed until Euler. In fact, I think learning about mathematics in this way is more fun — what original problem was the author trying to solve, and what tools were available to them at the time?

Re: The Lost Art of Logarithms

#46

Notation for writing log has always bugged me. Like I feel like it should be more like ^ which would be the log base 10 of 527. That's not it, but something. The current notation just doesn't feel quite right.

https://mathcenter.oxford.emory.edu/site/math108/logs/ Some people have suggested the "triangle of power".

I've never seen this before, and I LOVE it! I'm a new advocate!

Re: The Lost Art of Logarithms

#47
The Logarithmic derivative is also something that is surprisingly fundamental.

(ln(f))' = f'/f

In function theory you use it all the time. But people rarely notice, that it related to a logarithm.

Also the functions that have nice logarithmic derivative are a lot more interesting than expected. Nature is full of Gompertz functions. Once you're familiar with it, you see it everywhere.

Re: The Lost Art of Logarithms

#48
post #24

Earlier quoted context omitted.

How long do I have to study math to understand this?

Unless I'm missing something, this can just be directly verified, no “understanding” necessary. All you need to know is that probability distributions can be characterized by their probability density function (PDF). If Y=-ln(X)/lambda, then P(Y exp(-lambda a)) = 1-exp(-lambda a). And if Z is exponential with rate parameter lambda, then P(Z They have the same PDF, so they're the same distribution.

I mean if starting from scratch that seems like many years in most western education systems to get to probability, logarithms, exponentiation.

I would say If you knew 2+2=4, and not much else you're years away from 'understanding', if you know ln(exp(y)) = y, and P(x>0.5) = 0.5 for a uniform distribution on [0, 1) then you don't need any additional understanding.

I would bet the GP comment is somewhere inbetween the two extremes, but I think a random sampling of the population would likely result in people generally not knowing the log / exponentiation relation, or anything about the uniform distribution.

Re: The Lost Art of Logarithms

#49
post #24

Here's an logarithmic fact that I've made use of frequently: If X is a random variable having a uniform distribution between zero and one, then –ln( X )/ λ has an exponential distribution with rate λ . This relationship comes in handy when, for example, you want to draw weighted random samples. Or generating event times for simulations.

How long do I have to study math to understand this?

Possibly unhelpful answer: Arguably none! This is presented as a surprising fact, but you could easily argue that this is the proper definition of an exponential distribution. If you do

x = -log(rand())/lambda

a bunch a times, that comes from something, right? Well, let's call that something an exponential distribution.

From this perspective, the thing that actually needs math is finding the density function of the exponential distribution. (For that, in theory you just need calc 101 and probability 101.)

Post reply on HN