Traffic

A Brief Look At Car-Following Models

Recently I posted a short introduction to recurrence relations – what they are and how they can be used for mathematical modeling. This post expands on the topic as car-following models are a nice example of recurrence relations applied to the real-world.

Suppose a car is traveling on the road at the speed u(t) at time t. Another car approaches this car from behind and starts following it. Obviously the driver of the car that is following cannot choose his speed freely. Rather, his speed v(t) at time t will be a result of whatever the driver in the leading car is doing.

The most basic car-following model assumes that the acceleration a(t) at time t of the follower is determined by the difference in speeds. If the leader is faster than the follower, the follower accelerates. If the leader is slower than the follower, the follower decelerates. The follower assumes a constant speed if there’s no speed difference. In mathematical form, this statement looks like this:

a(t) = λ * (u(t) – v(t))

The factor λ (sensitivity) determines how strongly the follower accelerates in response to a speed difference. To be more specific: it is the acceleration that results from a speed difference of one unit.

——————————————

Before we go on: how is this a recurrence relation? In a recurrence relation we determine a quantity from its values at an earlier time. This seems to be missing here. But remember that the acceleration is given by:

a(t) = (v(t+h) – v(t)) / h

with h being a time span. Inserted into the above car-following equation, we can see that it indeed implies a recurrence relation.

——————————————

Our model is still very crude. Here’s the biggest problem: The response of the driver is instantaneous. He picks up the speed difference at time t and turns this information into an acceleration also at time t. But more realistically, there will be a time lag. His response at time t will be a result of the speed difference at an earlier time t – Λ, with Λ being the reaction time.

a(t) = λ * (u(t – Λ) – v(t – Λ))

The reaction time is usually in the order of one second and consist of the time needed to process the information as well as the time it takes to move the muscles and press the pedal. There are several things we can do to make the model even more realistic. First of all, studies show that the speed difference is not the only factor. The distance d(t) between the leader and follower also plays an important role. The smaller it is, the stronger the follower will react. We can take this into account by putting the distance in the denominator:

a(t) = (λ / d(t)) * (u(t – Λ) – v(t – Λ))

You can also interpret this as making the sensitivity distance-dependent. There’s still one adjustment we need to make. The above model allows any value of acceleration, but we know that we can only reach certain maximum values in a car. Let’s symbolize the maximum acceleration by a(acc) and the maximum deceleration by a(dec). The latter will be a number smaller than zero since deceleration is by definition negative acceleration. We can write:

a(t) = a(acc) if (λ / d(t)) * (u(t – Λ) – v(t – Λ)) > a(acc)
a(t) = a(dec) if (λ / d(t)) * (u(t – Λ) – v(t – Λ)) < a(dec)
a(t) = (λ / d(t)) * (u(t – Λ) – v(t – Λ)) else

It probably looks simpler using an if-statement:

a(t) = (λ / d(t)) * (u(t – Λ) – v(t – Λ))

IF a(t) > a(acc) THEN
a(t) = a(acc)
ELSEIF a(t) < a(dec) THEN
a(t) = a(dec)
END IF

This model already catches a lot of nuances of car traffic. I hope I was able to give you some  insight into what car-following models are and how you can fine-tune them to satisfy certain conditions.

Advertisements

The Internet since 1998 in Numbers

Here’s how the number of websites developed since 1998:

internetwebsites

In 1998 there were about 2.4 million websites. This grew to 17.1 million at the turn of the millennium. In 2007 the Internet cracked the 100 million mark and soon after, in 2009, the 200 million mark. 2012 saw a sudden jump to about 700 million websites. 2010 and 2013 were the only years in which the number of sites declined.

internetusers

The number of users has been steadily increasing at a rate of about 170 million per year. It went from 188 million (3 % of the world population) in 1998 to 2760 million (40 % of the world population) in 2013. A mathematical trend analysis shows that we can expect the 4000 million mark to be cracked in 2017 and the 5000 million mark in 2020.

