applied sciences

Intensity: How Much Power Will Burst Your Eardrums?

Under ideal circumstances, sound or light waves emitted from a point source propagate in a spherical fashion from the source. As the distance to the source grows, the energy of the waves is spread over a larger area and thus the perceived intensity decreases. We’ll take a look at the formula that allows us to compute the intensity at any distance from a source.

Great Formulas_html_7230225e

First of all, what do we mean by intensity? The intensity I tells us how much energy we receive from the source per second and per square meter. Accordingly, it is measured in the unit J per s and m² or simply W/m². To calculate it properly we need the power of the source P (in W) and the distance r (in m) to it.

I = P / (4 · π · r²)

This is one of these formulas that can quickly get you hooked on physics. It’s simple and extremely useful. In a later section you will meet the denominator again. It is the expression for the surface area of a sphere with radius r.

Before we go to the examples, let’s take a look at a special intensity scale that is often used in acoustics. Instead of expressing the sound intensity in the common physical unit W/m², we convert it to its decibel value dB using this formula:

dB ≈ 120 + 4.34 · ln(I)

with ln being the natural logarithm. For example, a sound intensity of I = 0.00001 W/m² (busy traffic) translates into 70 dB. This conversion is done to avoid dealing with very small or large numbers. Here are some typical values to keep in mind:

0 dB → Threshold of Hearing
20 dB → Whispering
60 dB → Normal Conversation
80 dB → Vacuum Cleaner
110 dB → Front Row at Rock Concert
130 dB → Threshold of Pain
160 dB → Bursting Eardrums

No onto the examples.

———————-

We just bought a P = 300 W speaker and want to try it out at maximal power. To get the full dose, we sit at a distance of only r = 1 m. Is that a bad idea? To find out, let’s calculate the intensity at this distance and the matching decibel value.

I = 300 W / (4 · π · (1 m)²) ≈ 23.9 W/m²

dB ≈ 120 + 4.34 · ln(23.9) ≈ 134 dB

This is already past the threshold of pain, so yes, it is a bad idea. But on the bright side, there’s no danger of the eardrums bursting. So it shouldn’t be dangerous to your health as long as you’re not exposed to this intensity for a longer period of time.

As a side note: the speaker is of course no point source, so all these values are just estimates founded on the idea that as long as you’re not too close to a source, it can be regarded as a point source in good approximation. The more the source resembles a point source and the farther you’re from it, the better the estimates computed using the formula will be.

———————-

Let’s reverse the situation from the previous example. Again we assume a distance of r = 1 m from the speaker. At what power P would our eardrums burst? Have a guess before reading on.

As we can see from the table, this happens at 160 dB. To be able to use the intensity formula, we need to know the corresponding intensity in the common physical quantity W/m². We can find that out using this equation:

160 ≈ 120 + 4.34 · ln(I)

We’ll subtract 120 from both sides and divide by 4.34:

40 ≈ 4.34 · ln(I)   

9.22 ≈ ln(I)

The inverse of the natural logarithm ln is Euler’s number e. In other words: e to the power of ln(I) is just I. So in order to get rid of the natural logarithm in this equation, we’ll just use Euler’s number as the basis on both sides:

e^9.22 ≈ e^ln(I)

10,100 ≈ I

Thus, 160 dB correspond to I = 10,100 W/m². At this intensity eardrums will burst. Now we can answer the question of which amount of power P will do that, given that we are only r = 1 m from the sound source. We insert the values into the intensity formula and solve for P:

10,100 = P / (4 · π · 1²)

10,100 = 0.08 · P

P ≈ 126,000 W

So don’t worry about ever bursting your eardrums with a speaker or a set of speakers. Not even the powerful sound systems at rock concerts could accomplish this.

———————-

This was an excerpt from the ebook “Great Formulas Explained – Physics, Mathematics, Economics”, released yesterday and available here: http://www.amazon.com/dp/B00G807Y00.

Analysis of Viewers for TV Series

