Please help me with logarithms

dyoung99

New member
Joined
Aug 30, 2019
Messages
4
Hello, I'd be extremely grateful if someone can help me understand a logarithm. There is an equation that I need to be able to understand for my business purposes. If anyone can help me with the following:

% body fat = 86.010 x log10(abdomen - neck) - 70.041 x log10(height) + 36.76

Let's say the abdomen is 34, the neck is 16, the height is 70.

Can you please show me how this log10 is calculated? Maybe break it down for me. This is very important for me to be able to understand soon. Thank you very much in advance for any help you can provide.
 
Hello, I'd be extremely grateful if someone can help me understand a logarithm. There is an equation that I need to be able to understand for my business purposes. If anyone can help me with the following:

% body fat = 86.010 x log10(abdomen - neck) - 70.041 x log10(height) + 36.76

Let's say the abdomen is 34, the neck is 16, the height is 70.

Can you please show me how this log10 is calculated? Maybe break it down for me. This is very important for me to be able to understand soon. Thank you very much in advance for any help you can provide.
You'll need to use a "scientific calculator" or a spreadsheet program (like MS-Excel).
 
Hello, I'd be extremely grateful if someone can help me understand a logarithm. There is an equation that I need to be able to understand for my business purposes. If anyone can help me with the following:

% body fat = 86.010 x log10(abdomen - neck) - 70.041 x log10(height) + 36.76

Let's say the abdomen is 34, the neck is 16, the height is 70.

Can you please show me how this log10 is calculated? Maybe break it down for me. This is very important for me to be able to understand soon. Thank you very much in advance for any help you can provide.
If necessary, you could just go to Google and type in, say, log10(34-16), and it will tell you the answer (along with a lot of irrelevant stuff!)

Note that it's really [MATH]\log_{10}(34 - 16)[/MATH], the 10 being a subscript. Luckily Google didn't have trouble with that. You could just enter log(34-16), because it understands "log" to default to base 10 (though that's not true in more advanced math).

A calculator or other program is a better idea, though. In the old days, you'd look it up in a table, which someone spent his life compiling ... .
 
You'll need to use a "scientific calculator" or a spreadsheet program (like MS-Excel).
Thank you for your reply. The only problem is that I have to somehow be able to calculate this via online code. Thus when I enter data in such as the abdomen, neck and height the code will calculate the answer. Is this possible?
 
Thank you for your reply. The only problem is that I have to somehow be able to calculate this via online code. Thus when I enter data in such as the abdomen, neck and height the code will calculate the answer. Is this possible?
Does "online code" mean something? What code? What environment. Surely there's a logarithm function built in.

Please be more specific. If you were given "7 + 5", what "online code" would you use to provide the sum?

Perl uses "log()" for Base e.
Excel uses "log()" for Base 10.
C++ has a log(), log2(), log10() that seem to have pretty obvious definitions.
 
Yes I need the code in Javascript. I wasn't aware that C++ has a log function. I can possiby use that. But is there any way you can break down how I can find out the answer to the above for my own general knowledge?
 
To calculate a base 10 log in javascript, use:

Math.log(x)/Math.log(10)

This is using the change of base formula to get javascript's natural log function to return a base 10 value.
 
To calculate a base 10 log in javascript, use:

Math.log(x)/Math.log(10)

This is using the change of base formula to get javascript's natural log function to return a base 10 value.
Thank you MarkFL. Is there any way that you can tell me how to manually figure out the formula in dummy terms for my own knowledge?
 
Thank you MarkFL. Is there any way that you can tell me how to manually figure out the formula in dummy terms for my own knowledge?

I would assume the formula you gave comes from a combination of some biometric model, and data taken from some sample. Without knowing these details, I can't help with how it was derived.
 
Thank you MarkFL. Is there any way that you can tell me how to manually figure out the formula in dummy terms for my own knowledge?
What do you mean by "manually"? What do you mean by "figure out"?

If you mean "understand what it means", that would be where MarkFL is taking you.

If you mean "evaluate without a calculator", that's a problem unless you're satisfied with a very rough estimate. With a calculator it's easy, as has been explained.

But here's what I'd do for your example:

% body fat = 86.010 x log10(abdomen - neck) - 70.041 x log10(height) + 36.76​

If the abdomen is 34, the neck is 16, and the height is 70 (in whatever units are specified), then we have to calculate

86.010 x log10(34 - 16) - 70.041 x log10(70) + 36.76​

Very roughly, log10(18) is between 1 (log 10) and 2 (log 100), so I'd put it close to 1.1. Similarly, log10(70) will be closer to 1.8. So my rough estimate by eye would be around 86(1.1) - 70(1.8) + 34 = 2.6.

Doing it accurately with a calculator (I used the log button in the Windows calculator app in scientific mode), I find that log10(18) = 1.255. Similarly, log10(70) = 1.845. The result is therefore 86.010(1.255) - 70.041(1.845) + 36.76 = 15.476905.

The rough estimate wasn't very good ...
 
Out of curiosity, I searched for the formula just as you gave it, and found that it is repeated in many places. Looking for a relatively authoritative source, I found this: https://books.google.com/books?id=bqX4inSQ0jUC&pg=PA431

Searching further, I found this article testing its validity: https://pdfs.semanticscholar.org/caea/69eb8c61ef6779250e2254643101a719735a.pdf . That says, in its conclusion:

In conclusion, findings from this study suggest that the DOD equation for males does not adequately detect changes in body composition following a small body mass gain (≈ 2 Kg) in comparison to ADP. Although circumference-based prediction equations offer a quick and relatively non-invasive option for assessing body composition, they are of limited use if they cannot adequately detect changes in body composition. Further research is needed to identify field-based methods and/or techniques which are easy to implement and provide individually accurate estimates that can still adequately detect changes in body composition.​

I didn't find anything about the data from which it was derived.
 
The logarithm functions were developed in the 17th and 18th centuries, mostly to assist with calculations. When I was a very young man, you would use tables (I had over 100 pages of tables of logarithms) for exact work or, for rough estimates, a slide rule, which basically was a ruler denominated in logarithms.

To calculate logarithms by hand is extremely arduous, and, as Dr. Peterson has said, scholars spent entire careers building such tables.

It might make more sense to explain what they do. Assuming a, b, and c are positive numbers and a > 1

[MATH]log_a(1) = 0.[/MATH]
[MATH]0 < b < 1 \implies log_a(b) < 0.[/MATH]
[MATH]1 < b < a \implies 0 < log_a(b) < 1.[/MATH]
[MATH]log_a(a) = 1.[/MATH]
[MATH]a < b \implies 1 < log_a(b).[/MATH]
[MATH]log_a(b * c) = log_a(b) + log_a(c).[/MATH]
[MATH]log_a \left ( \dfrac{b}{c} \right ) = log_a(b) - log_a(c).[/MATH]
[MATH]log_a(b^c) = c * log_a(b).[/MATH]
[MATH]log_a(\sqrt[c]{b}) = \dfrac{1}{c} * log_a(b).[/MATH]
If you look carefully, you will see that more difficult computations with numbers were replaced by simpler computations with logaraithms. That is why they had such practical importance before cheap computers and scientific calculators. And that is why many scientific laws and approximations were expressed in terms of logarithms.

The chief importance today outside calculus and computer science is that logarithms provide a scale that indicates relative orders of magnitude.

[MATH]log_{10}(x) - log_{10}(y) \approx 3 \iff x \approx 1000y.[/MATH]
This is very helpful to give a feel for relationships that are at very different orders of magnitude.
 
Last edited:
Top