≡ Menu

If you like dancing…

How about hand-dancing? Don’t know what I’m talking about? Watch the following, it’ll brighten your day:

{ 0 comments }
Physics
Image via Wikipedia

Physics graduate students at UCSD (and many other schools) have to pass a PhD qualifying exam. At UCSD, this exam is taken across 2 days. Taking and preparing for that exam (called The Qual) is often a stressful time of life.

One of the most useful ways to study for the Qual is to work through old qualifying exams. Graduate students have had access to the tests and the solutions stretching back to 1987. The tests are offered twice a year, so there are a fair number of questions to be solved out there. I have organized PDFs of each of the exams and what solutions can be found from the past Quals, but I was hoping to make the information more accessible and more useful.

The problems on the Qual are organized into several different categories. The first category is Undergraduate or Graduate problems. (The first day of the exam is Undergraduate, the second day is Graduate). Within those categories there are several subjects that are tested: Mechanics, Electricity & Magnetism, Statistical Mechanics, Quantum Mechanics, Mathematical Methods, and Miscellaneous. Other identifying features: Year, Season, and Problem number. So, for example.

2006 Spring #13

Graduate
Electricity & Magnetism

Problem: An electron is incident with impact parameter \rho and speed v_0 on a proton at rest. Calculate the energy radiated during the collision assuming the ordering

\displaystyle  \frac{e^2}{\rho} \ll mv^2_o \ll mc^2

Hint: this simplifies the orbit approximation.

Solution:

\displaystyle  F=ma=\frac{e^2}{r^2}
\displaystyle  \left | \vec{a}\right |=\frac{e^2}{mr^2}\\
\displaystyle  \left | \vec{a}\right |^2=\frac{e^4}{m^2r^4}\\
\displaystyle  \ddot{\vec{p}}=e\ddot{\vec{r}}
\displaystyle  \vec{a}=\ddot{\vec{r}}
\displaystyle  P=\frac{2}{3}\frac{\left(\ddot{\vec{p}}\right)^2}{c^3}

\displaystyle  P=\frac{2}{3}\frac{e^2}{c^3}\left | \vec{a}\right |^2=\frac{2}{3}\frac{e^6}{m^2r^4c^3}

Energy radiated is \displaystyle \int P \,dt

\displaystyle  r^2=\rho^2+\left(v_o t\right)^2

Since
\displaystyle  mv_o^2 \gg \frac{e^2}{\rho^2}
\displaystyle  E=\frac{2}{3}\frac{e^6}{m^2c^3}\int_{- \infty  }^{  \infty }  \frac{1}{\left (\rho^2+\left (v_o t \right )^2\right)^2}\,dt
\displaystyle  E=\frac{2}{3}\frac{e^6}{m^2c^3}\frac{1}{v_o\rho^4}\underbrace{\int_{- \infty  }^{  \infty }  \frac{1}{\left (1+x^2\right)^2}\,dx}_{\frac{\pi}{2}}

Now, I think it would be very useful to be able to store the problem and solution and all the identifying pieces of information in a database in some way so that the following types of actions could be done.

  • Search and return all Electricity & Magnetism problems.
  • Search and return all graduate Statistical Mechanics problems.
  • Create a random qualifying exam — meaning a new 20 question test randomly picking 2 Undergrad mechanics problems, 2 Undergrade E&M problems, etc. from past qualifying exams (over some restricted date range).
  • Have the option to hide or display the solutions on results.

Any suggestions or comments on how best to do this project would be greatly appreciated!

Enhanced by Zemanta
{ 2 comments }

Dumb things Sometimes get Published and Cited a Bunch

Trapezoidal rule illustration
Image via Wikipedia

The world of peer-reviewed journal publishing can be a tough place. Reviewers can delay and reject even the best papers.

Occasionally, it’s the opposite.

My friend shared a link to a journal article abstract that he came across the other day. Apparently, it derives a basic calculus concept — that’s it.