I analysed the number of viewers of all the completed seasons for the following tv shows: Fringe, Lost, Heroes, Gossip Girl, Vampire Diaries, True Blood, The Sopranos, How I met your Mother, Glee and Family Guy. The data was taken from the respective Wikipedia pages.

My aim was to find simple “rule-of-thumb” formulas to estimate key values from the number of premiere viewers and to see if there’s a pattern for the decline of a show. Below you can see the main results from the analysis.

Result 1: Finale vs. Premiere

The number of finale viewers is about 85 % the number of premiere viewers.

Result 2: Average vs. Premiere

The average number of viewers during a season is about 83 % the number of premiere viewers.

finaleaverage

Result 3: Decline Pattern

The average number of viewers during a season is about 93 % the average number of viewers during the previous season.

averageprevious

This last result implies that the decline in popularity is exponential. If the average number of viewers for the first season is N(1), then the expected number of viewers for season n is: N(n) = N(1) * 0.93^(n-1). We can also express this using a table:

Average season two = 93 % of average season one

Average season three = 86 % of average season one

Average season four = 80 % of average season one

Average season five = 75 % of average season one

Average season six = 70 % of average season one

etc …

Of course, this is all just the sum of the behaviour of all the analyzed shows. Individual shows can behave very differently form that.

The Mach Cone

When an object moves faster than the speed of sound, it will go past an observer before the sound waves emitted by object do. The waves are compressed so strongly that a shock front forms. So instead of the sound gradually building up to a maximum as it is usually the case, the observer will hear nothing until the shock front arrives with a sudden and explosion-like noise.

Geometrically, the shock front forms a cone around the object, which under certain circumstances can even be visible to the naked eye (see image below). The great formula that is featured in this section deals with the opening angle of said cone. This angle, symbolized by the Greek letter θ, is also indicated in the image.

Great Formulas_html_m7f5cfada

All we need to compute the mach angle θ is the velocity of the object v (in m/s) and speed of sound c (in m/s):

sin θ = c / v

Let’s turn to an example.

———————-

A jet fighter flies with a speed of v = 500 m/s toward its destination. It flies close to the ground, so the speed of sound is approximately c = 340 m/s. This leads to:

sin θ = 340 / 500 = 0.68

θ = arcsin(0.68) ≈ 43°

———————-

In the picture above the angle is approximately 62°. How fast was the jet going at the time when the picture was taken? We’ll set the speed of sound to c = 340 m/s and insert all the given data into the formula:

sin 62° = 340 / v

0.88 = 340 / v

Obviously we need to solve for v. To do that, we first multiply both sides by v. This leads to:

0.88 · v = 340

Dividing both sides by 0.88 results in the answer:

v = 340 / 0.88 ≈ 385 m/s ≈ 1390 km/h ≈ 860 mph

———————-

This was an excerpt from the ebook “Great Formulas Explained – Physics, Mathematics, Economics”, released yesterday and available here: http://www.amazon.com/dp/B00G807Y00.

Mathematics of Explosions

When a strong explosion takes place, a shock wave forms that propagates in a spherical manner away from the source of the explosion. The shock front separates the air mass that is heated and compressed due to the explosion from the undisturbed air. In the picture below you can see the shock sphere that resulted from the explosion of Trinity, the first atomic bomb ever detonated.

Great Formulas_html_m67b54715

Using the concept of similarity solutions, the physicists Taylor and Sedov derived a simple formula that describes how the radius r (in m) of such a shock sphere grows with time t (in s). To apply it, we need to know two additional quantities: the energy of the explosion E (in J) and the density of the surrounding air D (in kg/m3). Here’s the formula:

r = 0.93 · (E / D)0.2 · t0.4

Let’s apply this formula for the Trinity blast.

———————-

In the explosion of the Trinity the amount of energy that was released was about 20 kilotons of TNT or:

E = 84 TJ = 84,000,000,000,000 J

Just to put that into perspective: in 2007 all of the households in Canada combined used about 1.4 TJ in energy. If you were able to convert the energy released in the Trinity explosion one-to-one into useable energy, you could power Canada for 60 years.

