Thursday, May 23, 2013
Monday, May 20, 2013
IMDB Ratings
They are remastering Star Trek TNG and releasing them on bluray. They just released season 3 and I was looking through them. One of the first things that I noticed was how many great episodes were in that season. Seasons 1 and 2 had some good episodes, but it felt like most of the season 3 ones were great.
This wasn't that surprising; I've often stated that in each Star Trek series the first two seasons tend to be the worst. As I constantly feel the need to evangelize Star Trek I wanted to see what the top episodes were and list them here. I found that the IMDB had individual user ratings for each episode. I almost didn't notice they had a simple page with all the ratings on there and was about to write a script to scrape them from the season pages.
I copied that data and began to work on ways to present it. I wrote some gnuplot scripts for a few graphs. I wanted to ultimately make graphs for each of the five series. The problem was preparing the data for each plot was rather time consuming. I decided to write a perl script to do that.
The script went well, and I decided I was on roll so I might as well make it download the data itself. I ended up with likely my most robust script ever. Every show has a IMDB id like: tt0092455. You can either put that in the file, or pass it to the script as an argument. It generates a directory for each show, and puts all the raw data files in there, along with 3 graphs. I suppose I could have made it so that it takes multiple ids and runs each, but it's so easy to just paste them into a file and just type 'perl imdb.pl ' down the column and save that as a shell script.
I'm pretty happy with the script. It handled the real word data of a variety of shows quite well. Which is frankly amazing considering this regex is in it:
Here's the script, and the source for the 0 of you that are interested.
I ended up compiling a list of 32 shows, both my own favorites and popular ones from the internet. Here is a gallery of all the graphs.
http://imgur.com/a/gO68p
This one is a straight forward scatter plot of every episode. There is a linear regression line plotted showing the general trend. Note that in all the graphs the seasons fall entirely to the right of the grid line they are labeled at. In other words the first episode of season 5 is directly on that dotted line, the rest of season 5 is to the right.
The average rating of each season. Not weighted by number of reviews. Also note that none of these graphs start the y axis at 0, which exaggerates difference between points.
Here I took the top quarter of best episodes and bottom quarter of worst episodes and counted how many of each were in each season.
I still will have to do some comparison between the Star Trek series and post that.
This wasn't that surprising; I've often stated that in each Star Trek series the first two seasons tend to be the worst. As I constantly feel the need to evangelize Star Trek I wanted to see what the top episodes were and list them here. I found that the IMDB had individual user ratings for each episode. I almost didn't notice they had a simple page with all the ratings on there and was about to write a script to scrape them from the season pages.
I copied that data and began to work on ways to present it. I wrote some gnuplot scripts for a few graphs. I wanted to ultimately make graphs for each of the five series. The problem was preparing the data for each plot was rather time consuming. I decided to write a perl script to do that.
The script went well, and I decided I was on roll so I might as well make it download the data itself. I ended up with likely my most robust script ever. Every show has a IMDB id like: tt0092455. You can either put that in the file, or pass it to the script as an argument. It generates a directory for each show, and puts all the raw data files in there, along with 3 graphs. I suppose I could have made it so that it takes multiple ids and runs each, but it's so easy to just paste them into a file and just type 'perl imdb.pl ' down the column and save that as a shell script.
I'm pretty happy with the script. It handled the real word data of a variety of shows quite well. Which is frankly amazing considering this regex is in it:
$fileline =~ m/\s+(\d+)\.(\d+)\s+(.+?)\s+(\d+\.\d+)\s+(\d+,?\d*)\n/ Here's the script, and the source for the 0 of you that are interested.
I ended up compiling a list of 32 shows, both my own favorites and popular ones from the internet. Here is a gallery of all the graphs.
http://imgur.com/a/gO68p
This one is a straight forward scatter plot of every episode. There is a linear regression line plotted showing the general trend. Note that in all the graphs the seasons fall entirely to the right of the grid line they are labeled at. In other words the first episode of season 5 is directly on that dotted line, the rest of season 5 is to the right.
The average rating of each season. Not weighted by number of reviews. Also note that none of these graphs start the y axis at 0, which exaggerates difference between points.
Here I took the top quarter of best episodes and bottom quarter of worst episodes and counted how many of each were in each season.
I still will have to do some comparison between the Star Trek series and post that.
Labels:
Stuff I Wrote
Sunday, May 19, 2013
Sunday, May 5, 2013
Chaos Theory
I wrote this overview of chaos theory for a class, and figured I'd post it here. It's written for the audience of my professor, but you can gloss over the more technical parts. The first half is mostly a historical overview.
Chaos is a condition where a deterministic system, governed by a set of simple rules, can lead to erratic, seemingly random results. This is because tiny variations in the starting conditions are amplified many times and become significant. While this may seem like a logical thing, it was only recently discovered and accepted. The history of science is about discovering the laws that govern the natural world, and it was long accepted that simple laws lead to simple consequences. The idea of chaos as an innate property of natural systems was so revolutionary that even its discoverer avoided the idea.
Chaos theory was discovered largely by accident. The story begins with the ancient Greek philosophers who came up with the term chaos as a contrast to cosmos, their name for order in the universe. The word chaos meant an empty abyss that existed before creation. The term was used at the start of the Bible which is translated to "without form and void" to describe the state of the universe before God created the world, and with it order.
In the late 16th century, Galileo developed his laws of motion. These laws seemed to govern all the motion in the world. This set off a series of discoveries of simple laws that explained a wide range of phenomena. Galileo was followed by Kepler who came up with laws that very accurately described orbital mechanics. Kepler described orbits as ellipses that had the planets speed up as they moved in closer to the Sun. After Kepler, Newton arrived and drew the connection between earthly phenomenon and the heavenly movements of planets. His insight was that the same set of laws described all motion. The same force that pulled an object to the ground on Earth kept the Moon in orbit in space.
Newton also cast the die for all modern science. He invented calculus as a tool to help explain the constant change that governs nature. He came up with a differential equation that described all motion:
`F = ma = m cdot {dv}/{dt} = m cdot {d^2s}/{dt^2}`
where: `F` is force, `m` is mass, `a` is acceleration, `v` is velocity, `s` is displacement, and `t` is time.
Newton's few simple laws described the vast array of motion observed. His technique of finding a differential equation to describe a system, and then integrating it was the prototype for science for hundreds of years. With this technique scientists could predict future states based on known initial conditions. Following Newton's lead gave rise to whole new fields: Fluid mechanics, elasticity theory, kinetic theory, thermodynamics, and electricity & magnetism are all examples of fields that resulted from Newton's way of doing science.
Newton published his blueprint for science, the Principia Mathematica, in 1687. For the next 200 years it described all motion observed in the universe. However, in the late 19th century flaws with Newtonian physics began to emerge. One flaw was the fact that light could only exist as a propagation of a wave. Yet, Newtonian physics said that on observer riding at the speed of light should see light standing still, but still oscillating as a wave. Einstein explained this paradox by developing special relativity. Special relativity said that time and length are relative, and not unchanging as dictated by Newton. This was the first of three major challenges to Newton's world view of absolute laws.
The second challenge came from the study of electrons in the atom. It was shown that electrons could only exist in discrete orbits. When the electron changed from one orbit to another it made a quantum leap, never existing in the space between. While these two revolutions took place early on in the 20th century, the third took longer to be accepted.
The story of the third revolution begins with the same orbital mechanics that were so instrumental in creating Newtonian physics to begin with. Describing the orbit of one body around another is known as the two body problem. The differential equation describing it was solved by Newton by converting it from a nonlinear to a linear problem.
The similar problem involving three bodies was, however, unsolved for many years. Mathematicians eventually simplified the three body problem into a problem with two large bodies in a circular orbit, and a small particle-like third body. This was known as the restricted circular three body problem. Unfortunately, even the simplified problem proved intractable.
In the late 19th century a mathematician and physicist named Henri Poincaré attempted a novel, and largely geometric, solution to the three body problem. He invented a concept called state space. A state was all the information one needed to calculate the future of a system. State space was the collection of all possible states. Using state space, Poincaré could map a system and study its behavior from a fresh perspective. Additionally, Newton's differential equation, F=ma, gives a vector field in state space. This vector fields shows what an object at any given location will do from there. By following the vector arrows one can start an object in state space and follow its path to learn how it will behave.
Poincaré attempted to plot the three body problem through state space but discovered a shocking revelation. He found that the paths of the bodies crossed each other infinitely many times. This meant that a given starting location had two possible paths that would lead to very different behaviors. Which path a body would take depended on tiny variations in the exact starting location. Here was a deterministic system where tiny changes to the initial conditions would lead to wildly different behaviors, the first glimpse of chaos.
Chaos theory is inherently interdisciplinary, and has seen application to a wide array of different problems in unrelated fields. Fractals are a well known visualization of chaos. The Mandelbrot set is the most well known fractal. The rules for generating it are simple. Begin with the complex number plane. For any given complex number c in the plane, follow the iteration:
zn+1 = zn2 + c, with z0 = 0. If this sequence remains bounded then c is a member of the Mandelbrot set. By coloring the Mandelbrot set black against a white background one can see a border of infinite complexity. Zooming in on any portion of the border only shows more complexity. The difference between a number falling inside or outside the Mandelbrot set is infinitely small.
Fractals also show another sign of chaos. When zooming in on the border, the same patterns appear at every level. The same distinctive Mandelbrot shape is visible no matter how far one zooms in. The same is true of other areas where chaos governs systems. Graphs of heart rate variations and Internet traffic flow show the same overall pattern when one zooms in, a result of chaos.
The double pendulum is another simple example of chaos in action. A pendulum is described exactly by Newton's F=ma. Given the position and velocity of a pendulum one can predict exactly how it will behave in time. Adding a second pendulum to the end of the first, however, brings chaos into the problem and makes it intractable. When started from a high position, the double pendulum behaves erratically, with the second pendulum swinging around the first seemingly at random. However, the double pendulum is governed by the same F=ma as the single variety. It is simply a result of chaos that tiny imperceptible differences in the starting conditions lead to wildly different behaviors.
Another example of the practical benefits of chaos are cryptographic hashes which are used in storing passwords, and just about every other use of cryptography in computers. Cryptographic hashes take a piece of data as an input and then output a small, random, but deterministic, key. In effect, they give a fingerprint to data. To be useful, they must have something called the avalanche effect, which says that any tiny change to the input should result in a large change to the output. Changing a single bit in the input data will result in a totally different hash. This allows hashes to serve as proof that data hasn't been tampered with.
Chaos theory had a long journey from a mythical concept, to something that was deemed to only represent the unknown aspects of nature, to an accepted innate quality of the universe. The man considered to be the discoverer of chaos in its modern form, Poincaré, found the idea so shocking that he largely ignored it. It was decades before his discovery would begin to turn up useful results. However, it is now indisputable that chaos is a fact of nature. Further, it is indisputable that chaos theory has been invaluable, having applications from weather prediction to computer security. It deserves its title of the third revolution of the 20th century.
Chaos is a condition where a deterministic system, governed by a set of simple rules, can lead to erratic, seemingly random results. This is because tiny variations in the starting conditions are amplified many times and become significant. While this may seem like a logical thing, it was only recently discovered and accepted. The history of science is about discovering the laws that govern the natural world, and it was long accepted that simple laws lead to simple consequences. The idea of chaos as an innate property of natural systems was so revolutionary that even its discoverer avoided the idea.
Chaos theory was discovered largely by accident. The story begins with the ancient Greek philosophers who came up with the term chaos as a contrast to cosmos, their name for order in the universe. The word chaos meant an empty abyss that existed before creation. The term was used at the start of the Bible which is translated to "without form and void" to describe the state of the universe before God created the world, and with it order.
In the late 16th century, Galileo developed his laws of motion. These laws seemed to govern all the motion in the world. This set off a series of discoveries of simple laws that explained a wide range of phenomena. Galileo was followed by Kepler who came up with laws that very accurately described orbital mechanics. Kepler described orbits as ellipses that had the planets speed up as they moved in closer to the Sun. After Kepler, Newton arrived and drew the connection between earthly phenomenon and the heavenly movements of planets. His insight was that the same set of laws described all motion. The same force that pulled an object to the ground on Earth kept the Moon in orbit in space.
Newton also cast the die for all modern science. He invented calculus as a tool to help explain the constant change that governs nature. He came up with a differential equation that described all motion:
`F = ma = m cdot {dv}/{dt} = m cdot {d^2s}/{dt^2}`
where: `F` is force, `m` is mass, `a` is acceleration, `v` is velocity, `s` is displacement, and `t` is time.
Newton's few simple laws described the vast array of motion observed. His technique of finding a differential equation to describe a system, and then integrating it was the prototype for science for hundreds of years. With this technique scientists could predict future states based on known initial conditions. Following Newton's lead gave rise to whole new fields: Fluid mechanics, elasticity theory, kinetic theory, thermodynamics, and electricity & magnetism are all examples of fields that resulted from Newton's way of doing science.
Newton published his blueprint for science, the Principia Mathematica, in 1687. For the next 200 years it described all motion observed in the universe. However, in the late 19th century flaws with Newtonian physics began to emerge. One flaw was the fact that light could only exist as a propagation of a wave. Yet, Newtonian physics said that on observer riding at the speed of light should see light standing still, but still oscillating as a wave. Einstein explained this paradox by developing special relativity. Special relativity said that time and length are relative, and not unchanging as dictated by Newton. This was the first of three major challenges to Newton's world view of absolute laws.
The second challenge came from the study of electrons in the atom. It was shown that electrons could only exist in discrete orbits. When the electron changed from one orbit to another it made a quantum leap, never existing in the space between. While these two revolutions took place early on in the 20th century, the third took longer to be accepted.
The story of the third revolution begins with the same orbital mechanics that were so instrumental in creating Newtonian physics to begin with. Describing the orbit of one body around another is known as the two body problem. The differential equation describing it was solved by Newton by converting it from a nonlinear to a linear problem.
The similar problem involving three bodies was, however, unsolved for many years. Mathematicians eventually simplified the three body problem into a problem with two large bodies in a circular orbit, and a small particle-like third body. This was known as the restricted circular three body problem. Unfortunately, even the simplified problem proved intractable.
In the late 19th century a mathematician and physicist named Henri Poincaré attempted a novel, and largely geometric, solution to the three body problem. He invented a concept called state space. A state was all the information one needed to calculate the future of a system. State space was the collection of all possible states. Using state space, Poincaré could map a system and study its behavior from a fresh perspective. Additionally, Newton's differential equation, F=ma, gives a vector field in state space. This vector fields shows what an object at any given location will do from there. By following the vector arrows one can start an object in state space and follow its path to learn how it will behave.
Poincaré attempted to plot the three body problem through state space but discovered a shocking revelation. He found that the paths of the bodies crossed each other infinitely many times. This meant that a given starting location had two possible paths that would lead to very different behaviors. Which path a body would take depended on tiny variations in the exact starting location. Here was a deterministic system where tiny changes to the initial conditions would lead to wildly different behaviors, the first glimpse of chaos.
Chaos theory is inherently interdisciplinary, and has seen application to a wide array of different problems in unrelated fields. Fractals are a well known visualization of chaos. The Mandelbrot set is the most well known fractal. The rules for generating it are simple. Begin with the complex number plane. For any given complex number c in the plane, follow the iteration:
zn+1 = zn2 + c, with z0 = 0. If this sequence remains bounded then c is a member of the Mandelbrot set. By coloring the Mandelbrot set black against a white background one can see a border of infinite complexity. Zooming in on any portion of the border only shows more complexity. The difference between a number falling inside or outside the Mandelbrot set is infinitely small.
Fractals also show another sign of chaos. When zooming in on the border, the same patterns appear at every level. The same distinctive Mandelbrot shape is visible no matter how far one zooms in. The same is true of other areas where chaos governs systems. Graphs of heart rate variations and Internet traffic flow show the same overall pattern when one zooms in, a result of chaos.
The double pendulum is another simple example of chaos in action. A pendulum is described exactly by Newton's F=ma. Given the position and velocity of a pendulum one can predict exactly how it will behave in time. Adding a second pendulum to the end of the first, however, brings chaos into the problem and makes it intractable. When started from a high position, the double pendulum behaves erratically, with the second pendulum swinging around the first seemingly at random. However, the double pendulum is governed by the same F=ma as the single variety. It is simply a result of chaos that tiny imperceptible differences in the starting conditions lead to wildly different behaviors.
Another example of the practical benefits of chaos are cryptographic hashes which are used in storing passwords, and just about every other use of cryptography in computers. Cryptographic hashes take a piece of data as an input and then output a small, random, but deterministic, key. In effect, they give a fingerprint to data. To be useful, they must have something called the avalanche effect, which says that any tiny change to the input should result in a large change to the output. Changing a single bit in the input data will result in a totally different hash. This allows hashes to serve as proof that data hasn't been tampered with.
Chaos theory had a long journey from a mythical concept, to something that was deemed to only represent the unknown aspects of nature, to an accepted innate quality of the universe. The man considered to be the discoverer of chaos in its modern form, Poincaré, found the idea so shocking that he largely ignored it. It was decades before his discovery would begin to turn up useful results. However, it is now indisputable that chaos is a fact of nature. Further, it is indisputable that chaos theory has been invaluable, having applications from weather prediction to computer security. It deserves its title of the third revolution of the 20th century.
Labels:
Stuff I Wrote
Saturday, May 4, 2013
President Obama Can Shut Guantanamo Whenever He Wants
http://www.slate.com/articles/news_and_politics/view_from_chicago/2013/05/president_obama_can_shut_guantanamo_whenever_he_wants_to.html
If Obama declared hostilities at an end, the Guantanamo detainees would be no different from people who were washed up on U.S. territory by accident, like shipwrecked sailors. Those who pose no danger to the United States (about 86 of the 166), and cannot be returned to their countries, could receive refugee status under existing laws. Those who are known to be dangerous could be arrested under criminal law. If I am correct that section 1027 is unconstitutional, both groups could be brought to the United States. The detainees we cannot convict would be released. That may be politically unpalatable but it is legally unimpeachable.
Labels:
Links
Thursday, May 2, 2013
12 Million Americans Believe Lizard People Run Our Country
http://www.theatlanticwire.com/national/2013/04/12-million-americans-believe-lizard-people-run-our-country/63799/
Do you believe that shape-shifting reptilian people control our world by taking on human form and gaining political power to manipulate our societies, or not?Are there seriously people that don't know this?
Labels:
Links
Tuesday, April 30, 2013
What If We Never Run Out of Oil?
http://www.theatlantic.com/magazine/archive/2013/05/what-if-we-never-run-out-of-oil/309294/?single_page=true
From the beginning, it was evident that the Kern River field was rich with oil, millions upon millions of barrels. (A barrel, the unit of oil measurement, is 42 gallons; depending on the grade, a ton of oil is six to eight barrels.) Wildcatters poured into the area, throwing up derricks, boring wells, and pulling out what they could. In 1949, after 50 years of drilling, analysts estimated that just 47 million barrels remained in reserves—a rounding error in the oil business. Kern River, it seemed, was nearly played out. Instead, oil companies removed 945 million barrels in the next 40 years. In 1989, analysts again estimated Kern reserves: 697 million barrels. By 2009, Kern had produced more than 1.3 billion additional barrels, and reserves were estimated to be almost 600 million barrels.
Labels:
Links
Sunday, April 28, 2013
How Long to Suffocate in Space
I previously looked at how long it would take to freeze in space. In this post, I'm going to look at the other side of the losing life support coin: how long would it take to run out of air in space?
Since the heat being lost is dependent on the temperature, which is changing, we needed a differential equation before (well actually since it's all been worked out before we didn't, but where's the fun in that?). This time, oxygen use is constant, so the math is much simpler. On the other hand, there are still plenty of variables to introduce uncertainty.
To begin, if you are sealed in a room with a normal mix of air you will not run out of oxygen. Rather CO2 will build up to toxic levels, and you will die. It is possible to scrub CO2 from the air. In fact, we currently do it on our spaceships. A major issue Apollo 13 faced was getting circular CO2 filters to work with a square hole.
What this means for us is we need to look at time for CO2 to build up to lethal levels, and for how long it would take to run out of O2 if the CO2 is being removed.
We also need to consider that people consume O2 at different rates, and even at different rates at different times. VO2 is how a measure of what rate a person is consuming O2. Unfortunately, it is almost always used in the context of measuring peak VO2 during exercise (as a measure of fitness). It was hard to get good numbers for a resting person, but I settled on about 0.018 cubic meters per hour. For the active rate, I still couldn't just use typical VO2 numbers because they are for the max consumption rate during bursts of exercise. A person moving around attempting to repair a ship wouldn't be using as much air as a person sprinting. I found some good numbers from scuba diving forums and settled on 0.1 cubic meters per hour.
On the subject of the variation of people, different people will be able to tolerate different concentrations of CO2 or levels of O2. It was hard finding a good number for lethal CO2 concentration. Most sites were concerned with long term exposure at a work environment (years), or short term accidental exposure (minutes). I settled on 5% which is probably a bit low.
As for minimum O2 concentration, similar problems apply. Here I settled on 11%, compared to about 21% normally. Ships could use slightly higher O2 concentrations to begin with to help with loss of life support situations, but high O2 levels have their own problems.
Additional issues are things like fires or venting atmosphere reducing the time. Also, the number of people on a ship is harder to estimate. On larger ships it is probably more constant. But on small shuttles it could vary quite a bit.
Working in our favor is the fact that the respiration equation:
`"C"_6"H"_12"O"_6 + 6"O"_2 to 6"CO"_2 + 6"H"_2"O"`
Has a one to one mole ratio between O2 and CO2. Additonaly, a mole of any gas takes up about 24 liters at normal temperature and pressure. This means we can use the same formula for both O2 consumption and CO2 build up:
`t={V cdot Delta r}/{n cdot R}` Where: V is volume, `Delta r` is the change in the ratio of the gas, n is the number of people, and R is the rate that gas is changed. As an example:
`t = 1.5 "hours" = {26 "m"^3 cdot 0.05}/{2 cdot 0.018 "m"^3/"hour"}`
This is the formula for a 26 cubic meter shuttle craft, with 2 people. The change in concentration is 0.05 because CO2 is effectively 0 normally. 0.018 cubic meters/hour is the resting CO2 production rate.
I decided to give a range with worst case and best case scenarios. The best case is resting, and not worrying about CO2 (because it's being scrubbed). The worst case is CO2 build up will working to fix the ship.
As you can see there were some cases where heat loss was faster than the best case scenario. I didn't expect it to even be close.
Since the heat being lost is dependent on the temperature, which is changing, we needed a differential equation before (well actually since it's all been worked out before we didn't, but where's the fun in that?). This time, oxygen use is constant, so the math is much simpler. On the other hand, there are still plenty of variables to introduce uncertainty.
To begin, if you are sealed in a room with a normal mix of air you will not run out of oxygen. Rather CO2 will build up to toxic levels, and you will die. It is possible to scrub CO2 from the air. In fact, we currently do it on our spaceships. A major issue Apollo 13 faced was getting circular CO2 filters to work with a square hole.
What this means for us is we need to look at time for CO2 to build up to lethal levels, and for how long it would take to run out of O2 if the CO2 is being removed.
We also need to consider that people consume O2 at different rates, and even at different rates at different times. VO2 is how a measure of what rate a person is consuming O2. Unfortunately, it is almost always used in the context of measuring peak VO2 during exercise (as a measure of fitness). It was hard to get good numbers for a resting person, but I settled on about 0.018 cubic meters per hour. For the active rate, I still couldn't just use typical VO2 numbers because they are for the max consumption rate during bursts of exercise. A person moving around attempting to repair a ship wouldn't be using as much air as a person sprinting. I found some good numbers from scuba diving forums and settled on 0.1 cubic meters per hour.
On the subject of the variation of people, different people will be able to tolerate different concentrations of CO2 or levels of O2. It was hard finding a good number for lethal CO2 concentration. Most sites were concerned with long term exposure at a work environment (years), or short term accidental exposure (minutes). I settled on 5% which is probably a bit low.
As for minimum O2 concentration, similar problems apply. Here I settled on 11%, compared to about 21% normally. Ships could use slightly higher O2 concentrations to begin with to help with loss of life support situations, but high O2 levels have their own problems.
Additional issues are things like fires or venting atmosphere reducing the time. Also, the number of people on a ship is harder to estimate. On larger ships it is probably more constant. But on small shuttles it could vary quite a bit.
Working in our favor is the fact that the respiration equation:
`"C"_6"H"_12"O"_6 + 6"O"_2 to 6"CO"_2 + 6"H"_2"O"`
Has a one to one mole ratio between O2 and CO2. Additonaly, a mole of any gas takes up about 24 liters at normal temperature and pressure. This means we can use the same formula for both O2 consumption and CO2 build up:
`t={V cdot Delta r}/{n cdot R}` Where: V is volume, `Delta r` is the change in the ratio of the gas, n is the number of people, and R is the rate that gas is changed. As an example:
`t = 1.5 "hours" = {26 "m"^3 cdot 0.05}/{2 cdot 0.018 "m"^3/"hour"}`
This is the formula for a 26 cubic meter shuttle craft, with 2 people. The change in concentration is 0.05 because CO2 is effectively 0 normally. 0.018 cubic meters/hour is the resting CO2 production rate.
I decided to give a range with worst case and best case scenarios. The best case is resting, and not worrying about CO2 (because it's being scrubbed). The worst case is CO2 build up will working to fix the ship.
As you can see there were some cases where heat loss was faster than the best case scenario. I didn't expect it to even be close.
| Name | Volume (`"m"^3`) | Crew | Heat (days) | Oxygen, Resting (days) | CO2, Doing Work (days) |
| Death Star II | 2,144,000,000,000,000 | 2,500,000 | 437,837 | 218,370,370 | 17,866,667 |
| Super Star Destroyer | 12,645,900,000 | 300,000 | 967 | 10,733 | 878 |
| Borg Cube | 28,000,000,000 | 130,000 | 25,585 | 54,843 | 4,487 |
| Enterprise-D | 5,820,983 | 1,200 | 456 | 1,235 | 101 |
| Enterprise | 211,248 | 430 | 161.0 | 125.1 | 10.2 |
| Runabout | 569 | 3 | 11.3 | 48.3 | 4.0 |
| Type 6 Shuttlecraft | 26 | 2 | 12.8 | 3.3 | 0.3 |
| TIE Fighter | 8 | 1 | 0.7 | 2.0 | 0.2 |
Labels:
Stuff I Wrote
Thursday, April 25, 2013
Cat in a Shark Suit Riding a Roomba and Chasing a Duck
http://www.youtube.com/watch?v=OFro7RlKzE8
We might as well close up shop now. This video is clearly the ultimate culmination of the internet.
We might as well close up shop now. This video is clearly the ultimate culmination of the internet.
Labels:
Links
Thursday, April 18, 2013
The Geopolitics of the United States, Part 1: The Inevitable Empire
http://www.stratfor.com/analysis/geopolitics-united-states-part-1-inevitable-empire
This is very long, and nothing in it is revolutionary, but I found it an interesting overview of the United States' expansion.
This is very long, and nothing in it is revolutionary, but I found it an interesting overview of the United States' expansion.
Labels:
Links
Tuesday, April 16, 2013
The Size of Pizza
Pizza is likely the most important substance ever created. As such, it is crucial that we have adequate information for our various pizza dealings. In civilized society a pizza is 16 inches in diameter. However, one must occasionally deal with the barbarians of the pizza word: Fast food pizza, eg, Pizza Hut, Dominoes, Papa John's.
To begin, they have had the audacity to make pizzas in sizes in less than the scientifically proven optimal size. However, they add insult to injury by calling these smaller sizes "large". Since pizza size increases as the square of half the diameter, decreasing the diameter doesn't have an intuitive effect on the actual reduction in pizza.
To help illustrate the atrocity being done here, I've compiled this table of various pizza sizes. I've included the name Pizza Hut (or the others) call them, as well as their name to rational humans. Next, is the diameter and the area. The slices equivalent lets you know how many slices of a normal 16" pizza you would be getting at the other sizes; they likely are all cut into 8 slices. % of a real pizza is exactly what it sounds like.
To begin, they have had the audacity to make pizzas in sizes in less than the scientifically proven optimal size. However, they add insult to injury by calling these smaller sizes "large". Since pizza size increases as the square of half the diameter, decreasing the diameter doesn't have an intuitive effect on the actual reduction in pizza.
To help illustrate the atrocity being done here, I've compiled this table of various pizza sizes. I've included the name Pizza Hut (or the others) call them, as well as their name to rational humans. Next, is the diameter and the area. The slices equivalent lets you know how many slices of a normal 16" pizza you would be getting at the other sizes; they likely are all cut into 8 slices. % of a real pizza is exactly what it sounds like.
| Pizza Hut Name | Actual Name | Diameter (in) | Area (in^2) | Slices Equivalent | % of a Real Pizza |
| Personal | Joke | 6 | 28.3 | 1.13 | 14% |
| Small | ? | 10 | 78.5 | 3.13 | 39% |
| Med | Offensively Small | 12 | 113.1 | 4.50 | 56% |
| Large | Small | 14 | 153.9 | 6.13 | 77% |
| X Large | Pizza | 16 | 201.1 | 8.00 | 100% |
| X Large | 18 | 254.5 | 10.13 | 127% | |
| Wonderful | 20 | 314.2 | 12.50 | 156% |
Labels:
Stuff I Wrote
Monday, April 15, 2013
Tuesday, April 9, 2013
Leonard v. Pepsico, Inc.
http://en.wikipedia.org/wiki/Leonard_v._Pepsico,_Inc
Leonard v. Pepsico, Inc., 88 F. Supp. 2d 116, (S.D.N.Y. 1999), aff'd 210 F.3d 88 (2d Cir. 2000), more widely known as the Pepsi Points Case, is a contracts case tried in the United States District Court for the Southern District of New York in 1999, in which the plaintiff, John Leonard, sued PepsiCo, Inc. in an effort to enforce an "offer" to redeem 7,000,000 Pepsi Points for an AV-8 Harrier II jump jet, which PepsiCo had shown in a portion of a televised commercial that PepsiCo argued was intended to be humorous. The plaintiff did not collect 7,000,000 Pepsi Points through the purchase of Pepsi products, but instead sent a certified check for $700,008.50 as permitted by the contest rules. Leonard had 15 existing points, paid $0.10 a point for the remaining 6,999,985 points, and a $10 shipping and handling fee.
Among other claims made, Leonard claimed that a federal judge was incapable of deciding on the matter, and that instead the decision had to be made by a jury consisting of members of the "Pepsi Generation" to whom the advertisement would allegedly constitute an offer.
In justifying its conclusion that the commercial was "evidently done in jest" and that "The notion of traveling to school in a Harrier Jet is an exaggerated adolescent fantasy," the court made several observations regarding the nature and content of the commercial. These included (among others) that:
- "The callow youth featured in the commercial is a highly improbable pilot, one who could barely be trusted with the keys to his parents' car, much less the prize aircraft of the United States Marine Corps."
- "The teenager's comment that flying a Harrier Jet to school 'sure beats the bus' evinces an improbably insouciant attitude toward the relative difficulty and danger of piloting a fighter plane in a residential area."
- "No school would provide landing space for a student's fighter jet, or condone the disruption the jet's use would cause."
Labels:
Links
Sunday, April 7, 2013
So Crates
Two great legal advice threads:
Invoking Socrates to get out of running a red light
Fighting for his "rights"
Invoking Socrates to get out of running a red light
Fighting for his "rights"
Labels:
Links
The Labyrinth of Genre
This uses last.fm genre data to show an endless branching of genres. Every genre you click shows the 6 closest related ones (not necessarily sub-genres).
Note: It plays a band from the currently selected genre.
http://static.echonest.com/LabyrinthOfGenre/GenreMaze.html
Note: It plays a band from the currently selected genre.
http://static.echonest.com/LabyrinthOfGenre/GenreMaze.html
Labels:
Links
Saturday, April 6, 2013
Wednesday, April 3, 2013
The trouble with using police informants in the US
http://www.bbc.co.uk/news/magazine-21939453
Whatever the case, under Florida law Horner now faced a minimum sentence of 25 years, if found guilty.I believe there's a term for this.
"My public defender told me, 'They got you dead to rights.' So I thought, 'OK, I guess there's no need taking this to trial.'"
Prosecutors offered a plea bargain of 15 years if Horner accepted a guilty plea.
"I said, 'My youngest daughter will be 25 years old when I get out. I can't do that.'"
That left him with only one option - to become an informant himself.
Under the deal he signed with prosecutors, he agreed to plead guilty. But if he helped make prosecutable cases against five other people on drug-trafficking charges - charges carrying 25-year minimum terms - his own sentence could be reduced from 25 years to 10.
Horner failed to make cases against drug traffickers.
As a result, he was sentenced to the full 25 years in October last year and is now serving his sentence in Liberty Correctional Institution, outside Tallahassee. He will be 72 by the time he is released.
The irony is that if Horner been an experienced drug dealer, he may well now be serving a much shorter term than 25 years.
"What snitching does is it rewards the informed, so the lower you are on the totem pole of criminal activity, the less useful you are to the government," says Natapoff. "The higher up in the hierarchy you are, the more you have to offer."
Court records show that Matt, the person who informed on Horner, had a lengthy record of drug offences. At the point he informed on Horner, he was facing a minimum sentence of 15 years for trafficking. He was ultimately sentenced to just 18 months and is now free.
Labels:
Links
Thursday, March 21, 2013
Shoe monument for man who threw footwear at Bush
http://www.reuters.com/article/2009/01/30/us-iraq-shoe-odd-idUSTRE50T54M20090130
The video is so good. It was probably the peak of Bush's presidency. He dodged it like he had been training his entire life for that moment.
https://www.youtube.com/watch?v=_RFH7C3vkK4
The video is so good. It was probably the peak of Bush's presidency. He dodged it like he had been training his entire life for that moment.
https://www.youtube.com/watch?v=_RFH7C3vkK4
Labels:
Links
Thursday, March 14, 2013
Errors from Rounding Pi
In honor of Pi Day, I did some calculations on the error introduced by rounding pi. This has been done plenty of times already, but it was fun.
The key point is that rather crude approximations are still plenty accurate. Just using 3 only leads to a 4.5% error, and the common 3.14 is good for 0.05%, which is a better tolerance than anything you're likely to do.
I also list the absolute errors when calculating circumferences of circles with various radii. If you are calculating a circle with a radius of the observable universe, you'll need about 62 digits (first calculated in 1699) to get the error below 1 Planck length. That ought to be enough for anybody.
Relative error:
Absolute error in calculating the circumference of a circle with the given radius:
The key point is that rather crude approximations are still plenty accurate. Just using 3 only leads to a 4.5% error, and the common 3.14 is good for 0.05%, which is a better tolerance than anything you're likely to do.
I also list the absolute errors when calculating circumferences of circles with various radii. If you are calculating a circle with a radius of the observable universe, you'll need about 62 digits (first calculated in 1699) to get the error below 1 Planck length. That ought to be enough for anybody.
Relative error:
| Digits | Value | Error |
| 1 | 3 | 4.5070342% |
| 2 | 3.1 | 1.3239353% |
| 3 | 3.14 | 0.0506958% |
| 4 | 3.142 | -0.0129662% |
| 5 | 3.1416 | -0.0002338% |
| 6 | 3.14159 | 0.0000845% |
| 7 | 3.141593 | -0.0000110% |
| 8 | 3.1415927 | -0.0000015% |
| 9 | 3.14159265 | 0.0000001% |
| 10 | 3.141592654 | 0.0000000% |
Absolute error in calculating the circumference of a circle with the given radius:
| Digits | Meter | Mile | Earth | Astronomical Unit | Light Year | Galaxy | Observable Universe |
| 1 | 28.32 cm | 0.46 km | 1,804.17 km | 42,363,900 km | 17,908.56 AU | 14,159.27 ly | 3,993.87 Mpc |
| 2 | 8.32 cm | 133.87 m | 529.97 km | 12,444,300 km | 5,260.62 AU | 4,159.27 ly | 1,173.19 Mpc |
| 3 | 3.19 mm | 5.13 m | 20.29 km | 476,500 km | 201.44 AU | 159.27 ly | 44.92 Mpc |
| 4 | 0.81 mm | 1.31 m | 5.19 km | 121,900 km | 51.52 AU | 40.73 ly | 11.49 Mpc |
| 5 | 14.69 µm | 2.36 cm | 93.61 m | 2,198.01 km | 0.93 AU | 0.73 ly | 675,900 ly |
| 6 | 5.31 µm | 0.85 cm | 33.81 m | 793.94 km | 50,208,700 km | 16,781.23 AU | 244,100 ly |
| 7 | 0.69 µm | 1.11 mm | 4.41 m | 103.64 km | 6,554,400 km | 2,190.69 AU | 31,869.74 ly |
| 8 | 92.82 nm | 149.38 µm | 0.59 m | 13.89 km | 878,100 km | 293.5 AU | 4,269.74 ly |
| 9 | 7.18 nm | 11.55 µm | 4.57 cm | 1.07 km | 67,922.68 km | 22.7 AU | 330.26 ly |
| 10 | 0.82 nm | 1.32 µm | 0.52 cm | 122.73 m | 7,761.55 km | 2.59 AU | 37.74 ly |
| 11 | 20.41 pm | 32.85 nm | 130.05 µm | 3.05 m | 193.12 km | 9,656,100 km | 0.94 ly |
| 12 | 0.41 pm | 0.67 nm | 2.63 µm | 6.19 cm | 3.91 km | 195,600 km | 1,202.95 AU |
| 13 | 0.41 pm | 0.67 nm | 2.63 µm | 6.19 cm | 3.91 km | 195,600 km | 1,202.95 AU |
| 14 | 13.52 fm | 21.76 pm | 86.16 nm | 2.02 mm | 127.94 m | 6,396.77 km | 39.34 AU |
| 15 | 6.48 fm | 10.42 pm | 41.26 nm | 0.97 mm | 61.28 m | 3,063.76 km | 18.84 AU |
| 16 | 0.48 fm | 0.77 pm | 3.04 nm | 71.35 µm | 4.51 m | 225.6 km | 1.39 AU |
| 17 | 76,925,300 ym | 123.8 fm | 0.49 nm | 11.51 µm | 0.73 m | 36.39 km | 33,476,700 km |
| 18 | 3,074,700 ym | 4.95 fm | 19.59 pm | 0.46 µm | 2.91 cm | 1.45 km | 1,338,100 km |
| 19 | 925,300 ym | 1.49 fm | 5.9 pm | 138.42 nm | 0.88 cm | 0.44 km | 402,700 km |
| 20 | 74,713.23 ym | 120,239,000 ym | 0.48 pm | 11.18 nm | 0.71 mm | 35.34 m | 32,514.03 km |
| 21 | 5,286.77 ym | 8,508,200 ym | 33.68 fm | 0.79 nm | 50.02 µm | 2.5 m | 2,300.72 km |
| 22 | 713.23 ym | 1,147,800 ym | 4.54 fm | 106.7 pm | 6.75 µm | 33.74 cm | 310.39 km |
| 23 | 86.77 ym | 139,600 ym | 0.55 fm | 12.98 pm | 0.82 µm | 4.1 cm | 37.76 km |
| 24 | 6.77 ym | 10,889.69 ym | 43,109,700 ym | 1.01 pm | 64.02 nm | 3.2 mm | 2.94 km |
| 25 | 0.77 ym | 1,233.65 ym | 4,883,700 ym | 114.68 fm | 7.25 nm | 362.6 µm | 333.59 m |
| 26 | 2,069,113,700 pl | 53.82 ym | 213,100 ym | 5 fm | 316.37 pm | 15.82 µm | 14.55 m |
| 27 | 405,829,100 pl | 10.56 ym | 41,787.43 ym | 0.98 fm | 62.05 pm | 3.1 µm | 2.85 m |
| 28 | 34,587,700 pl | 0.9 ym | 3,561.43 ym | 83,626,100 ym | 5.29 pm | 264.42 nm | 24.33 cm |
| 29 | 2,536,500 pl | 4,082,025,600 pl | 261.17 ym | 6,132,600 ym | 0.39 pm | 19.39 nm | 1.78 cm |
| 30 | 61,516.66 pl | 99,001,200 pl | 6.33 ym | 148,700 ym | 9.41 fm | 0.47 nm | 0.43 mm |
| 31 | 61,516.66 pl | 99,001,200 pl | 6.33 ym | 148,700 ym | 9.41 fm | 0.47 nm | 0.43 mm |
| 32 | 356.91 pl | 574,400 pl | 2,273,880,900 pl | 862.94 ym | 54,572,100 ym | 2.73 pm | 2.51 µm |
| 33 | 356.91 pl | 574,400 pl | 2,273,880,900 pl | 862.94 ym | 54,572,100 ym | 2.73 pm | 2.51 µm |
| 34 | 14.33 pl | 23,062.27 pl | 91,298,100 pl | 34.65 ym | 2,191,100 ym | 109.56 fm | 100.79 nm |
| 35 | 1.96 pl | 3,147.15 pl | 12,458,800 pl | 4.73 ym | 299,000 ym | 14.95 fm | 13.75 nm |
| 36 | 0.52 pl | 835.87 pl | 3,309,000 pl | 1.26 ym | 79,414.88 ym | 3.97 fm | 3.65 nm |
| 37 | 0.02 pl | 39.27 pl | 155,400 pl | 3,650,060,700 pl | 3,730.65 ym | 186,532,700 ym | 171.61 pm |
| 38 | 0 pl | 0.56 pl | 2,231.63 pl | 52,401,000 pl | 53.56 ym | 2,677,900 ym | 2.46 pm |
| 39 | 0 pl | 0.56 pl | 2,231.63 pl | 52,401,000 pl | 53.56 ym | 2,677,900 ym | 2.46 pm |
| 40 | 0 pl | 0.03 pl | 133.55 pl | 3,136,000 pl | 3.21 ym | 160,300 ym | 147.44 fm |
| 41 | 0 pl | 0.01 pl | 24.13 pl | 566,500 pl | 0.58 ym | 28,949.81 ym | 26.63 fm |
| 42 | 0 pl | 0 pl | 0.47 pl | 11,118.95 pl | 703,159,600 pl | 568.22 ym | 0.52 fm |
| 43 | 0 pl | 0 pl | 0.31 pl | 7,393.36 pl | 467,553,800 pl | 377.83 ym | 347,603,600 ym |
| 44 | 0 pl | 0 pl | 0 pl | 11.57 pl | 731,600 pl | 0.59 ym | 543,900 ym |
| 45 | 0 pl | 0 pl | 0 pl | 11.57 pl | 731,600 pl | 0.59 ym | 543,900 ym |
| 46 | 0 pl | 0 pl | 0 pl | 6.94 pl | 439,100 pl | 21,957,068,900 pl | 326,500 ym |
| 47 | 0 pl | 0 pl | 0 pl | 0.46 pl | 29,143.95 pl | 1,457,197,300 pl | 21,667.11 ym |
| 48 | 0 pl | 0 pl | 0 pl | 0.09 pl | 5,729.68 pl | 286,484,000 pl | 4,259.74 ym |
| 49 | 0 pl | 0 pl | 0 pl | 0 pl | 123.89 pl | 6,194,300 pl | 92.1 ym |
| 50 | 0 pl | 0 pl | 0 pl | 0 pl | 6.81 pl | 340,700 pl | 5.07 ym |
| 51 | 0 pl | 0 pl | 0 pl | 0 pl | 4.89 pl | 244,600 pl | 3.64 ym |
| 52 | 0 pl | 0 pl | 0 pl | 0 pl | 0.21 pl | 10,479.35 pl | 9,641,002,700 pl |
| 53 | 0 pl | 0 pl | 0 pl | 0 pl | 0.02 pl | 1,227.78 pl | 1,129,559,800 pl |
| 54 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 57.07 pl | 52,503,500 pl |
| 55 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 1.47 pl | 1,349,300 pl |
| 56 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 1.47 pl | 1,349,300 pl |
| 57 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0.29 pl | 266,300 pl |
| 58 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 2,983.86 pl |
| 59 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 2,401.42 pl |
| 60 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 247.31 pl |
| 61 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 21.96 pl |
| 62 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0.41 pl |
| 63 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0.12 pl |
| 64 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0.02 pl |
| 65 | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl | 0 pl |
Labels:
Stuff I Wrote
Wednesday, March 13, 2013
Project Prevention
Project Prevention says their main goal is to promote awareness of the dangers of using drugs during pregnancy. They are better known, however, for paying drug addicts cash for volunteering for long-term birth control, including sterilization. The organization offers US$300 (£200 in the UK) to each participant. The New York Times reports that the organization initially offered more money to women who chose tubal ligations and men who chose vasectomies than to those who chose long-term birth control like intrauterine devices, but criticism forced them to adopt a flat rate. To receive the money, clients have to show evidence they have been arrested on a drug-related offence, or provide a doctor's certificate saying they use drugs, and further evidence is needed confirming that the birth-control procedure has taken place. The organization keeps statistics on its activities through survey forms that all participants fill out, before any procedure is completed. As of August 2011 based on survey forms from 3,848 clients it had paid: 1,996 (51.9%) were Caucasian; 956 (24.8%) African American; 484 (12.6%) Hispanic; 412 (10.7%) other.
Labels:
Links
Sunday, March 10, 2013
How Long to Freeze in Space
A common Sci-Fi trope is a ship losing power and the crew slowly freezing to death. I decided to do some calculations to see how long this would take to happen. This turns out to be pretty hard to actually do, mainly due to the large number of unknowns.
In the vacuum of space, only one of the three types of heat transfer applies: radiation. The formula for heat output of a body is:
`P = {dE}/{dt} = epsilon sigma A (T^4 - T_a^4)`
Where: P is power in watts, E is energy in Joules, t is time in seconds, A is surface area in square meters, and T is temperature of the object, `T_a` is ambient temperature in Kelvin. `sigma` is a constant which is `5.67 times 10^-8 {"w"}/{"m"^2 "K"}`. `epsilon` is the emissivity of the object, which ranges from 0-1.
The energy contained by an object is given by:
`E = mCT`
Where E is energy, m is mass, C is specific heat, and T is temperature. If you're going to do any calculations be careful with specific heat, as it is usually given in J/(g K), not J/(kg K).
Luckily, it's pretty easy to estimate just with a spreadsheet. We can put each degree from say 70F to 32F and use the first formula to find the heat power output (the change between each degree is less than 1%). That output is just in joules per second. We can find the total heat energy of an object at a given temperature in joules. Then you can find how long it will take to drop one degree.
However, I wanted to to solve it algebraically and get a general formula. I played around with making a differential equation of these for a while. Eventually I came up with a solution that ignores the ambient temperature (which at 3K in space is pretty ignorable).
Take the derivative with respect to time of the heat energy:
`{dE}/{dt} = mC {dT}/{dt}`
Now note that we already have a formula for `{dE}/{dt}` (and ignore the ambient temperature):
`epsilon sigma A T^4 = mC {dT}/{dt}`
Now we have one of those separable differential equations all the kids are always talking about:
`int {mC}/{epsilon sigma A} {dT}/{T^4} = int dt`
Evaluating the definite integral gives the formula:
`t(T_f) = {- m C}/{3 cdot A sigma epsilon}(1/T_0^3 - 1/T_f^3)`
Where: `T_0` is initial temperature, and `T_f` is final temperature, both in Kelvin.
Four of the above variables need to be estimated. To give some idea how accurate the estimates are, all the variables are liner. This means if you double one it'll double the time (or half it). Most of the variables are hard to estimate to within even an order of magnitude. The formula also mainly serves as a worst case estimate.
Being near a star would add enough heat that the problem could be over heating (indeed it is for the ISS). As noted on that page, our current spacecraft have mylar insulating layers which reduce the effective emissivity to 0.03. This increases the cooling time by a factor of 33 over what one would assume with a simple dull paint.
The formula also assumes the object is of uniform material and temperature. In reality the specific heat of materials varies quite a bit. Most metals are < 0.5, compared to water at 4.2. It's probably fair to assume most the thermal mass comes from the metal in the ship, so I've used 0.5 in my estimates.
The formula also ignores the fact that as the outside of the ship cools heat must be transfered from the interior (via conduction and convection) before it can radiate into space. This slows the process down more, by an amount that I don't even want to estimate. If the ship is designed to passively hold heat (which seems like it might be a good idea), it could easily be several orders of magnitude.
Mass and surface area of a fictional ship are pretty hard to estimate, to say the least. I got my estimates from the infamous Star Trek vs Star Wars site. If you think the estimates are wrong, feel free to head over there and start an argument about it.
Finally, it's also worth noting here these all assume there is no internal power generated. The power output of the runabout is about 150 kW. Anything generating power inside would subtract from that rate and increase the time to freeze. A human body only gives off about 100 watts each, and lights would probably be around 1 kW max. So, it would seem that in a situation where a small ship loses all power, freezing to death would be a serious concern. Of course humans can survive temperatures well below freezing. It would seem like a good idea to equip small ships with survival suits with an internal power source.
The time it takes to go from 70F to 0F varies from hours to months. The general trend is larger the object the longer it takes. A human body would only take a few hours. A small ship (runabout, max crew: 15) could be anywhere from 12 hours to a couple weeks. A large ship (galaxy class, crew: about 1200) would take months to years.
I made a table with some estimates, keep in mind these are probably underestimates. I used 0F as the final temp because I think it's reasonable for a clothed human to survive down to that.
In the vacuum of space, only one of the three types of heat transfer applies: radiation. The formula for heat output of a body is:
`P = {dE}/{dt} = epsilon sigma A (T^4 - T_a^4)`
Where: P is power in watts, E is energy in Joules, t is time in seconds, A is surface area in square meters, and T is temperature of the object, `T_a` is ambient temperature in Kelvin. `sigma` is a constant which is `5.67 times 10^-8 {"w"}/{"m"^2 "K"}`. `epsilon` is the emissivity of the object, which ranges from 0-1.
The energy contained by an object is given by:
`E = mCT`
Where E is energy, m is mass, C is specific heat, and T is temperature. If you're going to do any calculations be careful with specific heat, as it is usually given in J/(g K), not J/(kg K).
Luckily, it's pretty easy to estimate just with a spreadsheet. We can put each degree from say 70F to 32F and use the first formula to find the heat power output (the change between each degree is less than 1%). That output is just in joules per second. We can find the total heat energy of an object at a given temperature in joules. Then you can find how long it will take to drop one degree.
However, I wanted to to solve it algebraically and get a general formula. I played around with making a differential equation of these for a while. Eventually I came up with a solution that ignores the ambient temperature (which at 3K in space is pretty ignorable).
Take the derivative with respect to time of the heat energy:
`{dE}/{dt} = mC {dT}/{dt}`
Now note that we already have a formula for `{dE}/{dt}` (and ignore the ambient temperature):
`epsilon sigma A T^4 = mC {dT}/{dt}`
Now we have one of those separable differential equations all the kids are always talking about:
`int {mC}/{epsilon sigma A} {dT}/{T^4} = int dt`
Evaluating the definite integral gives the formula:
`t(T_f) = {- m C}/{3 cdot A sigma epsilon}(1/T_0^3 - 1/T_f^3)`
Where: `T_0` is initial temperature, and `T_f` is final temperature, both in Kelvin.
Four of the above variables need to be estimated. To give some idea how accurate the estimates are, all the variables are liner. This means if you double one it'll double the time (or half it). Most of the variables are hard to estimate to within even an order of magnitude. The formula also mainly serves as a worst case estimate.
Being near a star would add enough heat that the problem could be over heating (indeed it is for the ISS). As noted on that page, our current spacecraft have mylar insulating layers which reduce the effective emissivity to 0.03. This increases the cooling time by a factor of 33 over what one would assume with a simple dull paint.
The formula also assumes the object is of uniform material and temperature. In reality the specific heat of materials varies quite a bit. Most metals are < 0.5, compared to water at 4.2. It's probably fair to assume most the thermal mass comes from the metal in the ship, so I've used 0.5 in my estimates.
The formula also ignores the fact that as the outside of the ship cools heat must be transfered from the interior (via conduction and convection) before it can radiate into space. This slows the process down more, by an amount that I don't even want to estimate. If the ship is designed to passively hold heat (which seems like it might be a good idea), it could easily be several orders of magnitude.
Mass and surface area of a fictional ship are pretty hard to estimate, to say the least. I got my estimates from the infamous Star Trek vs Star Wars site. If you think the estimates are wrong, feel free to head over there and start an argument about it.
Finally, it's also worth noting here these all assume there is no internal power generated. The power output of the runabout is about 150 kW. Anything generating power inside would subtract from that rate and increase the time to freeze. A human body only gives off about 100 watts each, and lights would probably be around 1 kW max. So, it would seem that in a situation where a small ship loses all power, freezing to death would be a serious concern. Of course humans can survive temperatures well below freezing. It would seem like a good idea to equip small ships with survival suits with an internal power source.
The time it takes to go from 70F to 0F varies from hours to months. The general trend is larger the object the longer it takes. A human body would only take a few hours. A small ship (runabout, max crew: 15) could be anywhere from 12 hours to a couple weeks. A large ship (galaxy class, crew: about 1200) would take months to years.
I made a table with some estimates, keep in mind these are probably underestimates. I used 0F as the final temp because I think it's reasonable for a clothed human to survive down to that.
| Name | Length (m) | Crew | Surface Area (`"m"^2`) | Metric Tons | Time 70F to 0F |
| Death Star II | 160,000 | 2,500,000 | 80,400,000,000 | 1,500,000,000,000,000 | 1199 years |
| Super Star Destroyer | 17,600 | 300,000 | 201,911,000 | 8,322,000,000 | 2.65 years |
| Borg Cube | 3,036 | 130,000 | 55,325,235 | 60,000,000,000 | 70 years |
| Enterprise-D | 642 | 1,200 | 524,742 | 10,200,000 | 1.25 years |
| Enterprise | 310 | 430 | 145,901 | 1,000,000 | 161 days |
| Runabout | 23 | 8 | 2,082 | 1,000 | 11.3 days |
| Type 6 Shuttlecraft | 6 | 2 | 92 | 50 | 12.8 days |
| TIE Fighter | 6 | 1 | 190 | 6 | 17.8 hours |
| Naked Human | 2 | 1 | 1.80 | 0.090 | 0.96 hours (98.6F to 84F) |
Labels:
Stuff I Wrote
Sunday, March 3, 2013
Friday, February 15, 2013
100 Cats In Ikea
http://www.youtube.com/watch?&v=vCB7RqGS684
"Let's take 100 cats, release them in Ikea, and see what happens."
Greatest thing the human race has ever done.
"Let's take 100 cats, release them in Ikea, and see what happens."
Greatest thing the human race has ever done.
Labels:
Links
Thursday, February 14, 2013
Massive Police Shootout in Cleveland Despite Lack of Criminals
http://www.schneier.com/blog/archives/2013/02/massive_police.html
A November car chase ended in a "full blown-out" firefight, with glass and bullets flying, according to Cleveland police officers who described for investigators the chaotic scene at the end of the deadly 25-minute pursuit.
But when the smoky haze -- caused by rapid fire of nearly 140 bullets in less than 30 seconds -- dissipated, it soon became clear that more than a dozen officers had been firing at one another across a middle school parking lot in East Cleveland.
At the end of the scene, both unarmed -- and presumably innocent -- people in the car were dead.
Labels:
Links
Tuesday, February 12, 2013
Friday, February 8, 2013
Friday, February 1, 2013
Blank screen if kids yell too much
http://superuser.com/questions/545329/blank-screen-if-kids-yell-too-much
My kids (4 and 5) yell a lot when playing games on our Linux box. I found an effective cure for this: I've told them that the computer doesn't like loud noises. So when they get loud, I ssh into the box and run:
This turns off the screen for 15 seconds. They get quiet, but not to the level that I would be happy with. So I need to continue this educational process, but I'm getting tired of doing this manually.chvt 3; sleep 15; chvt 7
Labels:
Links
Thursday, January 31, 2013
Kentucky man sentenced to attend church
http://www.wkyt.com/home/headlines/Kentucky-man-sentenced-to-attend-church-188915001.html
I also don't know if we'll hear anything else about it, as I don't know if anyone else could challenge it without standing. Clearly, he won't challenge it.
In the comments on that site 90% of the people are defending the choice, since "he had a choice". As a quick rebuttal, what if he had been convicted of armed robbery and the judge gave him the choice of 1 year in prison or 50 lashes? Or if the judge gave him the choice of the guy paying the judge $10k on the side or go to jail? Or if it had been a girl and the judge gave the choice of jail or sex?
Or as one of the commenters pointed out, I wonder how the people that think this is ok would feel if the choice had been between jail or attending a mosque.
A choice doesn't make it legal. I think people are just being blinded to that by the fact that they personally feel that attending church is a positive thing.
Go to jail or go to church. That was the choice for a Kentucky man arrested in a theft case.Well this is certainly interesting. Unfortunately, all the articles are very short local news, so we don't know the details. From the phrasing of one report it made it seem like the church agreed to not press charges if he attended church, and I'm not really sure if that would make it legal or not.
As part of his plea deal, a judge sentenced 23-year-old James Talbot Nickell to attend Sunday services for six weeks at the First Baptist Church in Sandy Hook.
I also don't know if we'll hear anything else about it, as I don't know if anyone else could challenge it without standing. Clearly, he won't challenge it.
In the comments on that site 90% of the people are defending the choice, since "he had a choice". As a quick rebuttal, what if he had been convicted of armed robbery and the judge gave him the choice of 1 year in prison or 50 lashes? Or if the judge gave him the choice of the guy paying the judge $10k on the side or go to jail? Or if it had been a girl and the judge gave the choice of jail or sex?
Or as one of the commenters pointed out, I wonder how the people that think this is ok would feel if the choice had been between jail or attending a mosque.
A choice doesn't make it legal. I think people are just being blinded to that by the fact that they personally feel that attending church is a positive thing.
Labels:
Links,
Stuff I Wrote
Tuesday, January 22, 2013
Due Process When Everything is a Crime
http://papers.ssrn.com/sol3/papers.cfm?abstract_id=2203713
Overall, the problem stems from a dynamic in which those charged with crimes have a lot at risk, while those doing the charging have very little skin in the game. One source of imbalance is prosecutorial immunity. The absolute immunity of prosecutors – like the absolute immunity of judges – is a judicial invention, a species of judicial activism that gets less attention than many other less egregious examples. Although such immunity no doubt prevents significant mischief, it also enables significant mischief by eliminating one major avenue of accountability. Even a shift to qualified, good-faith immunity for prosecutors would change the calculus significantly.
Another remedy might be a "loser pays" rule for criminal defense costs. After all, when a person is charged with a crime, the defense – for which non-indigent defendants bear the cost – is an integral part of the criminal justice process.10 For guilty defendants, one might view this cost as part of the punishment. But for those found not guilty, it looks more like a taking: Spend this money in the public interest, to support a public endeavor, or go to jail. To further discipline the process, we might pro‐rate things: Charge a defendant with 20 offenses, but convict on only one, and the prosecution must bear 95% of the defendant’s legal fees. This would certainly discourage overcharging.
Labels:
Links
Monday, January 21, 2013
How one man escaped from a North Korean prison camp
http://www.utsalumni.org/news/how-one-man-escaped-from-a-north-korean-prison-camp-3549/
“By the way,” Shin asked, “where is Pyongyang?”
Shin’s question stunned Park. He explained that Pyongyang, located about 50 miles south of Camp 14, was the capital of North Korea, the city where the country’s powerful people lived. Park said he had grown up there, studying in East Germany and the Soviet Union. After returning home, he had become chief of a taekwondo training centre. Park explained what life was like outside Camp 14. He told Shin about money, television, computers and mobile phones. He explained that the world was round.
Much of what Park talked about was difficult for Shin to understand, believe or care about. What delighted him – what he kept begging for – were stories about eating. Park described chicken, pork and beef in China, Hong Kong, Germany, England and the former Soviet Union. Intoxicated, Shin made perhaps the first free decision of his life. He chose not to snitch.
Labels:
Links
Friday, January 18, 2013
Marathon Man
http://www.newyorker.com/reporting/2012/08/06/120806fa_fact_singer?currentPage=all
Kursh had a blog, and on August 6, 2010, he posted a blind item about Litton titled “Another Rosie Ruiz?”—a reference to the scammer who was briefly heralded as the winner of the women’s division of the 1980 Boston Marathon, before it was determined that she’d jumped onto the course less than a mile from the finish. Kursh wrote in a follow-up that he had been exchanging concerns with other race directors, adding, “I smell a rat.”
In an e-mail exchange initiated by Kursh, Litton claimed that photographs of him would be hard to find, because his shirt had covered his racing bib. He added, “Wasn’t there a timing mat at the turnaround?” Kursh ultimately decided to disqualify him, explaining, “From your comment here it is pretty obvious that you have NO idea where the timing mats were on route. They definitely were not at this turn-around point.”
On occasions when Litton responded to such pointed challenges, he never did so in a hostile or nakedly defensive manner. After a disqualification, he simply deleted the result and the recap from his Web site, as if he had never registered for the race. His default demeanor was equable mystification.
Labels:
Links
Monday, January 14, 2013
On the Evolution of Memes
http://www.gocomics.com/tomthedancingbug/2012/11/30
Here on the internet, we have things called memes. They are essentially insides jokes that separate those of us that live in the internet from those of you that don't.
However, every once in an while a ornery old man will come along and point out that memes don't just mean 'stupid internet joke'. The term meme was actually coined by Richard Dawkins in his book the Selfish Gene in 1976.
The meme was a type of memory gene (hence the name). The idea being that ideas spread through a culture and evolve over time to more persistent forms. I seem to recall he gave as an example some song that he sang at his school as a kid that his father had known from his time as a kid and that was still sung, perhaps with minor changes.
The key point was that in any system where things are copied, but with occasional mistakes, 'better' forms will tend to replace other forms. Here, 'better' simply means more likely to be copied for whatever reason. This is frankly, pretty obvious in retrospect, and is the central idea of evolution.
As another example I like to use the line "Luke, I am your father." from Star Wars. If you are a pedantic nerd like me, you likely know that line never appears in the movies. This is the exchange:
Darth Vader: Obi-Wan never told you what happened to your father.
Luke Skywalker: He told me enough! He told me you killed him!
Darth Vader: No. I am your father.
If you examine the actual dialogue it should be clear why the modified version is more well known. Simply saying "No. I am your father." might not be a clear enough reference to Star Wars, and people might not get the joke. By replacing 'no' with 'luke' it makes it clear that it's the Star Wars quote.
Another example is the line "Beam me up, Scotty", which never appears in the original Star Trek Series. Similar version were used on the show, and I won't speculate as to why that one become most prevalent. Regardless, the wiki page has this interesting set of examples:
If you were alive prior to 5 years ago, you are probably aware that the word meme is a recent addition to most people's vocabularies. This, despite the fact that we know it has existed for close to 40 years.
The point I'm getting at here, is that the word meme itself is a perfect example of memes in action. Originally it had a specific meaning with respect to this idea of cultural evolution, but now it has evolved to simply mean 'repeated, sometimes modified joke'. This form is clearly better adapted to flourish in culture. Those who oppose it in favor of the original meaning clearly never understood the point.
Here on the internet, we have things called memes. They are essentially insides jokes that separate those of us that live in the internet from those of you that don't.
However, every once in an while a ornery old man will come along and point out that memes don't just mean 'stupid internet joke'. The term meme was actually coined by Richard Dawkins in his book the Selfish Gene in 1976.
The meme was a type of memory gene (hence the name). The idea being that ideas spread through a culture and evolve over time to more persistent forms. I seem to recall he gave as an example some song that he sang at his school as a kid that his father had known from his time as a kid and that was still sung, perhaps with minor changes.
The key point was that in any system where things are copied, but with occasional mistakes, 'better' forms will tend to replace other forms. Here, 'better' simply means more likely to be copied for whatever reason. This is frankly, pretty obvious in retrospect, and is the central idea of evolution.
As another example I like to use the line "Luke, I am your father." from Star Wars. If you are a pedantic nerd like me, you likely know that line never appears in the movies. This is the exchange:
Darth Vader: Obi-Wan never told you what happened to your father.
Luke Skywalker: He told me enough! He told me you killed him!
Darth Vader: No. I am your father.
If you examine the actual dialogue it should be clear why the modified version is more well known. Simply saying "No. I am your father." might not be a clear enough reference to Star Wars, and people might not get the joke. By replacing 'no' with 'luke' it makes it clear that it's the Star Wars quote.
Another example is the line "Beam me up, Scotty", which never appears in the original Star Trek Series. Similar version were used on the show, and I won't speculate as to why that one become most prevalent. Regardless, the wiki page has this interesting set of examples:
"Beam me up, Scotty" is similar to the phrase, "Just the facts, ma'am", attributed to Jack Webb's character of Joe Friday on Dragnet, "It's elementary, my dear Watson", attributed to Sherlock Holmes, "Luke, I am your father", attributed to Darth Vader, or "Play it again, Sam", attributed to Ilsa Lund in Casablanca and "We don't need no stinkin' badges!" attributed to Gold Hat in The Treasure of the Sierra Madre. All five lines are the best known quotations from these works for many viewers, but not one is an actual, direct quotation.It doesn't matter why any of these are used instead of the originals. What matters is that they are all examples of ideas evolving to more persistent forms.
If you were alive prior to 5 years ago, you are probably aware that the word meme is a recent addition to most people's vocabularies. This, despite the fact that we know it has existed for close to 40 years.
The point I'm getting at here, is that the word meme itself is a perfect example of memes in action. Originally it had a specific meaning with respect to this idea of cultural evolution, but now it has evolved to simply mean 'repeated, sometimes modified joke'. This form is clearly better adapted to flourish in culture. Those who oppose it in favor of the original meaning clearly never understood the point.
Labels:
Links,
Stuff I Wrote
Ancient Roman Graffiti
http://www.pompeiana.org/resources/ancient/graffiti%20from%20pompeii.htm
"Weep, you girls. My penis has given you up. Now it penetrates men’s behinds. Goodbye, wondrous femininity!"
"Weep, you girls. My penis has given you up. Now it penetrates men’s behinds. Goodbye, wondrous femininity!"
Labels:
Links
Wednesday, January 9, 2013
Mailinator Inbox Generator
Yesterday, I wrote about Mailinator. This was spurred by my writing a simple page to help generate random Mailinator inboxes.
Mailinator is super useful for websites that force you to register just to see content. Usually I just use the same simple username/pass combo on all these. Sometimes, that is already taken so I have to use a random one. The mailinator homepage gives a random inbox name, but it's annoying to select it, and to select just the username part. I made a page that uses the 1000 most common first and last names and generates a random combo and gives all the fields you would need to register in easy to copy fashion.
http://daleswanson.org/things/mail.htm
Some notes: It generates the password based on the md5 hash of the username, limited to whatever password requirements you give it. Nice for sites that force digits or upper case letters. It also means you can find the password in the future if you need it by recalculating the md5 hash yourself. If you find out the requirements after putting in the other info you can change the parameters without it updating new random info.
There is also a checkbox to add a random 3 digit number to the end of the usernames. This is nice for sites where every username is taken. I tested the gmail registration and every single combo given was taken, none of the ones with random numbers were though.
It also gives an alternative domain to use if mailinator.com is blocked. If the alternative is blocked as well it lets you get another one without changing all the other info.
Mailinator is super useful for websites that force you to register just to see content. Usually I just use the same simple username/pass combo on all these. Sometimes, that is already taken so I have to use a random one. The mailinator homepage gives a random inbox name, but it's annoying to select it, and to select just the username part. I made a page that uses the 1000 most common first and last names and generates a random combo and gives all the fields you would need to register in easy to copy fashion.
http://daleswanson.org/things/mail.htm
Some notes: It generates the password based on the md5 hash of the username, limited to whatever password requirements you give it. Nice for sites that force digits or upper case letters. It also means you can find the password in the future if you need it by recalculating the md5 hash yourself. If you find out the requirements after putting in the other info you can change the parameters without it updating new random info.
There is also a checkbox to add a random 3 digit number to the end of the usernames. This is nice for sites where every username is taken. I tested the gmail registration and every single combo given was taken, none of the ones with random numbers were though.
It also gives an alternative domain to use if mailinator.com is blocked. If the alternative is blocked as well it lets you get another one without changing all the other info.
Labels:
Links,
Stuff I Wrote
Mailinator
Apparently, I've never written here about Mailinator before. It is a great service for those websites that force you to register to see content. The idea is simple. Enter any random email address @mailinator.com in the registration, and then any emails sent to it are publicly viewable for 24 hours, allowing you to click to confirmation link. For example here are some inboxes:
monkeys@mailinator.com
MileyCyrus@mailinator.com
StinkyDog@mailinator.com
Just to be clear, you don't have to set up anything before hand. Just enter anything you want and end it with @mailinator.com and then you (or anyone else) can check the mail.
There are some additional useful features. First, it has alternate domain names, which still go to the same inboxes, but allow you got get around admins who block @mailinator.com. For example monkeys@devnullmail.com will go to the same inbox as monkeys@mailinator.com. Here is an amusing story about how the guy who runs mailinator handled people trying to scrape all the alternate domains to block them.
Another interesting feature is that you can point the mx record of any domain you own to mailinator, and it will function the same as the above alternative domains. In other words, I could set up daleswanson.org's mx record such that emails to monkeys@daleswansonson.org go to the same inbox as above.
Lastly, there are alternative inbox names. This means that every inbox has an alternative "secret" name, which is displayed on the inbox's page. For example the alternative for monkeys@mailinator.com is M8R-b8esq@mailinator.com. Emails sent there will go to the same monkeys@mailinator.com inbox that I've been using as an example. The point of this is to allow you to think up a somewhat long and random inbox name, and then only give out the alternate one. This, in effect, makes your inbox name a password, and gives you some privacy.
monkeys@mailinator.com
MileyCyrus@mailinator.com
StinkyDog@mailinator.com
Just to be clear, you don't have to set up anything before hand. Just enter anything you want and end it with @mailinator.com and then you (or anyone else) can check the mail.
There are some additional useful features. First, it has alternate domain names, which still go to the same inboxes, but allow you got get around admins who block @mailinator.com. For example monkeys@devnullmail.com will go to the same inbox as monkeys@mailinator.com. Here is an amusing story about how the guy who runs mailinator handled people trying to scrape all the alternate domains to block them.
Another interesting feature is that you can point the mx record of any domain you own to mailinator, and it will function the same as the above alternative domains. In other words, I could set up daleswanson.org's mx record such that emails to monkeys@daleswansonson.org go to the same inbox as above.
Lastly, there are alternative inbox names. This means that every inbox has an alternative "secret" name, which is displayed on the inbox's page. For example the alternative for monkeys@mailinator.com is M8R-b8esq@mailinator.com. Emails sent there will go to the same monkeys@mailinator.com inbox that I've been using as an example. The point of this is to allow you to think up a somewhat long and random inbox name, and then only give out the alternate one. This, in effect, makes your inbox name a password, and gives you some privacy.
Labels:
Links,
Stuff I Wrote
Friday, December 28, 2012
Federal prisoners use snitching for personal gain
http://www.usatoday.com/story/news/nation/2012/12/14/jailhouse-informants-for-sale/1762013/
Snitching has become so commonplace that in the past five years at least 48,895 federal convicts -- one of every eight -- had their prison sentences reduced in exchange for helping government investigators, a USA TODAY examination of hundreds of thousands of court cases found. The deals can chop a decade or more off of their sentences.
How often informants pay to acquire information from brokers such as Watkins is impossible to know, in part because judges routinely seal court records that could identify them. It almost certainly represents an extreme result of a system that puts strong pressure on defendants to cooperate. Still, Watkins' case is at least the fourth such scheme to be uncovered in Atlanta alone over the past 20 years.
Those schemes are generally illegal because the people who buy information usually lie to federal agents about where they got it. They also show how staggeringly valuable good information has become -- prices ran into tens of thousands of dollars, or up to $250,000 in one case, court records show.
Labels:
Links
Friday, December 21, 2012
Great Minds
I recently read Nate Silver's newest book, The Signal and the Noise: Why Most Predictions Fail – But Some Don't, which was good if you're wondering. Chapter 11 is about the stock market, and he points out that there is some correlation between one day's rise or fall and the next's. He then calculates that one could make quite a bit of money investing based on this fact, but that fees would kill it. Finally, he notes that the correlation has disappeared recently, making the whole plan worthless.
Assuming you've memorized all my posts, you should now be realizing I made a post about the same thing. His book came out September 27, and my post was on October 13, so it would seem pretty obvious that I read the book and got the idea from there (even though I didn't). I'm surprised no one pointed this out in the comments. I can only assume that this is due to a lack of readership of his book.
In another case, I recently discovered this post on the expected value of a Mega Millions ticket. He calculates the expected value of the lesser prizes, calculates the amount of the jackpot one would actually get after taxes, and then uses the Poisson Distribution to calculate the expected value of the jackpot. He then fits a polynomial model to the past data in order to predict what various jackpot's values will be. In other words, exactly what I did.
The key difference is he didn't spread his through 3 long posts, filled with math, and no visual breaks in the wall of text. Also, he didn't include anunnecessary free lesson on the guts of Linear Algebra. I'll leave it to the masses to decide which approach is better.
I made my first post on the subject in April 2012, and he made his in January 2011. So it's debatable who copied who.
Time-machine-assisted plagiarism aside, it is interesting to see someone else tackle the same problem, and do it largely the same way, and produce very similar results. One example of a difference is he calculated an expected value from the non jackpot prizes of $0.10, whereas I calculated $0.15. The difference is he applied taxes to all the prizes, whereas I exempted the $150 and below prizes from taxes. It is interesting how much of a difference that makes.
Assuming you've memorized all my posts, you should now be realizing I made a post about the same thing. His book came out September 27, and my post was on October 13, so it would seem pretty obvious that I read the book and got the idea from there (even though I didn't). I'm surprised no one pointed this out in the comments. I can only assume that this is due to a lack of readership of his book.
In another case, I recently discovered this post on the expected value of a Mega Millions ticket. He calculates the expected value of the lesser prizes, calculates the amount of the jackpot one would actually get after taxes, and then uses the Poisson Distribution to calculate the expected value of the jackpot. He then fits a polynomial model to the past data in order to predict what various jackpot's values will be. In other words, exactly what I did.
The key difference is he didn't spread his through 3 long posts, filled with math, and no visual breaks in the wall of text. Also, he didn't include an
I made my first post on the subject in April 2012, and he made his in January 2011. So it's debatable who copied who.
Time-machine-assisted plagiarism aside, it is interesting to see someone else tackle the same problem, and do it largely the same way, and produce very similar results. One example of a difference is he calculated an expected value from the non jackpot prizes of $0.10, whereas I calculated $0.15. The difference is he applied taxes to all the prizes, whereas I exempted the $150 and below prizes from taxes. It is interesting how much of a difference that makes.
Labels:
Links,
Stuff I Wrote
Tuesday, December 18, 2012
Saturday, December 1, 2012
Friday, November 30, 2012
North Korea Says Its Archaeologists Discovered A 'Unicorn Lair'
http://www.npr.org/blogs/thetwo-way/2012/11/30/166265699/north-korea-says-its-archaeologists-discovered-a-unicorn-lair?ft=1&f=1001
"The lair is located 200 meters from the Yongmyong Temple in Moran Hill in Pyongyang City. A rectangular rock carved with words "Unicorn Lair" stands in front of the lair. The carved words are believed to date back to the period of Koryo Kingdom (918-1392).
"Jo Hui Sung, director of the Institute, told KCNA:
"'Korea's history books deal with the unicorn, considered to be ridden by King Tongmyong, and its lair."
Labels:
Links
Thursday, November 15, 2012
Why Donald Rumsfeld Can’t Be Sued for Torture
http://www.slate.com/articles/news_and_politics/jurisprudence/2012/11/new_ruling_donald_rumsfeld_can_t_be_sued_for_torture.html
The facts are a case study in system failure. Donald Vance and Nathan Ertel were Americans working for a private security firm in Iraq. When Vance became suspicious that his employer was selling weapons to groups hostile to the United States, he went to the FBI. Vance and Ertel were then fingered as arms dealers. Military personnel arrested them in 2006 and held them for several weeks.http://en.wikipedia.org/wiki/Donald_Vance
According to the complaint, Vance and Ertel were held in solitary confinement and subjected to violence, sleep deprivation, extremes of temperature and sound, denial of food, water, and medical care, and other abuses. Though the Army Field Manual (and four judges) calls this torture, the majority opinion prefers the euphemism “harsh interrogation techniques.”
Vance was a 29-year-old Navy veteran from Chicago when he went to Iraq as a security contractor. Vance became an unpaid informant for the F.B.I., passing them evidence that seemed to suggest that the Iraqi security firm at which he worked might be engaged in illegal weapons trading, particularly to officials from the Iraqi Interior Ministry.
However, when American soldiers raided the firm, he was treated as a suspect. Another American who worked for the company, but had resigned over the alleged weapons trading, was also detained. Vance was held for three months at Camp Cropper, America’s maximum security prison site in Baghdad.
Labels:
Links
Tuesday, November 13, 2012
The Growth Of Monopoly Power
http://thesocietypages.org/socimages/2012/11/13/the-growth-of-monopoly-power/
Percentage of Sales for Four Largest Firms in Selected U.S. Retail Industries:
Industry (NAICS code) 1992 1997 2002 2007 Food & beverage stores (445) 15.4 18.3 28.2 27.7 Health & personal care stores (446) 24.7 39.1 45.7 54.4 General merchandise stores (452) 47.3 55.9 65.6 73.2 Supermarkets (44511) 18.0 20.8 32.5 32.0 Book stores (451211) 41.3 54.1 65.6 71.0 Computer & software stores (443120) 26.2 34.9 52.5 73.1
Labels:
Links
Saturday, November 10, 2012
Odds of jumping into a star
In an attempt to be more like Dwight Schrute I just finished watching the new Battlestar Galactica. Overall, it was a good show. I did, however, have a problem with it. Its particular answer to faster than light (FTL) travel was a jump drive. The practical effect was that coordinates could be entered and then the ship would be more or less instantly transported to those coordinates, without covering the area between. The coordinates were relative to the current location, so they had to be calculated for each jump at the time. At several points during the series, in order to escape an enemy, an unexpected jump was needed immediately. Each time a jump to anywhere was ordered, and the response was that it could land them into a star. The jump was performed anyway and they beat the odds.
The problem is space is almost entirely empty space (hence the name). I knew the odds of actually jumping into something would be remote, and decided to calculate them.
Before I start, a quick note: I seem to recall a similar objection in Star Wars. However, in Star Wars FTL travel was via hyperdrive, which did seem to cover the area between the start and end point. This would greatly increase the odds of actually hitting something. I'm assuming the jumps in BSG don't cover the area in between, which I feel is justified by the name, dialogue, and jumps that were made surrounded by matter.
Volume of the Milky Way:
The series is purposly coy about if it involves our Earth, but without spoilers it's safe to say it takes place in a galaxy very similar to the Milky Way. Wikipedia tells me that the Milky Way is a disk 100,000 light years across, and about 1000 light years thick on average.
`V = \pi \cdot r^2 \cdot h`
`V = \pi \cdot (50,000" ly") ^2 \cdot 1000" ly" = 7,854,000,000" ly"^3`
Volume of stars:
Estimates for stars in the Milky Way are 300-400 billion. I'll round that up to 500 billion. I'll also assume stars are Sun like. While there is a lot of stars larger and smaller than the Sun, it's an alright average.
`V = 4/3 \cdot \pi \cdot r^3 \cdot n`
`V = 4/3 \cdot \pi \cdot (1.47 \times 10^-7" ly")^3 \cdot 500 \times 10^9 = 6.69 \times 10^-9" ly"^3`
Odds:
As you can see, the stars occupy a very tiny volume of the Milky Way. The odds of a random point being inside a star are about 1 in 1,174,000,000,000,000,000.
Larger stars:
Some of you may be protesting that there is other matter in the galaxy besides stars. However, this stuff is as rare relative to stars as stars are relative to the galaxy as a whole. Still, it could be argued that jumping in close to a star would be a problem. So let's increase the size of the average star we are using to the size of the orbit of Mercury. Jumping in at the distance of Mercury from the Sun shouldn't pose a threat for a ship in BSG. This also more than allows for all the other non-star matter.
`V = 4/3 \cdot \pi \cdot (7.38 \times 10^-6" ly")^3 \cdot 500 \times 10^9 = 8.42 \times 10^-4" ly"^3`
Still a pretty small chance at about 1 in 9,330,000,000,000.
Entire star systems:
Let's go ahead and say that the entire star system is off limits to a jump. Pluto orbits at a max of 50 AU. The Voyager probes are just shy of 100 AU and are currently at the heliopause, considered the edge of the solar system. Using 100 AU radius spheres gives:
`V = 4/3 \cdot \pi \cdot (1.59 \times 10^-3" ly")^3 \cdot 500 \times 10^9 = 8348" ly"^3`
Which gives odds of about 1 in 940,876.
So there is only about a 1 in a million chance of jumping into a star system, which itself is almost entirely empty.
The problem is space is almost entirely empty space (hence the name). I knew the odds of actually jumping into something would be remote, and decided to calculate them.
Before I start, a quick note: I seem to recall a similar objection in Star Wars. However, in Star Wars FTL travel was via hyperdrive, which did seem to cover the area between the start and end point. This would greatly increase the odds of actually hitting something. I'm assuming the jumps in BSG don't cover the area in between, which I feel is justified by the name, dialogue, and jumps that were made surrounded by matter.
Volume of the Milky Way:
The series is purposly coy about if it involves our Earth, but without spoilers it's safe to say it takes place in a galaxy very similar to the Milky Way. Wikipedia tells me that the Milky Way is a disk 100,000 light years across, and about 1000 light years thick on average.
`V = \pi \cdot r^2 \cdot h`
`V = \pi \cdot (50,000" ly") ^2 \cdot 1000" ly" = 7,854,000,000" ly"^3`
Volume of stars:
Estimates for stars in the Milky Way are 300-400 billion. I'll round that up to 500 billion. I'll also assume stars are Sun like. While there is a lot of stars larger and smaller than the Sun, it's an alright average.
`V = 4/3 \cdot \pi \cdot r^3 \cdot n`
`V = 4/3 \cdot \pi \cdot (1.47 \times 10^-7" ly")^3 \cdot 500 \times 10^9 = 6.69 \times 10^-9" ly"^3`
Odds:
As you can see, the stars occupy a very tiny volume of the Milky Way. The odds of a random point being inside a star are about 1 in 1,174,000,000,000,000,000.
Larger stars:
Some of you may be protesting that there is other matter in the galaxy besides stars. However, this stuff is as rare relative to stars as stars are relative to the galaxy as a whole. Still, it could be argued that jumping in close to a star would be a problem. So let's increase the size of the average star we are using to the size of the orbit of Mercury. Jumping in at the distance of Mercury from the Sun shouldn't pose a threat for a ship in BSG. This also more than allows for all the other non-star matter.
`V = 4/3 \cdot \pi \cdot (7.38 \times 10^-6" ly")^3 \cdot 500 \times 10^9 = 8.42 \times 10^-4" ly"^3`
Still a pretty small chance at about 1 in 9,330,000,000,000.
Entire star systems:
Let's go ahead and say that the entire star system is off limits to a jump. Pluto orbits at a max of 50 AU. The Voyager probes are just shy of 100 AU and are currently at the heliopause, considered the edge of the solar system. Using 100 AU radius spheres gives:
`V = 4/3 \cdot \pi \cdot (1.59 \times 10^-3" ly")^3 \cdot 500 \times 10^9 = 8348" ly"^3`
Which gives odds of about 1 in 940,876.
So there is only about a 1 in a million chance of jumping into a star system, which itself is almost entirely empty.
Labels:
Stuff I Wrote
Friday, November 9, 2012
Saturday, October 20, 2012
Thursday, October 18, 2012
Tuesday, October 16, 2012
Alpha Centauri has a planet
In this case, the planet is low mass but very close in. The Doppler shift in the starlight amounts to a mere half meter per second – slower than walking speed! When I read that I was stunned; that low of a signal is incredibly hard to detect. Heck, the star’s rotation is three times that big. But looking at the paper, it’s pretty convincing. They did a fantastic job teasing that out of the noise.The graph displayed shows the effect of the planet on the star. RV means "radial velocity", the speed toward and away from us as the star gets tugged by the planet. The x-axis is time, measured in units of the period of the planet (in other words, where it reads as 1 that means 3.24 days). The dots look like they’re just scattered around, but when you average them together – say, taking all the dots in a one hour time period – you get the red dots shown (the vertical lines are the error bars). The signal then pops right out, and you can see the tell-tale sine wave of a planet pulling its star.
Labels:
Links
Subscribe to:
Posts (Atom)