The article is titled, “A mathematical model for the determination of total area under glucose tolerance and other metabolic curves” by M M Tai, and is published in the American Diabetes Association‘s peer reviewed journal Diabetes Care. Lest you think this is some slacker journal, “The impact factor of the journal is 7.349 (2008), ranking fifth in the field of Endocrinology/Metabolism out of 93 journals” (wikipedia).

I recommend reading the abstract here as the formatting is nicer. A few highlights are as follows:

In Tai’s Model, the total area under a curve is computed by dividing the area under the curve between two designated values on the X-axis (abscissas) into small segments (rectangles and triangles) whose areas can be accurately calculated from their respective geometrical formulas.

Other formulas widely applied by researchers under- or overestimated total area under a metabolic curve by a great margin.

It has been cited 137 times!

Before you even learn what integration is, you are forced to draw graphs and to shade in rectangles to find the area under curves. This is generally called something descriptive like the Rectangle Method. Eventually, you get to the Trapezoidal rule — which sounds like what Tai’s describing in his paper almost exactly.

Biggest concern: what methods are researchers widely using that incorrectly estimate the area under a curve by a great margin? I could not come up with a simpler/dumber method than what Tai’s proposing to calculate the area under the curve — except maybe “by just guessing”. I guess it’s possible that this paper did need to be written and published, but that makes me sadder about the fate of humanity than the scenario where this paper just slipped through the cracks.

Even if you invent a method that’s new and useful, are you allowed to name it after yourself in the same paper?

Shake your head and marvel.

Enhanced by Zemanta
{ 0 comments }

My First Half-Marathon

Zabriskie Point at sunrise in Death Valley
Image via Wikipedia

I signed up for the Death Valley Borax Half Marathon this week. It sounds bad-ass to run in Death Valley, but the race takes place in February (9 weeks from now), so it won’t be hot. If you want to join me feel free to register for it here.

I’ve been running with my new Garmin Forerunner 305 — and I love it. It had crazy-good reviews on the Amazon page, and so I went ahead with it. Interestingly, the 305 had better reviews than the 405 — apparently they went with a touchscreen on the newer model that doesn’t work as well as the buttons of the older model.

Enhanced by Zemanta
{ 0 comments }

South Park makes me really happy sometimes

I’ve embedded a YouTube playlist that will play two videos back to back. I promise it’s worth it to fully watch both videos.

Enjoy. (Total running time: under 4 minutes).

{ 0 comments }

Birthrate by Month

I was in a discussion about horoscopes and how they’re wrong, when a possibly crazy claim came up: most people are born in one half of the year instead of another.

Because it’s trivially true if all you need is 50% + 1 to make it “most” — I pressed the guy making the claim for some numbers behind it. He claimed that the six months that has the highest birthrate had 10% more people born than the six months that has the lowest birthrate. This sounded way too large, so we made a $20 bet.

Turns out it is simple to find the month that most people are born in — but getting month-by-month data was kinda tricky. You can find 1995-2002 data for the US birthrate by month here.

I’ve embedded the analysis below — turns out it was a closer bet than I was expecting.

Turns out there’s roughly a 6% difference between the most … birthy half of the year relative to the least birthy half of the year. If birthy isn’t a word, I’m inventing it now. I would have guess about half of the real answer.

{ 5 comments }

Monty Hall Bet Monte Carlo — Play at home!

If you caught my last post about the back and forth I’ve had with YouTube user “adolthitler”, you know the situation.

If not, there’s a person who is wrong on the Monty Hall problem, and refuses to be corrected — so I tried to make a bet with the guy with terms that would make him money if his misunderstanding of the problem were correct, and would make me money if my understanding of the problem were correct.

adolthitler responded:

@jbwhitmore LOL you can afford to throw your money away? Give it to charity.

Sigh. I’ll press him to put up money, but in a show of my outrageous generosity, I’ve decided to release to everyone (including adolthitler) a program that I wrote that can be used to test what the outcome of the bet will be.

I wrote up some python code and posted the source code here — feel free to download and play along at home.

The Bet

Using a random number generator to determine which door holds the prize.