But back to the formula. The density of air at sea-level and lower heights is about D = 1.25 kg/m3. So the radius of the sphere approximately followed this law:

r = 542 · t0.4

After one second (t = 1), the shock front traveled 542 m. So the initial velocity was 542 m/s ≈ 1950 km/h ≈ 1210 mph. After ten seconds (t = 10), the shock front already covered a distance of about 1360 m ≈ 0.85 miles.

How long did it take the shock front to reach people two miles from the detonation? Two miles are approximately 3200 m. So we can set up this equation:

3200 = 542 · t0.4

We divide by 542:

5.90 t0.4

Then take both sides to the power of 2.5:

t 85 s ≈ 1 and 1/2 minutes

———————-

Let’s look at how the different parameters in the formula impact the radius of the shock sphere:

  • If you increase the time sixfold, the radius of the sphere doubles. So if it reached 0.85 miles after ten seconds, it will have reached 1.7 miles after 60 seconds. Note that this means that the speed of the shock front continuously decreases.

For the other two parameters, it will be more informative to look at the initial speed v (in m/s) rather the radius of the sphere at a certain time. As you noticed in the example, we get the initial speed by setting t = 1, leading to this formula:

v = 0.93 · (E / D)0.2

  • If you increase the energy of the detonation 35-fold, the initial speed of the shock front doubles. So for an atomic blast of 20 kt · 35 = 700 kt, the initial speed would be approximately 542 m /s · 2 = 1084 m/s.

  • The density behaves in the exact opposite way. If you increase it 35-fold, the initial speed halves. So if the test were conducted at an altitude of about 20 miles (where the density is only one thirty-fifth of its value on the ground), the shock wave would propagate at 1084 m/s

Another field in which the Taylor-Sedov formula is commonly applied is astrophysics, where it is used to model Supernova explosions. Since the energy released in such explosions dwarfs all atomic blasts and the surrounding density in space is very low, the initial expansion rate is extremely high.

This was an excerpt from the ebook “Great Formulas Explained – Physics, Mathematics, Economics”, released yesterday and available here: http://www.amazon.com/dp/B00G807Y00. You can take another quick look at the physics of shock waves here: Mach Cone.

Physics (And The Formula That Got Me Hooked)

A long time ago, in my teen years, this was the formula that got me hooked on physics. Why? I can’t say for sure. I guess I was very surprised that you could calculate something like this so easily. So with some nostalgia, I present another great formula from the field of physics. It will be a continuation of and a last section on energy.

To heat something, you need a certain amount of energy E (in J). How much exactly? To compute this we require three inputs: the mass m (in kg) of the object we want to heat, the temperature difference T (in °C) between initial and final state and the so called specific heat c (in J per kg °C) of the material that is heated. The relationship is quite simple:

E = c · m · T

If you double any of the input quantities, the energy required for heating will double as well. A very helpful addition to problems involving heating is this formula:

E = P · t

with P (in watt = W = J/s) being the power of the device that delivers heat and t (in s) the duration of the heat delivery.

———————

The specific heat of water is c = 4200 J per kg °C. How much energy do you need to heat m = 1 kg of water from room temperature (20 °C) to its boiling point (100 °C)? Note that the temperature difference between initial and final state is T = 80 °C. So we have all the quantities we need.

E = 4200 · 1 · 80 = 336,000 J

Additional question: How long will it take a water heater with an output of 2000 W to accomplish this? Let’s set up an equation for this using the second formula:

336,000 = 2000 · t

t ≈ 168 s ≈ 3 minutes

———————-

We put m = 1 kg of water (c = 4200 J per kg °C) in one container and m = 1 kg of sand (c = 290 J per kg °C) in another next to it. This will serve as an artificial beach. Using a heater we add 10,000 J of heat to each container. By what temperature will the water and the sand be raised?

Let’s turn to the water. From the given data and the great formula we can set up this equation:

10,000 = 4200 · 1 · T

T ≈ 2.4 °C

