Solved

calculation of semilog line

Posted on 2010-09-17
17
503 Views
Last Modified: 2012-05-10
Hi could someone tell me how to calculate the Y I'm asking.

Thx ORDINATE axis is scaled SEMILOG
0
Comment
Question by:cilerler
  • 8
  • 6
  • 3
17 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 33704997
Semi-log generally refers to the axes of the graph, and on the log axis, 0 would be infinitely far away, so the the graph you have drawn  is not semi-log

And labeling only two points is not enough to determine the equation of the red curve, since there are an infinite number of curves that match those two points.
0
 

Author Comment

by:cilerler
ID: 33705127
thx for quick reply,  my graph will never go to 0 so it is not the case here but thx for the heads up.

you are right, I realized after your post when I drew that graphic, I didn't use logarithm on Y axis.
and if I use it won't help me on what I need to do.

So what is the way of doing this? what I need?  I mean on linear grahic, how to calculate semilog line (it is semilog confirmed) :) based on given points.

Thx
0
 
LVL 27

Expert Comment

by:aburr
ID: 33705172
Your x axis does not appear to be linear. If it were your question could be answered.
I find it hard to understand a curve labeled linear plotted on a graph with no linear scale
You can get an approximation if you assume the x axis between the last two labeled points on the linear scale is linear.
y = 3.6
0
 

Author Comment

by:cilerler
ID: 33705220
dear abur,
thank you for the reply.

X is linear it start from 0 ...  ends at 10000 and increases 1 on each point
and ~3.62376 is the number i  should get (it is estimated like yours) so I'm sure the formula you used is the one i need, may i get the formula please?

thx
0
 
LVL 27

Expert Comment

by:aburr
ID: 33705306
Label the three known points 1, 2, 3.

then the required y is obtained by solving

y2 - y3 divided by a measurement off your graph of the vertical distance between points 2 and 3.
this number is set equal to the desired y divided by the measured distance on your graph of the vertical distance between the ? point and point 3.
-
I measured the required distances off my computer screen. the scale factor between your graph and my screen cancels out.
0
 
LVL 84

Expert Comment

by:ozo
ID: 33705324
a straight line on a semi-log graph would have the form log(y) = a+b*x
so solving for a and b given
 log(7.71695) = a+b*1
log(5.0999) = a+b*191
gives
log(y)=2.04559919918196 - 0.00217999092925162*x
so
log(3.62176818616628) = 2.04559919918196 - 0.00217999092925162*348
0
 

Author Comment

by:cilerler
ID: 33705404
@aburr => I'm sorry but having trouble to following you could you give me a direct formula?
@ozo => thx a lot last favor, could you show write me step by step how did you get the conclusion

log(7.71695) = a+b*1
log(5.0999) = a+b*191
gives
log(y) = 2.04559919918196 - 0.00217999092925162 * x

thx...
0
 
LVL 84

Expert Comment

by:ozo
ID: 33705459

log(5.0999) = a+b*191
-
log(7.71695) = a+b*1
log(5.0999)-log(7.71695) = (a-a) + b*(191-1)

(log(5.0999)-log(7.71695)) / (191-1) = b

log(7.71695) - b*1 = a
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 27

Expert Comment

by:aburr
ID: 33705489
There is no direct formula because my method required two measurements taken off you graph. I used physical measurements because there were difficulties with you graphing.
-
Ozo assumed that your points would form a straight line on a true semi-log plot. A straight line has an equation like z = bx + a, He solve two equations (from your two known points) and used the a and b to calculate the coords of the third point. His answer of 3.62176818616628 (the same as mine but with more decimals) shows that his assumption is likely correct. And that my assumption of linearity in the drawing was not too far off either.
0
 

Author Comment

by:cilerler
ID: 33705807
@ozo: so based on what I understood the below is the formula will be

log(y1)=a+b*x1
log(y2)=a+b*x2
log(y2)-log(y1)=(a-a)+b*(191-1)
b=(log(y2)-log(y1))/(x2-x1)
a=log(y1)-b*1
log(y3)=(log(y1)-((log(y2)-log(y1))/(x2-x1))*1)+((log(y2)-log(y1))/(x2-x1))*x3

final part, how can I leave y3 alone?  for example if it was base 10 then I should do this
y3=10^((log(y1)-((log(y2)-log(y1))/(x2-x1))*1)+((log(y2)-log(y1))/(x2-x1))*x3)
but what I should do if there is no base shown...

actually I tested on base 10 and it did give me correct answer I'm just trying to understand what is the default base value of Log so i can place it if there is no log base...

thx
0
 
LVL 84

Expert Comment

by:ozo
ID: 33705826
a=log(y1)-b*x1
base of the log doesn't matter, as long as you are consistent.
0
 

Author Comment

by:cilerler
ID: 33705859
I'm sorry that pushing it just have to put in a code and couldn't understand it.
so if we say log(y3)=t+z how do you write y3=...
0
 

Author Comment

by:cilerler
ID: 33705866
This might give you idea what I need
Dim b As Double = (Math.Log(y2) - Math.Log(y1)) / (x2 - x1)
Dim a As Double = Math.Log(y1) - b * x1
Dim logY3 As Double = a + b * x3
'Below is the final part of the puzzle :)
Dim y3 as Double = Math.Pow(10, logY3) '<= is this correct?

Open in new window

0
 
LVL 84

Expert Comment

by:ozo
ID: 33705885
it would be correct if Math.Log is base 10
do you have a corresponding Math.Exp?
0
 

Author Comment

by:cilerler
ID: 33705995
Math.Exp is available but when I used it calculation changed so I tried Log10 with Power based on 10 and it did work.  After that I tried another points and have a problem.  Any idea?

x1=1
y1=0.31398
x2=51
y2=0.324621
x3=1453
it calculates y3 as 0.82650432082886593 which should be ~3.54-3.55
based on calculation
a = -0.50338750739956328
b = 0.00028949252287212567
0
 
LVL 84

Accepted Solution

by:
ozo earned 500 total points
ID: 33706038
I get 0.8265 too
Perhaps you do not have a straight line on a semi-log plot.
0
 

Author Closing Comment

by:cilerler
ID: 33706351
I believe the software I'm using has a problem.  OZO, you made my day.  thank you very much for all your help...

Also let me ask you one more question regarding to this one...

I can get slope with =(Y2-Y1) / (X2-X1) and linear value of the point with =( ( Y2 - Y1 ) / (X2 - X1 ))*( X3 - X1 ) + Y1

isn't there any formula to use these values to get semilog value?  the reason I'm asking is the software I'm using shows the slope and value on that semi log line and I assume they may use these values to calculate it... any idea?

thank you very much again
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
practical examples of speak from 'stomach' 3 132
Sample Space 12 38
Binomial distribution 2 47
Triangles - computing angles 7 38
Introduction On a scale of 1 to 10, how would you rate our Product? Many of us have answered that question time and time again. But only a few of us have had the pleasure of receiving a stack of the filled out surveys and being asked to do somethi…
How to Win a Jar of Candy Corn: A Scientific Approach! I love mathematics. If you love mathematics also, you may enjoy this tip on how to use math to win your own jar of candy corn and to impress your friends. As I said, I love math, but I gu…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now