You are on page 1of 18
2117122, 10:58 AM 7. Log-Lag and Semilog Graphs v 7. Graphs on Logarithmic and Semi-Logarithmic Axes by M. Bourne Ina semilogarithmic graph, one axis has a logarithmic scale and the other axis has a linear scale, In log-log graphs, both axes have a logarithmic scale. ‘The idea here is we use semilog or log-log graph axes so we can more easily see details for small values of y as well as large values of y. You can see some examples of semi-logarithmic graphs in this YouTube Traffic Rank graph. See also air pressure and Zipf Distrbutions later on this page. Semi-Logarithmic Graphs In the following set of axes, the vertical scale is logarithmic (equal scale between powers of 10) and the horizontal scale is linear (even spaces between numbers). ‘There are no negative numbers on the y-axis, since we can only find the logarithm of positive numbers. htpsAwwwintmath com! sxponentiaLiogarithmic-unetions!T-graph-log-semilog.php oe 2117122, 10:58 AM 7. Log:Lag and Semilog Graphs 100 v 20 10 4 2 1 0 1 2 Semilogarthmic axes. NOTE: The numbers on the y-axis become too close together near each integral power of 10, so they have been removed for readability, Example 1: Graph of y Let's see what the simple graph y = z looks like on different axis types. a. y = con Linear Axes htps:hwwwintrath comfexponential-ogarthmic“unctions/7-graphs-log-semilog php 218 2117122, 10:58 AM 7 LogrLag and Semistog Graphs v O y (On ordinary linear axes, the graph of y = wis a straight line, passing through (~2,—2), (-1,—1), (0,0), (11), (2,2), etc. Ay htps:wwwintrath comfexponential-ogarthmic“unctions/7-graphs-log-semilog php ane 2117122, 10:58 AM 7 LogeLag and Semitfog Graphs Graph of fon linear (isin) axes. = 2 on Semi-logarithmic Axes (vertical axis logarithmic, horizontal axis linear) 10 0.2 OL 0.02 2 001 > 10 1 2 38 4 56 6 Graph of y = 2 on semilogarithmic (log-in) axes. I've marked the points (1, 1), (2,2). (3,3). (4,4) (5,5). (6,6) on the curve. ¢.y = 2 on Semi-logarithmie Axes (vertical axis linar, horizontal axis logarithmic) sy 10 9 8 1 6 5 4 3 2 1 z > = 0.01 o 1 10 Points along the curve y = 2 on ling axes. I've marked the points (1, 1), (2,2), (3, 3) up to (10, 10) on the curve, Notice there are no negative values for « on a linlog curve. Semi-logarithmie graph examples (@) Traffic charts htps:hwwwintrath comfexponential-ogarthmic“unctions/7-graphs-log-semilog php ane 2117122, 10:58 AM 7 LogeLag and Semitfog Graphs ‘The popularity of the site imeem.com grew very rapidly in 2006/7. Here is Alexa’s graph of that growth, using a linear horizontal scale (years) and a logarithmic verical scale for popularity rank (where rank=1 means most popular). 1000 10,000 4 100,000 2006 2007 (©2007 sles 2007 ay 25 Rank of imeem over time. (b) Financial charts ‘The financial industry makes use of semilogarithmic scales to make charts easier to read, See this Gold prices chart as an example, Example : Variable Exponent We conducted some observations in an experiment involving growth of a microbial population at different temperatures and obtained data as follows: T(C)| 2) -1|01/2>3 5 4 P |0.020 0.143} 17 | 49 343 | 2401 We observe the population increases by 7 times for each 1° se in temperature, so we can model the data using the function P= htps:wwwintrath comfexponential-ogarthmic“unctions/7-graphs-log-semilog php 518 2117122, 10:58 AM 7. Log-Lag and Semilog Graphs v y We plot the data on linear T-Paxes as follows: e 2500 A 2000 1500 1000 500 T > 2d 1 2 3 4 Graph of P = 7" on tinearsinear axes. ‘Our plot shows reasonable detail for values of x greater than 1, but doesn't tell us much for smaller values of z or y. The points are too close to the z-axis for us to see what is going on. Let's now plot the same data on semi-logarithmic axes. htps:Awwwintmath com -xponential/ogarithmic-unetons!7-graph-log-semilog.php ene 7. Log-Lag and Semilog Graphs AP 10000) 2117122, 10:58 AM v 02 va on o 1. 2 3 4 Graph of P = 7" on semilogarithmic axes. Now we can see a lot more information for smaller values of « and y. This is the beauty of sem-logarithmic axis plots - you can see more detail in graphs where there is a very wide range of values, but some of the data is close together. Example 3 Draw the graphs of y = 5* on linear and both types of semilogarithmic axes. »xponentiaLiogarithmic-unetions!7-graph-log-semilog.php 78 htpsAwwwintmath com! 2117122, 10:58 AM 7 LogeLag and Semitfog Graphs Log-log Graphs Log-og graphs use a logarithmic scale for both vertical and horizontal axes. Here's the graph of y = on log-log axes. 10? 10! 108 10? vs 10? OL 1 10 100 Points along the line y — 2 on log-log axes. ‘The above graph has the following points highlighted for clarity: (1,1), (2,2), (3,3), (4,4), (6,5), (6,6), (10, 10), and (100, 100). htps:wwwintrath comfexponential-ogarthmic“unctions/7-graphs-log-semilog php ane 2117122, 10:58 AM 7. Log-Lag and Semilog Graphs v y NOTE: Both the domain (z-values) and the range (y-values) must be POSITIVE, because you cannot have the logarithm of a negative number. Population Example We can also graph the population example we met earlier, P = 7” on log-log paper (i.e. both axes use log scales): one htps:hwwwintrath comfexponential‘ogarthmic“unctions/7-graphs-log-semilog php 2117122, 10:58 AM 7. LogsLag and Semilog Graphs Ap wt v 10! 10° : T th > 0.01 OL 1 10 Points along the curve P = 7 on log-og axes. We can see even more detail for small values of « and y now, however we can't include the negative temperatures on the horizontal axis. Example 4: Variable Raised to a Fractional Exponent Graph y = «'/? using all 4 axis types (rectangular, both types of semi-log, and log-log). This function is equivalent to y = Vz. phy 9 types (rectang type 9, 9-109). a y Application 1: Air pressure 1. By pumping, the alr pressure in a tank is reduced by 18% each second, So the percentage of air pressure remaining at time is given by p = 100(0.82)' Plot p against t for 0 as often as k 1 the most common word, Likewise, the 3rd most common word occurs about = as often as the most common word, 3 Zipf Distributions occur naturally in many situations, for example in: Calls to computer operating systems Colors in images As the basis of most approaches to image compression City populations (a small number of large cities, a larger number of smaller cities) Wealth distribution (a small number of people have large amounts of money, large numbers of people have small amounts of money) + Company size distribution Artificial intelligence (in particular, “chat bots" that can chat with humans) relies on the limited number of questions and statements that people actually write in chats. a, Common English Words Zip originally developed his law in response to the observation that the frequency of words was inversely proportional to the rank of each word, htpsAwwwintmath com! »xponentiaLiogarithmic-unetions!7-graph-log-semilog.php 18 2117122, 10:58 AM 7. Log-Lag and Semilog Graphs For example, the most common 20 words in English are listed in the following table. The table is based on the Brown Corpus, a careful study of a million words from a wide variety of sources including newspapers, books, magazines, fiction, government documents, comedy and academic publications. v Rank Word 1 the 2 of 3 and 4 to 5 a 6 in 7 that 8 is @ was 10 he 1 for 2 it 13° with 4 as 15 his 16 on 7 be 18 at 19 by 20 i Frequency % Frequency 69970 36410 28854 26154 23363 21345 10594 10102 9815 9542 9489 8760 7290 7251 6996 6742 6376 5377 5307 5180 6.8872 3.5839 2.8401 28744 2.2996 2.1010 1.0428 0.9943 0.9661 0.9392 0.9340 0.8623 0.7176 07137 0.6886 0.6636 0.6276 0.5293 0.5224 0.5099 Theoretical Zipf Distribution 69970 36470 24912 19009 18412 12985 11233 9908 8870 8033, 7345 6768 6277 5855 5487 5164 4878 4623 4394 41e7 (The first 20 words in the Brown Corpus, published in 1967. This Corpus is the count of how often one milion words were used ina variety of books, newspapers and other publications. [Table source no longer available, but similar to Corpus of Contemporary American English.) 1 Ihave included the "Theoretical Zipt Distribution, based on the n-th ranked word occurring approximately — times the frequenc of the highest ranked word, This gives us a hyperbola, that we met before.) Let's plot what we have observed: htps:hwwwintmath com -xponentiaLiogarithmic-unetions!T-graph-log-semslog.php rate 210722, 1059 AM 7. Log-Lag and Semiiog Graphs 80000 7 ono + 30000 123.4567 8 9 1011 1213 14151 17 181920 Rank Frequency htps:wwwintrath comfexponential-ogarthmic“unctions/7-graphs-log-semilog php rane 2117122, 10:58 AM 7. Log-Lag and Semilog Graphs ‘The dark blue data points represent the top 20 occurring English words (with the first few labeled). The pink line is the theoretical Zpt distribution, which is found to be —Zez, where fis the frequency of the top-ranked word and nis the rank ofthe word. a = 69970, $2820 — sry ae = = 19008, £ 15412, htpsAwwwintmath com! sxponentiaLiogarithmic-unetions!T-graph-log-semilog.php vane 211722, 1059 AM 7. Log-Lag and Semilog Graphs ‘The power 0.94 comes from observing the best line of fit for the word frequencies. (I just did trial and error in Excel until | found the closes fit) ‘There is a fairly large gap in the pattern for the words "to", ‘a’ and “in”, but it settles down and is quite consistent after that. We now plot the top 2000 English words and use a logslog scale (log of the rank for the horizontal axis and log of the frequenc: for the vertical axis). Ifa distribution gives us a straight line on a log-log scale, then we can say that itis a Zipf Distribution. ggg} qe sooo so00 Frequency 10 1 0 100 aco ‘000 Rank We see that there is a remarkably consistent result for the top 2000 most-used English words. For your information, the last few in the lst of 2000 words are: 1992nd device 1993rd conduct 199th runs 1995th improved is96th games 1997th cultural is9sth plenty 1999th mile 2ee@th components b. We sites and the Zipf Distribution We also observe a Zipf Distribution when it comes to popularity of pages in Websites. For example, out of a sample of 500,000 page views in Interactive Mathematics, the most commonly visited page was the homepage, with 27,855 views, The next most common page was the Algebra Introduction, with around 1/2 of the views, The 3r ranked page had about 1/3 of the views of the most popular page. Rank Page EN, 1 ‘Home 27855, 2 Basic Algebra Introduction 15334 3 Addition & Subtraction in Algebra 7605 5 Graphs of Sine and Cosine ‘5749 hitps:wwwintrath comfexponential“ogarthmic“unctions/7-graphs-log-semilog php tse 211722, 1059 AM 7. Log-Lag and Semilog Graphs 6 Volume of Solid of Revolution 5667 7 ‘Trigonometric Graphs Introduction 5584 8 Download LiveMath B17 9 Introduction to Trigonometric Functions 4701 10 Sitemap 4309 For the top 500 pages in the site, we have the following log-log graph of the page views: ‘so0a00 9000 Frequency “0 1 10 100 ‘000 Rank htps:wwwintrath comfexponential-ogarthmic“unctions/7-graphs-log-semilog php rene 2117122, 10:58 AM 7. Log-Lag and Semilog Graphs ‘The theoretical Zipf Distribution (the pink line) is obtained as follows. The power used, 0.67, once again comes from observing the best line of fit. = 7507 27855 _ 349 = 11003 Saar = 9475 After the page ranked 200th, the pattem breaks down, but interestingly, from the 300th to the 500th page, there is stil a consistent relationship between rank and frequency. ‘See also Zipf Distributions, Jo9-log, graphs and Site Statistics over in the IntMath blog. htpshwwwintmath com! sxponentiaLiogarithmic-unetions!T-graph-log-semilog.php wie 2117122, 10:58 AM 7 LogsLag and Semitlog Graphs Need Homework Help Now? Our math tutors are here to help, 24x7. = Send us a pic of your problem and we'll help you solve it, right now - no waiting. a Hey! can deftly lp cp htps:hwwwintrath comfexponential-ogarthmic“unctions/7-graphs-log-semilog php rene

You might also like