So the water temperature will be raised by 2.4 °C. What about the sand? It also receives 10,000 J.

10,000 = 290 · 1 · T

T ≈ 34.5 °C

So sand (or any ground in general) will heat up much stronger than water. In other words: the temperature of ground reacts quite strongly to changes in energy input while water is rather sluggish. This explains why the climate near oceans is milder than inland, that is, why the summers are less hot and the winters less cold. The water efficiently dampens the changes in temperature.

It also explains the land-sea-breeze phenomenon (seen in the image below). During the day, the sun’s energy will cause the ground to be hotter than the water. The air above the ground rises, leading to cooler air flowing from the ocean to the land. At night, due to the lack of the sun’s power, the situation reverses. The ground cools off quickly and now it’s the air above the water that rises.

Image
———————-

I hope this formula got you hooked as well. It’s simple, useful and can explain quite a lot of physics at the same time. It doesn’t get any better than this. Now it’s time to leave the concept of energy and turn to other topics.

This was an excerpt from my Kindle ebook: Great Formulas Explained – Physics, Mathematics, Economics. For another interesting physics quicky, check out: Intensity (or: How Much Power Will Burst Your Eardrums?).

Physics: Free Fall and Terminal Velocity

After a while of free fall, any object will reach and maintain a terminal velocity. To calculate it, we need a lot of inputs.

The necessary quantities are: the mass of the object (in kg), the gravitational acceleration (in m/s²), the density of air D (in kg/m³), the projected area of the object A (in m²) and the drag coefficient c (dimensionless). The latter two quantities need some explaining.

The projected area is the largest cross-section in the direction of fall. You can think of it as the shadow of the object on the ground when the sun’s rays hit the ground at a ninety degree angle. For example, if the falling object is a sphere, the projected area will be a circle with the same radius.

The drag coefficient is a dimensionless number that depends in a very complex way on the geometry of the object. There’s no simple way to compute it, usually it is determined in a wind tunnel. However, you can find the drag coefficients for common shapes in the picture below.

Now that we know all the inputs, let’s look at the formula for the terminal velocity v (in m/s). It will be valid for objects dropped from such a great heights that they manage to reach this limiting value, which is basically a result of the air resistance canceling out gravity.

v = sq root (2 * m * g / (c * D * A) )

Let’s do an example.

Skydivers are in free fall after leaving the plane, but soon reach the terminal velocity. We will set the mass to m = 75 kg, g = 9.81 (as usual) and D = 1.2 kg/m³. In a head-first position the skydiver has a drag coefficient of c = 0.8 and a projected area A = 0.3 m². What is the terminal velocity of the skydiver?

v = sq root (2 * 75 * 9.81 / (0.8 * 1.2 * 0.3) )

v ≈ 70 m/s ≈ 260 km/h ≈ 160 mph

Let’s take a look how changing the inputs varies the terminal velocity. Two bullet points will be sufficient here:

  • If you quadruple the mass (or the gravitational acceleration), the terminal velocity doubles. So a very heavy skydiver or a regular skydiver on a massive planet would fall much faster.
  • If you quadruple the drag coefficient (or the density or the projected area), the terminal velocity halves. This is why parachutes work. They have a higher drag coefficient and larger area, thus effectively reducing the terminal velocity.

This was an excerpt from the Kindle ebook: Great Formulas Explained – Physics. Mathematics, Economics. Check out my BEST OF for more interesting physics articles.

A tunnel through earth and a surprising result …

Recently I found an interesting problem: A straight tunnel is being drilled through the earth (see picture; tunnel is drawn with two lines) and rails are installed in the tunnel. A train travels, only driven by gravitation and frictionless, along the rails. How long does it take the train to travel through this earth tunnel of length l?

The calculation, shows a surprising result. The travel time is independent of the length l; the time it takes the train to travel through a 1 Km tunnel is the same as through a 5000 Km tunnel, about 2500 seconds or 42 minutes! Why is that?