Step 1: We always choose the same door to start with — let’s just say we choose Door 1 every time.
Step 2: One goat is revealed (from behind Door 2 or 3).
— I am forced to always switch to the other closed door.
— adolthitler is forced to always stays with Door 1.
Step 3: Whoever ends up picking the right door gets paid by the other person. (The going rate is $1.08 that I would have to adolthitler; and $1.00 that adolthitler would pay me).

The hypothetical Results

Curious what the outcome of running this bet for 10,000,000 rounds?

SwitchBet is $1.08
StayBet is $1.00
Total Number of Doors: 3
Total Number of Rounds: 10000000
Staying Percent Wins: 33.34 %
Switching Percent Wins: 66.66 %

adolthitler nets: -$3,065,980.96
jbwhitmore nets: $3,065,980.96

adolthitler — if you want to just run this program on your home computer, and every 1000 rounds or so send me a check, I’ll be happy to take your money until you give up. I’ll also accept your pride.

Enhanced by Zemanta
{ 0 comments }

Making Money with Monty Hall

There’s a fun and notorious probability problem known as the Monty Hall problem. It’s notorious for tons of reasons. The setup is simple.

You’re on a game show and are presented with three closed doors; a prize behind 1 of the doors; non-prizes behind 2 of the doors. Usually it’s something like, a car behind one of the doors and a goat behind each of the other doors.

The rules of the situation are that once you choose a door, one of the goat-doors from the remaining doors will be revealed. After the reveal, you are allowed to switch your choice, or keep it the same.

Assuming you want the prize, what strategy should you adopt? Should you stay or should you switch?

Turns out, you should switch. You have a 2/3 chance of getting the prize over the long run by switching, while a 1/3 chance of getting the prize if you stay.

It’s a notorious problem because most people — especially somewhat math-inclined people — are generally tempted to reject the answer. They will insist that the odds are 50-50.

There’s a YouTube video that mentions the Monty Hall problem, and the correct solution. A person left a comment saying that the real odds are 50-50 — and confronted with the possibility that someone is wrong on the internet — I engaged with YouTube user: adolthitler.

I tried several ways to explain the reasoning behind the correct answer, and after a lot of back and forth, the last volley is (currently)

jbwhitmore (me) writes:

@adolthitler I don’t forget that the door is removed — and it isn’t just removed, it’s revealed — and that is crucial to why a person should switch.

(a) If you happened to have picked a door with a goat, when the only other goat in the situation is revealed, you are guaranteed to win the car IF YOU SWITCH.

(b) And since you agree that 2/3 of the time you will pick the door with a goat, it follows by necessity that switching will win you the car 2/3 of the time.

It’s not opinion, it’s math.

adolthitler (other guy) writes:

@jbwhitmore its opinioinated math. There are two doors left. NOT THREE. Its now 50% chnace the car is behind door 1, and 50% its behind door 3, thats simple math.

Who cares when you made the choice? It does not affect the outcome.

You have fallen prey to a fallacy. Count the doors before you switch. 2 doors, and there is nothing magical making one more likely. Its simple logic. Your maths works fine, your logic is shit.

2/3 of the time you chose a door with a goat, and 1 goat is revealed, so its now 1/2 times you chose a goat. Got it you removed one door, you did not alter your math. Redo the math based on the current situation, not the historical situation.

2 doors, not three the removed door boosts your choice just as much as the alternate door.

Right, so adolthitler is both wrong and impervious to being corrected — and publicly proclaiming that he’s correct at my expense. The way I generally deal with these situations in real life is to make a bet with the person. That way, even if he won’t change his mind, he’ll get punished monetarily for holding false and uncorrectable beliefs, and I’ll benefit. It’s win-win as far as I’m concerned.

The conundrum was — how do I set the terms of the bet in such a way that I can actually make the bet and win?

Here’s part of what I’ve come up with — since adolthitler resolutely thinks that the odds are 50-50 whether you switch or stay with your first choice, and I resolutely think that the odds are 66-33 for switching — we could pay each other depending on whose strategy wins.

Every time staying wins — I’d pay adolthitler $1.08.
Every time switching wins — adolthitler would pay me $1.00.

That’s an 8% payout difference on what adolthitler thinks is a 50-50 outcome, and if he’s got conviction he should really want to take this bet — and to play as many times as possible.

