Category Archives: General

Another interesting question of probability…

I was reading Kraitchik’s Mathematical Recreations book (a very nice little Dover volume) and ran across this interesting puzzle on pg. 140:

21, A man stakes 1/m of his fortune on each play of a game whose probability is 1/2. He tries again and again, each time staking 1/m of what he possesses. After 2n games, he has won n times, and lost n times. What is his result?

This isn’t very hard to analyze. Let’s assume that n = 1 to try to gain some insight. There are two ways we can win 1 and lose 1 game, but both end up with the same: (1 – 1/m2) times our original stake. A tiny bit more head scratching will (maybe) convince you that for n > 1, we get (1 – (1/m2))n. It should be obvious that both of these expressions are strictly less than one (you lose money, and the greater the fraction you bet, the quicker you lose). The only way to preserve your bankroll in this game, well, not to play it.

There are a couple of interesting things about this puzzle which Kraitchik didn’t elaborate, but which I think are interesting.

Somewhat trivially, the payout of this puzzle actually doesn’t depend at all on what the probability of winning an individual round is. When the game is fair (probability of winning is 1/2) then the most likely outcome (although as n gets larger, an increasingly unlikely one) is for an even number of wins and losses to occur. In some sense, this outcome is the “fairest” of all fair outcomes: it is the most likely to occur, you bet a constant fraction of your total bankroll, and you get the fairest outcome: the same number of heads and tails. And yet, you lose money every time. Guaranteed.

This obviously has something to do with fractional betting. If, instead of betting a fraction of your total bankroll, you instead bet a constant amount (say 1 unit), then after n losses and n wins, you’d be even.

Ponder it some more.

Addendum: Think of this another way. Consider this game to be a drunkards walk, where you win and lose with equal probability. Each step, you wager a fraction of your bankroll, and if you win, collect your money and take a step to the right. If you lose, you pay out and take a step to the left. You can read more about random walks here on Wikipedia. In these one dimensional random walks, you will cross the start point (and in fact any other point as well) an infinite number of times as you repeatedly play the game. And yet, every time you pass your start point, you will have won and lost the same number of games, and you will always be behind. Similarly, no matter what you bankroll, if you bet a constant amount, you will always be ruined playing a fair game if you play long enough.

These results are counter to many of the intuitions that we have about gambling, where one might imagine that in a “fair” game, if we have a large enough stake we might think we could play forever.

Anyway, just fun to think about.

Kelly most famously studied fractional betting systems. They hold a few surprises.

Cheap Arduino Wireless Communications

As part of my slow, arduous march toward doing a high altitude balloon launch, I acquired some super cheap wireless modules from sparkfun.com. Sadly, I haven’t had time to play with them much, but here’s someone who has. I am more interested in using these tiny transmitters as back up beacons, but the information is still quite useful.

Hobby Robotics » Cheap Arduino Wireless Communications.

Micro-Rendering for Scalable, Parallel Final Gathering

Thanks to Kevin Bjorke for pointing out this paper. It combines a couple of interesting features to create a point-based renderer that efficiently uses the GPU to render scenes with global illumination. I’ll have to read it more carefully when I have time.

Micro-Rendering for Scalable, Parallel Final Gathering.


httpv://www.youtube.com/watch?v=Z9u8EdFbmiI

A little statistics puzzle…

I hand you a deck of cards, which you shuffle, and deal me a random 5 card poker hand. I announce that I have an ace in my hand. What are the odds that I have a second ace in my hand?

Now, play the game, and deal me another hand. I announce that I have the ace of spades in my hand. Now, what are the odds that I have a second ace in my hand?

Explain.

Addendum: This is known as the “paradox of the second ace”. It is usually expressed as a bridge problem, with 13 card hands, but I misremembered it, so here it is a poker problem. Solve the bridge problem if you like.

Addendum2: The paradox is easier to understand if you limit the size of hands (say to two cards) and the number of suits.

Another HTML 5 video test…

This is just a test. If you are running Firefox 3.5, you should get a video window that allows you to watch a Superman cartoon encoded in Ogg Theora. If you aren’t running it, but have a Java enabled browser, you should get an applet which plays the same video. If you have neither, you should get a message lamenting your condition.



P.S. I haven’t verified that Java playback works. Safari on my Macbook tries to load the Theora video, but appears to fail (Safari appears to only support h264 encoded video, retarded).