Imagine a model train on rails. If you put the rails on flat ground, the train won’t move. The gravitational force is pulling on the train, but not in the direction of travel. If you incline the rails slighty, the train starts to move slowly, if you incline the rails strongly, it rapidly picks up speed.

Now lets imagine a tunnel through the earth! A 1 Km tunnel will only have a slight inclination and the train would accelerate slowly. It would be a pleasant trip for the entire family. But a 5000 Km train would go steeply into the ground, the train would accelerate with an amazing rate. It would be a hell of a ride! This explains how we always get the same travel time: the 1 Km tunnel is short and the velocity would remain low, the 5000 Km is long, but the velocity would become enormous.

Here is how the hell ride through the 5000 Km tunnel looks in detail:

The red, monotonous increasing curve, shows distance traveled (in Km) versus time (in seconds), the blue curve shows velocity (in Km/s) versus time. In the center of the tunnel the train reaches the maximum velocity of about 3 Km/s, which corresponds to an incredible 6700 mi/h!

Statistics and Monkeys on Typewriters

Here are the first two sentences of the prologue to Shakespeare’s Romeo and Juliet:

Two households, both alike in dignity,
In fair Verona, where we lay our scene

This excerpt has 77 characters. Now we let a monkey start typing random letters on a typewriter. Once he typed 77 characters, we change the sheet and let him start over. How many tries does he need to randomly reproduce the above paragraph?

There are 26 letters in the English alphabet and since he’ll be needing the comma and space, we’ll include those as well. So there’s a 1/28 chance of getting the first character right. Same goes for the second character, third character, etc … Because he’s typing randomly, the chance of getting a character right is independent of what preceded it. So we can just start multiplying:

p(reproduce) = 1/28 · 1/28 · … · 1/28 = (1/28)^77

The result is about 4 times ten to the power of -112. This is a ridiculously small chance! Even if he was able to complete one quadrillion tries per millisecond, it would most likely take him considerably longer than the estimated age of the universe to reproduce these two sentences.

Now what about the first word? It has only three letters, so he should be able to get at least this part in a short time. The chance of randomly reproducing the word “two” is:

p(reproduce) = 1/26 · 1/26 · 1/26 = (1/26)^3

Note that I dropped the comma and space as a choice, so now there’s a 1 in 26 chance to get a character right. The result is 5.7 times ten to the power of -5, which is about a 1 in 17500 chance. Even a slower monkey could easily get that done within a year, but I guess it’s still best to stick to human writers.

.This was an excerpt from the ebook “Statistical Snacks. Liked the excerpt? Get the book here: http://www.amazon.com/Statistical-Snacks-ebook/dp/B00DWJZ9Z2. Want more excerpts? Check out The Probability of Becoming a Homicide Victim and Missile Accuracy (CEP).

Average Size of Web Pages plus Prediction

Using data from websiteoptimization.com I plotted the development of web page sizes over the years. I also included the exponential fit:
Image

As you can see, the 1/2 MB mark was cracked in 2009 and the 1 MB mark was cracked in 2012. Despite the seemingly random fluctuations, an exponential trend is clearly visible. The power 0.3 indicates that the web page sizes doubles about every 2.3 years. Assuming this exponential trend continues we will have these average sizes in the coming years:

2013 – ca. 1600 kb
2014 – ca. 2100 kb
2015 – ca. 2900 kb

So the 2 MB will probably be cracked in 2014 and in 2015 we will already be close to the 3 MB mark. Of course the trend is bound to flat out, but at this point there’s no telling when it will happen.

If you like more Internet analysis, check out The Internet since 1998 in Numbers.

Missile Accuracy (CEP) – Excerpt from “Statistical Snacks”

An important quantity when comparing missiles is the CEP (Circular Error Probable). It is defined as the radius of the circle in which 50 % of the fired missiles land. The smaller it is, the better the accuracy of the missile. The German V2 rockets for example had a CEP of about 17 km. So there was a 50/50 chance of a V2 landing within 17 km of its target. Targeting smaller cities or even complexes was next to impossible with this accuracy, one could only aim for a general area in which it would land rather randomly.

