Greetings! It's been a VERY long time since I've posted to this blog, but it's nice to see posts are still getting read from time to time. Yay, google!
So, what has drawn me out of my blogging hiatus and compelled me to post something? Why, Bill Nye the Science Guy, of course!
You knew he was debating Ken Ham at the Creation Museum tonight, right? And that you could watch the debate live online?
For more details, hop on over to this post at NPR, and/or tune in here to catch the debate live. If you've never heard of the Creation Museum (technically, it's a Christian ministry) check out the link on the sidebar.
The end of the world... and I feel fine!
The end is very nigh. May 21st is upon us and as you've probably already heard in the news or elsewhere that means it's time for the rapture The Rapture!
Predictions like these have a long track record of being correct, so best of luck to you come judgement and until then be vigilant for unmanned cars whizzing down the road, anyone flying up into the air, or any six-winged creatures covered in eyeballs. If you happen to see any of these things, do leave a comment below!
PS: if you're still here on the 22nd consider opening your home to your ex-neighbors' earth-bound pets!
Predictions like these have a long track record of being correct, so best of luck to you come judgement and until then be vigilant for unmanned cars whizzing down the road, anyone flying up into the air, or any six-winged creatures covered in eyeballs. If you happen to see any of these things, do leave a comment below!
PS: if you're still here on the 22nd consider opening your home to your ex-neighbors' earth-bound pets!
Happy Mother's Day!!
If you were planning on sending your mom a nerdy video, make sure you don't go overboard on the nerdiness -- unless you're mom's a super nerd, then go for it! For example, this is an excellent choice
while this one -- although both nerdy and relevant to motherhood -- might not quite be the best choice...
while this one -- although both nerdy and relevant to motherhood -- might not quite be the best choice...
Happy π Day!!! No, wait, scratch that...
Lets face it -- π sucks. Not pie, pie is genuinely awesome and so is the fact that "pie" sounds like "π", so we can have fun with things like this. But seriously... π? It's totally off by a factor of 2!
For more on τ day, check out the Tau Manifest at http://tauday.com/ and of course http://halftauday.com/ if you're still a fan of π.
For more on τ day, check out the Tau Manifest at http://tauday.com/ and of course http://halftauday.com/ if you're still a fan of π.
A request: I need your comments!
I need your help! A reader recently tried to leave a comment on this blog, and despite the fact that I received an email notifying me of the new comment, it never appeared on the blog post...
So, if you can spare a few moments, please head over to this post (and/or leave a comment below) and let me know the following:
If the comment submission process seemed to work but your comment doesn't show up on the post, please drop me an email letting me know what happened.
Thanks! ~ Paul
Figure 1: I'm about this confused, if not more.
So, if you can spare a few moments, please head over to this post (and/or leave a comment below) and let me know the following:
Operating System:** Totally unrelated, optional, but potentially delicious and therefore worth requesting. ;)
Browser:
Comment type (Anonymous, Google, etc.):
Link to your favorite recipe**:
If the comment submission process seemed to work but your comment doesn't show up on the post, please drop me an email letting me know what happened.
Thanks! ~ Paul
Evolution is a pain in the ass, especially for herpetologists and ornithologists
The reason? Imagine you have a kid, and your neighbor has 2 kids, then you both find out that really, one of their kids is sort of... yours. (-- awkward pause --) That's basically the problem here:
Herpetology is the study of reptiles and amphibians, however unraveling the evolutionary history of these two groups (along with birds) has shown us that birds are actually nested in among reptiles.
Now, to be fair, I think the comic has it wrong: I mean, shouldn't this justify lumping ornithology in a sub-discipline of herpetology?
Herpetology is the study of reptiles and amphibians, however unraveling the evolutionary history of these two groups (along with birds) has shown us that birds are actually nested in among reptiles.
Now, to be fair, I think the comic has it wrong: I mean, shouldn't this justify lumping ornithology in a sub-discipline of herpetology?
Thesis writing...
... has pulled me away from blogging the past couple of months. BUT, I'll hopefully be done and back to a regular posting schedule later this spring!
In the meantime, you should check out R-bloggers.com and "like" their facebook page to get regular updates on your news feed.
Figure 1: Mascot for my recent rate of new blog posts.
In the meantime, you should check out R-bloggers.com and "like" their facebook page to get regular updates on your news feed.
Shame on you, R... again! (But not really...)
Remember how a few months ago I lamented the fact that the round() function in R uses a non-standard rule for rounding to the nearest integer? Instead of rounding k+0.5 to k+1 (k being an integer) R rounds to whichever integer k or k+1 is even. Well here's another example of R offending our mathematical sensibilities... R seems to think that even though
"Gasp!" I know, insane, right? What's going on here? Whatever happened to "anything times one is equal to that same number"? Granted, infinity isn't really a number so sometimes we can't assign a value to an expression like Inf*0, but deep down inside I can't shake the feeling that 1 * Inf really should be Inf!
It turns out that R and I are both right - we're just making different assumptions about how we interpret all these 1s, 0s and Infs in these two statements. Let me explain...
Despite using sound, puppy-approved logic in this case, R gives the offending result because of how it implements everyone's favorite section in Calculus class: computing limits. To understand why, take a closer look at how the multiplication is happening in each case above. The first case is hopefully straightforward. In the second case 1 is treated as a complex number instead of a scalar which gives
We could also throw in a third case and multiply these two complex numbers in the more natural context of polar coordinates. Writing each in terms of their modulus r (distance from the origin) and argument θ (angle off of the positive real axis) instead of in terms of their real and imaginary parts, we have
R recognizes that any computations involving infinity really require the algebra of limits, and acts appropriately (albeit conservatively) to evaluate such expressions. This discord then comes from what R assumes is the result of taking some limit and what is to be treated as a constant. Unless you've taught a calculus class recently some explanation might be in order.
In general, expressions involving infinity are treated as limits where some unspecified variable is going to infinity: For example, statements like Inf*0 can't be assigned a value because in it's most general interpretation we're asking "What is the limit of the product of x*y as x→Inf and y→0?" Here, whether y goes to 0 from above (e.g. y=1/x) or below (y=-1/x) or neither will determine where the limit of the product goes to zero, some non-zero number, plus or minus infinity, or will have no limit at all. (Open any calculus text to the sections on limits for examples leading to these different outcomes). Note this example does have an answer if y is always assumed to be 0, since it's always the case that x*0=0.
That means that, depending on how we interepret the zero, our example might equal either
Returning to the two statements at the top of this post, we can now understand why R gives these two different answers. By making the zero implicit vs. explicit R treats these expressions differently. R interprets Inf as "the limit of x + 0i as x→Inf," allowing for the result that
The take-home message: as soon as there's an Inf in an expression, R proceeds assuming everything is a limit, even though it might be clear to the user that some of those key 1s and 0s should be treated as constants.
1 * Inf = Inf
somehow it can get away with telling us that1 * (Inf + 0i) = Inf + NaNi?
"Gasp!" I know, insane, right? What's going on here? Whatever happened to "anything times one is equal to that same number"? Granted, infinity isn't really a number so sometimes we can't assign a value to an expression like Inf*0, but deep down inside I can't shake the feeling that 1 * Inf really should be Inf!
It turns out that R and I are both right - we're just making different assumptions about how we interpret all these 1s, 0s and Infs in these two statements. Let me explain...
Despite using sound, puppy-approved logic in this case, R gives the offending result because of how it implements everyone's favorite section in Calculus class: computing limits. To understand why, take a closer look at how the multiplication is happening in each case above. The first case is hopefully straightforward. In the second case 1 is treated as a complex number instead of a scalar which gives
1*(Inf+0i) = (1+0i)*(Inf+0i) =
= Inf + (0*Inf+0)i = Inf + NaNi
We could also throw in a third case and multiply these two complex numbers in the more natural context of polar coordinates. Writing each in terms of their modulus r (distance from the origin) and argument θ (angle off of the positive real axis) instead of in terms of their real and imaginary parts, we have
1*(Inf+0i) = (1+0i)*(Inf+0i)
= 1exp(i0)* Inf exp(i0)
= (1*Inf) exp (i0)
= Inf exp(i0)
= Inf + 0i
Whew! So what's "wrong" with multiplying things in x+yi form??R recognizes that any computations involving infinity really require the algebra of limits, and acts appropriately (albeit conservatively) to evaluate such expressions. This discord then comes from what R assumes is the result of taking some limit and what is to be treated as a constant. Unless you've taught a calculus class recently some explanation might be in order.
In general, expressions involving infinity are treated as limits where some unspecified variable is going to infinity: For example, statements like Inf*0 can't be assigned a value because in it's most general interpretation we're asking "What is the limit of the product of x*y as x→Inf and y→0?" Here, whether y goes to 0 from above (e.g. y=1/x) or below (y=-1/x) or neither will determine where the limit of the product goes to zero, some non-zero number, plus or minus infinity, or will have no limit at all. (Open any calculus text to the sections on limits for examples leading to these different outcomes). Note this example does have an answer if y is always assumed to be 0, since it's always the case that x*0=0.
That means that, depending on how we interepret the zero, our example might equal either
Inf*0=NaN
Inf*0=0
This is exactly what's going on above.Returning to the two statements at the top of this post, we can now understand why R gives these two different answers. By making the zero implicit vs. explicit R treats these expressions differently. R interprets Inf as "the limit of x + 0i as x→Inf," allowing for the result that
1 * Inf = Inf
whereas in the second case R treats Inf + 0i as "the limit of x + yi as x → Inf and y → 0" which has no general answer and therefore gets assigned a value of NaN.The take-home message: as soon as there's an Inf in an expression, R proceeds assuming everything is a limit, even though it might be clear to the user that some of those key 1s and 0s should be treated as constants.
Data Visualization in R: Part... 0
I haven't forgotten that I promised to do a series of posts on data visualization using R - just a bit busy catching up after some excellent holiday R&R. Hopefully I'll get a post out soon!
In the mean time, check out these two posts from the R-bloggers network.
In the mean time, check out these two posts from the R-bloggers network.
Data Visualization: 200 Years of Health and Wealth
By
Paul
on
Wednesday, December 15, 2010 at 10:48 PM
Labels: educational, entertainment, math/science computation, R, science basics, science literacy
Labels: educational, entertainment, math/science computation, R, science basics, science literacy
This video is super awesome! It's part of BBC 4's program The Joy of Stats and you can learn a little more about the data here or play with it using this web app on http://www.gapminder.org/. Now don't you wish you could do that with data?
The reason I wanted to share this video (beyond the fact that it's so amazingly awesome) is to let you in on a little secret... are you ready? Here it comes...
Seriously, it is not that hard! YOU can make cool little wobbling bubble graphs just like in the video! Aren't you excited to learn how?! Yeah? Fantastic!
Now that you're all psyched to visualize some data, I should mention that I am being a bit misleading here... because it does require a bit of computer know-how, and sometimes (ok, almost always) takes a bit of tinkering with the data to find the best ways of boiling down to just the relevant information. But frankly, these things aren't all that hard to learn and aren't always necessary if we're just poking around to get a feel for the data, so none of these words of caution should give you much pause. Add to that the fact you can always hit up the internet for examples todownload and use study and learn from and many of these obstacles are reduced to mere speed bumps. If you've got a computer, we can get it to plot some data.
So here's the deal... there are some really cool data available from http://www.gapminder.org/, and I'm going to have a little free time these next few weeks in between birding trips, visiting family and friends, and doing thesis work. Assuming that free time stays free, I'm going to walk through an example or two of plotting some of this data in R. If you'd like to follow along, you'll need to download and install R on your computer, and if you don't already have software that can open excel spreadsheets, you'll also want to install something (free) like OpenOffice.
Sound good? Excellent! Feel free to share any questions or suggestions in the comments section below. Now hurry along and go install R!
The reason I wanted to share this video (beyond the fact that it's so amazingly awesome) is to let you in on a little secret... are you ready? Here it comes...
Data visualization is easy, and anyone with a computer can do it!
Now that you're all psyched to visualize some data, I should mention that I am being a bit misleading here... because it does require a bit of computer know-how, and sometimes (ok, almost always) takes a bit of tinkering with the data to find the best ways of boiling down to just the relevant information. But frankly, these things aren't all that hard to learn and aren't always necessary if we're just poking around to get a feel for the data, so none of these words of caution should give you much pause. Add to that the fact you can always hit up the internet for examples to
Figure 1. Tourist hot spots based on Flickr data. #1 of flowingdata's Top Ten Data Visualization Projects of 2010.
So here's the deal... there are some really cool data available from http://www.gapminder.org/, and I'm going to have a little free time these next few weeks in between birding trips, visiting family and friends, and doing thesis work. Assuming that free time stays free, I'm going to walk through an example or two of plotting some of this data in R. If you'd like to follow along, you'll need to download and install R on your computer, and if you don't already have software that can open excel spreadsheets, you'll also want to install something (free) like OpenOffice.
Sound good? Excellent! Feel free to share any questions or suggestions in the comments section below. Now hurry along and go install R!
Subscribe to:
Posts (Atom)