How the Bet is Set Up

Using a random number generator to determine which door holds the prize. (Here is a way to choose one number from [1,2,3] randomly a thousand times).

Step 1: We always choose the same door to start with — let’s just say we choose Door 1 every time.
Step 2: One goat is revealed (from behind Door 2 or 3).
I am forced to always switch to the other closed door.
adolthitler is forced to always stays with Door 1.
Step 3: Whoever ends up picking the right door gets paid by the other person. (The going rate is $1.08 that I would have to adolthitler; and $1.00 that adolthitler would pay me).

Here’s how the first 10 rounds would play out by picking the first 10 random prize placements:

Round 1
Prize is behind Door 2
Step 1: We both choose Door 1
Step 2: Door 3 is revealed to hold the other goat (this is forced)
Step 3: I am forced to switch to Door 2 (this forces me to win)

Result: I win $1.00 (My total: +$1.00)

Round 2
Prize is behind Door 3
Step 1: We both choose Door 1
Step 2: Door 2 is revealed to hold the other goat (this is forced)
Step 3: I am forced to switch to Door 3 (this forces me to win)

Result: I win $1.00 (My total: +$2.00)

Round 3
Prize is behind Door 1
Step 1: We both choose Door 1
Step 2: Door 2 or 3 is revealed to hold a different goat (choice)
Step 3: I am forced to switch to either 2 or 3 (this forces me to lose)

Result: I lose $1.08 (My total: +$0.92)

Round 4
Prize is behind Door 2
Step 1: We both choose Door 1
Step 2: Door 3 is revealed to hold the other goat (this is forced)
Step 3: I am forced to switch to Door 2 (this forces me to win)

Result: I win $1.00 (My total: +$1.92)

Round 5
Prize is behind Door 3
Step 1: We both choose Door 1
Step 2: Door 2 is revealed to hold the other goat (this is forced)
Step 3: I am forced to switch to Door 3 (this forces me to win)

Result: I win $1.00 (My total: +$2.92)

Round 6
Prize is behind Door 1
Step 1: We both choose Door 1
Step 2: Door 2 or 3 is revealed to hold a different goat (choice)
Step 3: I am forced to switch to either 2 or 3 (this forces me to lose)

Result: I lose $1.08 (My total: +$1.84)

Round 7
Prize is behind Door 3
Step 1: We both choose Door 1
Step 2: Door 2 is revealed to hold the other goat (this is forced)
Step 3: I am forced to switch to Door 3 (this forces me to win)

Result: I win $1.00 (My total: +$2.84)

Round 8
Prize is behind Door 1
Step 1: We both choose Door 1
Step 2: Door 2 or 3 is revealed to hold a different goat (choice)
Step 3: I am forced to switch to either 2 or 3 (this forces me to lose)

Result: I lose $1.08 (My total: +$1.76)

Round 9
Prize is behind Door 3
Step 1: We both choose Door 1
Step 2: Door 2 is revealed to hold the other goat (this is forced)
Step 3: I am forced to switch to Door 3 (this forces me to win)

Result: I win $1.00 (My total: +$2.76)

Round 10
Prize is behind Door 1
Step 1: We both choose Door 1
Step 2: Door 2 or 3 is revealed to hold a different goat (choice)
Step 3: I am forced to switch to either 2 or 3 (this forces me to lose)

Result: I lose $1.08 (My total: +$1.68)

How many rounds would you like to play? A thousand? A million? Ten million? I’ll play until someone goes bankrupt.

Side-bet to any interested readers: How long before adolthitler gives up?

{ 9 comments }

Show Hidden Files on a Mac

How to show hidden files on a Mac:

Terminal:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

The killall command kills and refreshes all open Finder windows.

If you would like to turn it back off:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
{ 0 comments }

Using OpenID with Gmail and Google Accounts

The URL that is needed is: https://www.google.com/accounts/o8/id — and it’s the same for everyone who has a Google account. So when they ask for your OpenID, just copy and paste that URL. (It may send you to Google to verify that you want that site to be able to log you in).

{ 0 comments }