Today’s missiles are significantly more accurate. The latest version of China’s DF-21 has a CEP about 40 m, allowing the accurate targeting of small complexes or large buildings, while CEP of the American made Hellfire is as low as 4 m, enabling precision strikes on small buildings or even tanks.

Assuming the impacts are normally distributed, one can derive a formula for the probability of striking a circular target of Radius R using a missile with a given CEP:

p = 1 – exp( -0.41 · R² / CEP² )

This quantity is also called the “single shot kill probability” (SSKP). Let’s include some numerical values. Assume a small complex with the dimensions 100 m by 100 m is targeted with a missile having a CEP of 150 m. Converting the rectangular area into a circle of equal area gives us a radius of about 56 m. Thus the SSKP is:

p = 1 – exp( -0.41 · 56² / 150² ) = 0.056 = 5.6 %

So the chances of hitting the target are relatively low. But the lack in accuracy can be compensated by firing several missiles in succession. What is the chance of at least one missile hitting the target if ten missiles are fired? First we look at the odds of all missiles missing the target and answer the question from that. One missile misses with 0.944 probability, the chance of having this event occur ten times in a row is:

p(all miss) = 0.94410 = 0.562

Thus the chance of at least one hit is:

p(at least one hit) = 1 – 0.562 = 0.438 = 43.8 %

Still not great considering that a single missile easily costs 10000 $ upwards. How many missiles of this kind must be fired at the complex to have a 90 % chance at a hit? A 90 % chance at a hit means that the chance of all missiles missing is 10 %. So we can turn the above formula for p(all miss) into an equation by inserting p(all miss) = 0.1 and leaving the number of missiles n undetermined:

0.1 = 0.944n

All that’s left is doing the algebra. Applying the natural logarithm to both sides and solving for n results in:

n = ln(0.1) / ln(0.944) = 40

So forty missiles with a CEP of 150 m are required to have a 90 % chance at hitting the complex. As you can verify by doing the appropriate calculations, three DF-21 missiles would have achieved the same result.

Liked the excerpt? Get the book “Statistical Snacks” by Metin Bektas here: http://www.amazon.com/Statistical-Snacks-ebook/dp/B00DWJZ9Z2. For more excerpts see The Probability of Becoming a Homicide Victim and How To Use the Expected Value.

The Fourth State of Matter – Plasmas

From our everyday lifes we are used to three states of matter: solid, liquid and gas. When we heat a solid it melts and becomes liquid. Heating this liquid further will cause it to evaporate to a gas. Usually this is what we consider to be the end of the line. But heating a gas leads to many surprises, it eventually turns into a state, which behaves completely different than ordinary gases. We call matter in that state a plasma.

 To understand why at some point a gas will exhibit an unusual behaviour, we need to look at the basic structure of matter. All matter consists of atoms. The Greeks believed this to be the undivisible building blocks of all objects. Scientists however have discovered, that atoms do indeed have an inner structure and are divisible. It takes an enormous amount to split atoms, but it can be done.

 Further research showed that atoms consist of three particles: neutrons, protons and electrons. The neutrons and protons are crammed into the atomic core, while the electrons surround this core. Usually atoms are not charged, because they contain as much protons (positively charged) as electrons (negatively charged). The charges balance each other. Only when electrons are missing does the atom become electric. Such charged atoms are called ions.

 In a gas the atoms are neutral. Each atom has as many protons as electrons, they are electrically balanced. When you apply a magnetic field to a gas, it does not respond. If you try to use the gas to conduct electricity, it does not work.

 Remember that gas molecules move at high speeds and collide frequently with each other. As you increase the temperature, the collisions become more violent. At very high temperatures the collisions become so violent, that the impact can knock some electrons off an atom (ionization). This is where the plasma begins and the gas ends.

 In a plasma the collisions are so intense that the atoms are not able to hold onto their outer electrons. Instead of a large amount of neutral atoms like in the gas, we are left with a mixture of free electrons and ions. This electric soup behaves very differently: it responds to magnetic fields and can conduct electricity very efficiently.