Very interesting in terms of competition among websites is the ratio of users to websites:

internetratio

Before 2000 it was relatively easy to draw a large number of visitors to a website. But then the situation drastically changed. The number of users per website dropped from about 88 to 24 and kept on decreasing. Today there are only 4 internet users per website, a tough market for website owners.

Some more numbers: in 1998 there were about 10,000 search queries on Google per day, this grew 1,200,000,000,000 (or 1.2 trillion) per day in 2012. Since Google controls roughly 65 % of the search engine market, the total number of queries per day should be around 1.8 trillion.

All the data is taken from this neat website: Internet Live Stats.

For more Internet analysis check out my post Average Size of Web Pages plus Prediction.

Mathematics of Blog Traffic: Model and Tips for High Traffic

Over the last few days I finally did what I long had planned and worked out a mathematical model for blog traffic. Here are the results. First we’ll take a look at the most general form and then use it to derive a practical, easily applicable formula.

We need some quantities as inputs. The time (in days), starting from the first blog entry, is denoted by t. We number the blog posts with the variable k. So k = 1 refers to the first post published, k = 2 to the second, etc … We’ll refer to the day on which entry k is published by t(k).

The initial number of visits entry k draws from the feed is symbolized by i(k), the average number of views per day entry k draws from search engines by s(k). Assuming that the number of feed views declines exponentially for each article with a factor b (my observations put the value for this at around 0.4 – 0.6), this is the number of views V the blog receives on day t:

V(t) = Σ[k] ( s(k) + i(k) · bt – t(k))

Σ[k] means that we sum over all k. This is the most general form. For it to be of any practical use, we need to make simplifying assumptions. We assume that the entries are published at a constant frequency f (entries per day) and that each article has the same popularity, that is:

i(k) = i = const.
s(k) = s = const.

After a long calculation you can arrive at this formula. It provides the expected number of daily views given that the above assumptions hold true and that the blog consists of n entries in total:

V = s · n + i / ( 1 – b1/f )

Note that according to this formula, blog traffic increases linearly with the number of entries published. Let’s apply the formula. Assume we publish articles at a frequency f = 1 per day and they draw i = 5 views on the first day from the feed and s = 0.1 views per day from search engines. With b = 0.5, this leads to:

V = 0.1 · n + 10

So once we gathered n = 20 entries with this setup, we can expect V = 12 views per day, at n = 40 entries this grows to V = 14 views per day, etc … The theoretical growth of this blog with number of entries is shown below:

viewsentries

How does the frequency at which entries are being published affect the number of views? You can see this dependency in the graph below (I set n = 40):

viewsfrequency

The formula is very clear about what to do for higher traffic: get more attention in the feed (good titles, good tagging and a large number of followers all lead to high i and possibly reduced b), optimize the entries for search engines (high s), publish at high frequency (obviously high f) and do this for a long time (high n).

We’ll draw two more conclusions. As you can see the formula neatly separates the search engine traffic (left term) and feed traffic (right term). And while the feed traffic reaches a constant level after a while of constant publishing, it is the search engine traffic that keeps on growing. At a critical number of entries N, the search engine traffic will overtake the feed traffic:

N = i / ( s · ( 1 – b1/f ) )

In the above blog setup, this happens at N = 100 entries. At this point both the search engines as well as the feed will provide 10 views per day.

Here’s one more conclusion: the daily increase in the average number of views is just the product of the daily search engine views per entry s and the publishing frequency f:

V / t = s · f

Thus, our example blog will experience an increase of 0.1 · 1 = 0.1 views per day or 1 additional view per 10 days. If we publish entries at twice the frequency, the blog would grow with 0.1 · 2 = 0.2 views per day or 1 additional view every 5 days.

Analysis: Size and Loading Times of WordPress.com Blogs