Addendum: Ah, it does work on Safari, but only if you install these Quicktime components. Kind of annoying, but it’s nice to see that it does work.

Addendum2: Shifted the clip to be one I made of my betta fish. It’s shorter, and will thrash my server less.

More volume rendering…

Well, I thought I had the rotation thing figured out, but I still seem to be missing something. But I did muck around a little bit, thresholding the image in a couple of different ways, making the pair shown below. The one on the left contains mostly the bones, with all the flesh transparent. The one on the right, the exact opposite, with the bones removed and the remaining flesh showing up. I thought they made an interesting pair.

both

WSPR signals heard from E51EME

I still check my WSPR station logs each morning when I wake up. This morning I spotted the callsign E51EME, coming from grid square BG08. I’ve come to realize that many of these spots which include only a four element grid designator are spurious bad decodes, and I didn’t recognize the prefix (I’m not much of a DX-er). But still, it decoded multiple times:

Timestamp Call MHz SNR Drift Grid Pwr Reporter RGrid km az
 2009-08-12 12:16   E51EME   10.140137   -22   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 11:44   E51EME   10.140136   -20   -1   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 11:32   E51EME   10.140137   -18   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 11:24   E51EME   10.140136   -17   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 11:14   E51EME   10.140137   -15   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 11:06   E51EME   10.140135   -12   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 10:56   E51EME   10.140137   -12   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 10:44   E51EME   10.140135   -10   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 10:32   E51EME   10.140137   -11   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 10:12   E51EME   10.140137   -11   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 10:04   E51EME   10.140136   -14   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 09:56   E51EME   10.140137   -17   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 09:44   E51EME   10.140136   -18   -1   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 09:34   E51EME   10.140137   -18   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 09:24   E51EME   10.140136   -20   -1   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 09:16   E51EME   10.140137   -19   0   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 09:04   E51EME   10.140136   -19   -1   BG08   5   K6HX   CM87ux   7649   30 
 2009-08-12 08:52   E51EME   10.140136   -19   0   BG08   5   K6HX   CM87ux   7649   30 

A quick trip to QRZ.com verified that this was indeed a real call, Bob Sutton from Raratonga, in the Cook Islands. Very cool.

E51EME in Raratonga, the Cook Islands

E51EME in Raratonga, the Cook Islands

Project Mark begins anew…

Well, I’m suffering from a feeling of deja-vu: recent doctor visits indicate that my weight has crept back up (no surprise) and that my BP and cholesterol aren’t doing much better either. I could make excuses about the surgery I had earlier in the year or whatever, but the reality is, that I’m back to just about the level that I was back in early 2004. Back then, it took me four months or so to drop 35 pounds, which I did mostly by using Weight Watchers and trying to increase my exercise a bit. For the near future, I’ll be taking a few hints from their play book, and religiously logging all the food as well as my weight, and we’ll see how it goes. If it doesn’t work very well, or if I get frustrated, then perhaps it’ll be back to WW for me.

The Water-Culture Method for Growing Plants without Soil

I’ve been doing a bit more reading about growing plants hydroponically. In doing so, I found reference to something called “Hoagland solutions”, which are nutrient solutions used for growing plants hydroponically. Since hydroponically grown plants don’t get nutrients from trace elements in the organic matter in soil, you need to be especially careful to ensure that plants get adequate nutrition, and Hoagland and Arnon well apparently one of the first to document solutions that work. In digging up references, I found this PDF of their 1950 work on the subject. It’s very interesting, if somewhat harsh in debugging myths about hydroponics. They also document a bunch of nutrient solutions that one can use to study mineral difficiencies of various types, each one lacking some essential nutrient. Anyway, it’s very interesting, so I stashed it on Google Docs, and if you chase the link below, you can see (or share) a copy of the document.

The Water-Culture Method for Growing Plants without Soil, by Hoagland and Arnon

President Obama declares July 21st National Brainwagon Day

Okay, not really, but on this day in 2002, I did start this blog. Since then, I’ve made 3,106 posts, and there have been 5,461 comments. I’ve gone through two different hosting services, as well as hosting this on my own web server. And I’ve had a great time. I’ve gone through several different phases, some where I’ve talked about science, or space, or amateur radio, or web technology, or programming checkers games, or cryptography. I hope some of it has been fun for you. It has been for me.