plasma1

 (The phases of matter. Source: NASA)

Most matter in the universe is in plasma form. Scientist believe that only 1 % of all visible matter is either solid, liquid or gaseous. On earth it is different, we rarely see plasmas because the temperatures are too small. But there are some exceptions.

 High-temperature flames can cause a small volume of air to turn into a plasma. This can be seen for example in the so called ionic wind experiment, which shows that a flame is able to transmit electric currents. Gases can’t do that. DARPA, the Pentagon’s research arm, is currently using this phenomenon to develop new methods of fire suppression. Other examples for plasmas on earth are lightnings and the Aurora Borealis.

plasma2

 (Examples of plasmas. Source: Contemporary Physics Education Project)

The barrier between gases and plasmas is somewhat foggy. An important quantity to characterize the transition from gas to plasma is the ionization degree. It tells us how many percent of the atoms have lost one or more electrons. So an ionization degree of 10 % means that only one out of ten atoms is ionized. In this case the gas properties are still dominant.

plasma3

 (Ionization degree of Helium over Temperature. Source: SciVerse)

My Fair Game – How To Use the Expected Value

You meet a nice man on the street offering you a game of dice. For a wager of just 2 $, you can win 8 $ when the dice shows a six. Sounds good? Let’s say you join in and play 30 rounds. What will be your expected balance after that?

You roll a six with the probability p = 1/6. So of the 30 rounds, you can expect to win 1/6 · 30 = 5, resulting in a pay-out of 40 $. But winning 5 rounds of course also means that you lost the remaining 25 rounds, resulting in a loss of 50 $. Your expected balance after 30 rounds is thus -10 $. Or in other words: for the player this game results in a loss of 1/3 $ per round.

 Let’s make a general formula for just this case. We are offered a game which we win with a probability of p. The pay-out in case of victory is P, the wager is W. We play this game for a number of n rounds.

The expected number of wins is p·n, so the total pay-out will be: p·n·P. The expected number of losses is (1-p)·n, so we will most likely lose this amount of money: (1-p)·n·W.

 Now we can set up the formula for the balance. We simply subtract the losses from the pay-out. But while we’re at it, let’s divide both sides by n to get the balance per round. It already includes all the information we need and requires one less variable.

B = p · P – (1-p) · W

This is what we can expect to win (or lose) per round. Let’s check it by using the above example. We had the winning chance p = 1/6, the pay-out P = 8 $ and the wager W = 2 $. So from the formula we get this balance per round:

B = 1/6 · 8 $ – 5/6 · 2 $ = – 1/3 $ per round

Just as we expected. Let’s try another example. I’ll offer you a dice game. If you roll two six in a row, you get P = 175 $. The wager is W = 5 $. Quite the deal, isn’t it? Let’s see. Rolling two six in a row occurs with a probability of p = 1/36. So the expected balance per round is:

B = 1/36 · 175 $ – 35/36 · 5 $ = 0 $ per round

I offered you a truly fair game. No one can be expected to lose in the long run. Of course if we only play a few rounds, somebody will win and somebody will lose.

It’s helpful to understand this balance as being sound for a large number of rounds but rather fragile in case of playing only a few rounds. Casinos are host to thousands of rounds per day and thus can predict their gains quite accurately from the balance per round. After a lot of rounds, all the random streaks and significant one-time events hardly impact the total balance anymore. The real balance will converge to the theoretical balance more and more as the number of rounds grows. This is mathematically proven by the Law of Large Numbers. Assuming finite variance, the proof can be done elegantly using Chebyshev’s Inequality.

The convergence can be easily demonstrated using a computer simulation. We will let the computer, equipped with random numbers, run our dice game for 2000 rounds. After each round the computer calculates the balance per round so far. The below picture shows the difference between the simulated balance per round and our theoretical result of – 1/3 $ per round.

Image

(Liked the excerpt? Get the book “Statistical Snacks” by Metin Bektas here: http://www.amazon.com/Statistical-Snacks-ebook/dp/B00DWJZ9Z2)