In the fast paced online world people are not so patient as in real life. Accordingly, having a large home page size and loading time can negatively affect your blog traffic. Studies have shown that the greater the loading time, the higher the bounce rate. To find out how well my blog performs with respect to this (feel free to use the results for your benefits as well), I did a analysis of 70 WordPress.com blogs. I used iWEBTOOLS’s Website Speed Test and OriginPro for that. With the tool you can analyze ten webpages at once, but note that after ten queries you have to wait a full day (not an hour as the website claims) to do more analysis.

The average size of a WordPress.com blog according to the analysis is 65.3 KB with a standard error SE = 3.0 KB. Here’s how the size is distributed:

WPSize

The average loading time at my internet speed (circa 600 KB/s) is 0.66 s with the standard error SE = 0.10 s. Here’s the corresponding distribution:

WPLoading2

Note that the graph obviously depends on your internet speed. If you have faster internet, the whole distribution will shift to the left. My blog has a home page size of 81.6 KB. From the first graph I can deduce that only about 24 % of home pages are larger in size. My loading time is 0.86 s, here only about 22 % top that. So it looks like I really have to throw off some weight.

Here’s the loading time plotted against the home page size:

WPLoadingSize

In a very rough approximation we have the relation:

loading time = 0.009 * size

In other words: getting rid of 10 KB should lower the loading time by about 0.1 seconds. Now feel free to check your own blog and see where it fits in. If you got the time, post your results (if possible including URL, size, loading time, internet speed) in the comments. I’d greatly appreciate the additional data. For a reliable result regarding loading time it’s best to check the same page three times and do the average.

Increase Views per Visit by Linking Within your Blog

One of the most basic and useful performance indicator for blogs is the average number of views per visit. If it is high, that means visitors stick around to explore the blog after reading a post. They value the blog for being well-written and informative. But in the fast paced, content saturated online world, achieving a lot of views per visit is not easy.

You can help out a little by making exploring your blog easier for readers. A good way to do this is to link within your blog, that is, to provide internal links. Keep in mind though that random links won’t help much. If you link one of your blog post to another, they should be connected in a meaningful way, for example by covering the same topic or giving relevant additional information to what a visitor just read.

Being mathematically curious, I wanted to find a way to judge what impact such internal links have on the overall views per visit. Assume you start with no internal links and observe a current number views per visitor of x. Now you add n internal links in your blog, which has in total a number of m entries. Given that the probability for a visitor to make use of an internal link is p, what will the overall number of views per visit change to? Yesterday night I derived a formula for that:

x’ = x + (n / m) · (1 / (1-p) – 1)

For example, my blog (which has as of now very few internal links) has an average of x = 2.3 views per visit and m = 42 entries. If I were to add n = 30 internal links and assuming a reader makes use of an internal link with the probability p = 20 % = 0.2, this should theoretically change into:

x’ = 2.3 + (30 / 42) · (1 / 0.8 – 1) = 2.5 views per visit

A solid 9 % increase in views per visit and this just by providing visitors a simple way to explore. So make sure to go over your blog and connect articles that are relevant to each other. The higher the relevancy of the links, the higher the probability that readers will end up using them. For example, if I only added n = 10 internal links instead of thirty, but had them at such a level of relevancy that the probability of them being used increases to p = 40 % = 0.4, I would end up with the same overall views per visit:

x’ = 2.3 + (10 / 42) · (1 / 0.6 – 1) = 2.5 views per visit

So it’s about relevancy as much as it is about amount. And in the spirit of not spamming, I’d prefer adding a few high-relevancy internal links that a lot low-relevancy ones.

If you’d like to know more on how to optimize your blog, check out: Setting the Order for your WordPress Blog Posts and Keywords: How To Use Them Properly On a Website or Blog.

Setting the order for your wordpress blog posts

Usually your blog entries are ordered according to the date on which they were published. You can however also order them according to your wishes by altering the time tag. It’s a good idea to bump posts which have proven to be popular among readers to the top of the page from time to time. Note that the posts will not appear as newly published in the feed, but they will be the first thing a reader sees when he or she clicks on your blog’s title.

Here’s how to bump a post to the top of the page:

1. Go to the most current blog entry and click on edit. Under the section “Publish” (at the top, on the right) you will find the time tag. Note this time.

2. Go to the post to be bumped and click on edit. Again look for the time tag under the section publish and edit it. For it to appear at the top, the time tag must show a later time than the current number one.

I sometimes put this post (Mach Cone) at the top of the page because readers seem to enjoy the picture in it (and because I love it as well, it is physics and math come to life and in action).

While we’re at it, check out my sidebar for the “Posts I like” widget. Add it to your blog as well if you like to help out bloggers who have created great content.

Keywords: How To Use Them Properly On a Website or Blog

Because keywords help determine the ranking of your website, and therefore how visible your pages are to Internet traffic, it is important to use keywords properly in the creation of your blog or website.

In today’s world of Internet lingo, you may frequently hear the terms “keywords,” “search engine rankings,” and “keyword search results” bandied about. However, not everyone knows what keywords are, and how important they are to the success of a website.

Keywords are essentially words or phrases that summarize the topic of a site. When a Web surfer types a word or phrase into the blank field of a search engine such as MSN or Google, the search engine returns a list of related sites. Each site on this list is determined by the presence of the search terms, or keywords, in the site’s meta tags, image tags, and content.

Keywords and Meta Tags

Meta tags are like a site’s “dog tags.” They identify the site’s title, description, and keywords. Meta tags are invisible to Web surfers, but they are instrumental in a search engine’s recognition of the site’s content.

Title Tags

A title tag gives the title of the Web page. A title should only be around six words long, and the primary keyword – the word or phrase that the site is primarily identified with – should be in this title tag. The closer to the beginning of the title the primary keyword is, the stronger the association with that keyword will be.

Description Tags

A Web page’s description tag provides the search engines with a summary of the content contained on the page. Once again, the primary keywords for this page should be contained in the description, as close to the beginning as possible. Description tags only allow 200 characters of text.

Keyword Tags

The keyword tag lists all of the keywords that can be associated with the Web page. The primary keyword used in the title and description tags should be first, followed by other keywords in order of importance and relevance. Although keywords can be separated by commas, they don’t have to be; however, keywords should not be repeated more than three times, lest the Web page be rejected by the search engines as spam. Between 800 and 1,000 characters are allowed for keyword text.

Keywords and Image Tags

Image tags are the text that shows up in place of an image, if the image fails to load for any reason. However, image tags serve a more important function: they allow the search engines to “read” your images. Without image tags, search engines have no way of interpreting your images. Therefore, image tags can also help boost the visibility and relevancy of your site to search engines.

Keywords and Web Page Content

The tags that you use on a Web page are important identifiers for search engines. However, in order to maintain a respectable search engine ranking, your Web page must establish relevancy. In other words, the keywords in your tags must pertain to the actual content on the page. Therefore, the same keywords you list in your tags must be used within the text your page displays.

The most important part of the content is the opening paragraph. The primary keyword – the keyword that was used in the title and description, and listed first in the keyword text – should be used several times in the first paragraph, and then occasionally throughout the rest of the page. Other, less important keywords can be used occasionally throughout the content, as well. This will indicate to the search engines that your page really is relevant to the keywords listed in your tags.

Another way to judge keywords is via a concept called “keyword density.” Keyword density shows the frequency at which a keyword is used. The density is calculated by taking the total number of words and dividing it into the number of times keywords appear in the text. The resulting number is multiplied by 100 to create a percentage. Keyword density can be a tricky business, however. Too low a density will fail to be noticed by the search engines, whereas too high a density can cause a Web page to be rejected as spam. Typically, a keyword density of around 5% is sufficient.

The Importance of Keywords

Keywords are a vital part of the creation of Web pages because they directly affect how visible the page will be to search engine traffic. The presence of keywords needs to be a consideration in every aspect of designing a Web page: designing the tags as well as writing the content. Because of the impact keywords can have on the success of your site, it’s important to know how to use them properly.

Find out more on how to optimize your blog here: Increase Views per Visit by Linking Within your Blog.