Archive for July, 2010

Q: If gravity is the reaction matter has on space, in that it warps space, why do physicist’s look for a gravity particle? Wouldn’t gravity be just a bi-product of what matter does to space?

Saturday, July 31st, 2010

Physicist: Isn’t that weird?

The name “quantum mechanics” comes from the fact that, at its most base, quantum mechanics requires all particles and energies to come in discrete (one might say “quantized”) packets.  At some point a bunch of physicists starting asking awkward questions like; the matter is quantized, the energy is exchanged in quantized packets, so why do we assume the force is smooth and continuous?

Compounding this awkward line of questioning was the fact that photons were already known to carry electromagnetic force.  Literally, photons are little oscillating bits of electric and magnetic fields, which is exactly what the electric and magnetic forces are.  So the next obvious question was “do the other forces have ‘force carriers‘?”

You’re damn right they do.  Photons for electromagnetism, W and Z bosons for the nuclear weak force, and gluons for the nuclear strong force.  There’s every force but gravity!  Each of carriers were predicted by the (then new) study of “quantum field theory”, and have since been observed.  The theory itself is gorgeous and works beautifully.  In fact, it barely makes sense to think of anything in the universe (including space) as not being quantized.

So, some physicists are looking for evidence of the existence of gravitons (the gravity particle), because it would really tie things together nicely.  There are a couple drawbacks however…  In order for something to be detected it has to do something.  Gravity is a really, really weak force, and a graviton is the smallest amount of that force that can exist.  Most physicists have already given up any hope of detecting the graviton directly, and instead are looking at extremely indirect methods.  The drawback there is that the graviton (if it exists, and if our theories hold up) is a very strange particle, and is described using amazingly nasty math (even more nasty than the normally nasty math of quantum field theory).  So it’s difficult to even figure out what those indirect methods should be.

To actually answer the question: some physicists are looking for the graviton because it “fits”.

Q: Is it possible to beat the laws of physics?

Monday, July 26th, 2010

Physicist: No…
But to be fair, when a physical law is beaten it stops being a law.

Q: What’s the chance of getting a run of K or more successes (heads) in a row in N Bernoulli trials (coin flips)? Why use approximations when the exact answer is known?

Saturday, July 24th, 2010

The original question was: Recently I’ve come across a task to calculate the probability that a run of at least K successes occurs in a series of N (K≤N) Bernoulli trials (weighted coin flips), i.e. “what’s the probability that in 50 coin tosses one has a streak of 20 heads?”. This turned out to be a very difficult question and the best answer I found was a couple of approximations.

So my question to a mathematician is: “Why is this task so difficult compared e.g. to finding the probability of getting 20 heads in 50 coin tosses solved easily using binomial formula? How is this task in fact solved – is there an exact analytic solution? What are the main (preferably simplest) approximations and why are they used instead of an analytic solution?”

Physicist: What follows was not obvious. It was the result of several false starts. It’s impressive in the same sense that a dude with seriously bruised legs, who can find anything in his house with the lights off, is also impressive. If you’re looking for the discussion of the gross philosophy, and not the detailed math, skip down to where you find the word “Jabberwocky” in bold. If you want specific answers for fixed, small numbers of coins, or you want sample computer code for calculating the answer, go to the bottom of the article.

The short answer: the probability, S, of getting K or more heads in a row in N independent attempts (where p is the probability of heads and q=1-p is the probability of tails) is:

S(N,K) = p^K\sum_{T=0}^\infty {N-(T+1)K\choose T}(-qp^K)^T-\sum_{T=1}^\infty {N-TK\choose T}(-qp^K)^T

Note that here {A\choose B} is the choose function (also called the binomial coefficients) and we are applying a non-standard convention that {A\choose B}= 0 for A < B which makes the seemingly infinite sums always have only a finite number of terms. In fact, for N and K fixed, the answer is a polynomial with respect to the variable p.

Originally this was a pure math question that didn’t seem interesting to a larger audience, but we both worked for long enough on it that it seems a shame to let it go to waste. Plus, it gives me a chance to show how sloppy (physics type) mathematics is better than exact (math type) mathematics.

Define {Xi}j as the list of results of the first j trials. e.g., if j=4, then {Xi}j might be “{Xi}4=HTHH” or “{Xi}4=TTTH” or something like that, where H=heads and T=tails. In the second case, X1=T, X2=T, X3=T, and X4=H.

Define “Ej” as the event that there is a run of K successes (heads) in the first j trials. The question boils down to finding P(EN).

Define “Aj” as the event that the last K terms of {Xi}j are T followed by K-1 H’s ({Xi}j = X1X2X3X4…THHH…HHH). That is to say, if the next coin (Xj+1) is heads, then you’ve got a run of K.

Finally, define p = P(H) and q = P(T) = 1-p. Keep in mind that a “bar” over an event means “not”. So “\overline{H}=T” reads “not heads equals tails”

The probability of an event is the sum of the probabilities of the different (disjoint) ways that event can happen. So:

\begin{array}{ll}&P(E_{j+1})\\i)&=P(E_{j+1}\cap E_j\cap A_j)+P(E_{j+1}\cap E_j\cap \overline{A_j})+P(E_{j+1}\cap \overline{E_j}\cap A_j)+P(E_{j+1}\cap \overline{E_j}\cap \overline{A_j})\\ii)&=\left[P(E_{j+1}\cap E_j\cap A_j)+P(E_{j+1}\cap E_j\cap \overline{A_j})\right]+P(E_{j+1}\cap \overline{E_j}\cap A_j)+P(E_{j+1}\cap \overline{E_j}\cap \overline{A_j})\\iii)&=\left[P(E_{j+1}\cap E_j)\right]+P(E_{j+1}\cap \overline{E_j}\cap A_j)+P(E_{j+1}\cap \overline{E_j}\cap \overline{A_j})\\iv)&=P(E_j)+P(E_{j+1}\cap \overline{E_j}\cap A_j)+P(E_{j+1}\cap \overline{E_j}\cap \overline{A_j})\\v)&=P(E_j)+P(E_{j+1}\cap \overline{E_j}\cap A_j)+0\\vi)&=P(E_j)+P(E_{j+1}|\overline{E_j}\cap A_j)P(\overline{E_j}\cap A_j)\\vii)&=P(E_j)+pP(\overline{E_j}\cap A_j)\\viii)&=P(E_j)+pP(\overline{E_j}| A_j)P(A_j)\\ix)&=P(E_j)+pP(\overline{E_j}| A_j)qp^{K-1}\\x)&=P(E_j)+qp^KP(\overline{E_{j-k}})\\xi)&=P(E_j)+qp^K\left[1-P(E_{j-k})\right]\\xii)&=P(E_j)+qp^K-qp^KP(E_{j-k})\end{array}

iv) comes from the fact that E_j \subset E_{j+1}. If you have a run of K heads in the first j trials, of course you’ll have a run in the first j+1 trials. v) The zero comes from the fact that if the first j terms don’t have a run of K heads and the last K-1 terms are not all heads, then it doesn’t matter what the j+1 coin is, you can’t have a run of K heads (you can’t have the event Ej+1 and not Ej and not Aj). vii) is because if there is no run of K heads in the first j trials, but the last K-1 of those j trials are all heads, then the chance that there will be a run of K in the first j+1 trials is just the chance that the next trial comes up heads, which is p. ix) the chance of the last K trials being a tails followed by K-1 heads is qpK-1. x) If the last K (of j) trials are a tails followed by K-1 heads, then whether a run of K heads does or doesn’t happen is determined in the first j-K trials.
The other steps are all probability identities (specifically P(C)=P(C\cap D)+P(C\cap \overline{D}), \, P(\overline{C})=1-P(C), and Bayes’ theorem: P(C\cap D)=P(C|D)P(D)).

Rewriting this with some N’s instead of j’s, we’ve got a kick-ass recursion: P(E_N)=P(E_{N-1})+qp^K-qp^KP(E_{N-K-1})

And just to clean up the notation, define S(N,K) as the probability of getting a string of K heads in N trials (up until now this was P(EN)).

S(N,K)=S(N-1,K)+qpK-qpKS(N-K-1,K). We can quickly figure out two special cases: S(K,K) = pK, and S(l,K) = 0 when lK, and that there’s no way of getting K heads without flipping at least K coins. Now check it:

\begin{array}{ll}&S(N,K)\\i)&=S(N-1,K)+qp^K-qp^KS(N-K-1,K)\\ii)&=\left[S(N-2,K)+qp^K-qp^KS(N-K-2,K)\right]+qp^K-qp^KS(N-K-1,K)\\iii)&=S(N-2,K)+2qp^K-qp^K\left[ S(N-K-1,K)+S(N-K-2,K)\right]\\iv)&=S(N-3,K)+3qp^K-qp^K\left[ S(N-K-1,K)+S(N-K-2,K)+S(N-K-3,K)\right]\\v)&=S(N-(N-K),K)+(N-K)qp^K-qp^K\left[ S(N-K-1,K)+\cdots+S(N-K-(N-K),K)\right]\\vi)&=S(K,K)+(N-K)qp^K-qp^K\left[ S(N-K-1,K)+\cdots+S(0,K)\right]\\vii)&=p^K+(N-K)qp^K-qp^K\sum_{r=0}^{N-K-1} S(r,K)\\viii)&=p^k+(N-K)qp^K-qp^K\sum_{r=K}^{N-K-1} S(r,K)\end{array}

ii) Plug the equation for S(N,K) in for S(N-1,K). iii-vi) is the same thing. vii) write the pattern as a sum. viii) the terms up to K-1 are all zero, so drop them.

Holy crap! A newer, even better recursion! It seems best to plug it back into itself!

\begin{array}{ll}i)&S(N,K)=p^K+(N-K)qp^K-qp^K\sum_{r=K}^{N-K-1} S(r,K)\\ii)&=p^K+(N-K)qp^K-qp^K\sum_{r=K}^{N-K-1} \left[p^k+(r-K)qp^K-qp^K\sum_{\ell=K}^{r-K-1} S(\ell,K)\right]\\iii)&=p^K+(N-K)qp^K-qp^K\sum_{r=K}^{N-K-1}p^k-qp^K\sum_{r=K}^{N-K-1}(r-K)qp^K+\left(qp^K\right)^2\sum_{r=K}^{N-K-1}\sum_{\ell=K}^{r-K-1} S(\ell,K)\\iv)&=p^K+(N-K)qp^K-qp^K\sum_{r=1}^{N-2K}p^k-\left(qp^K\right)^2\sum_{r=0}^{N-2K-1}r+\left(qp^K\right)^2\sum_{r=2K+1}^{N-K-1}\sum_{\ell=K}^{r-K-1} S(\ell,K)\\v)&=p^K+(N-K)qp^K-p^k(N-2K)qp^K-\left(qp^K\right)^2\frac{(N-2K)(N-2K-1)}{2}+\left(qp^K\right)^2\sum_{r=2K+1}^{N-K-1}\sum_{\ell=K}^{r-K-1} S(\ell,K)\\vi)&=p^K+{N-K\choose 1}qp^K-p^K{N-2K\choose 1}qp^K-{N-2K\choose 2}\left(qp^K\right)^2+\left(qp^K\right)^2\sum_{r=2K+1}^{N-K-1}\sum_{\ell=K}^{r-K-1} S(\ell,K)\end{array}

You can keep plugging the “newer recursion” back in again and again (it’s a recursion after all). Using the fact that \sum_{i=1}^N={N+1\choose 2} and \sum_{i=D}^M {\ell \choose D}={M+1 \choose D+1} you can carry out the process a couple more times, and you’ll find that:

\begin{array}{l}S(N,K)=p^K\left[1-{N-2K\choose 1}qp^K+{N-3K\choose 2}\left(qp^K\right)^2\cdots\right]+\left[{N-K\choose 1}qp^K-{N-2K\choose 2}\left(qp^K\right)^2+{N-3K\choose 3}\left(qp^K\right)^3\cdots\right]\\=p^K\sum_{T=0}^\infty {N-(T+1)K\choose T}(-qp^K)^T-\sum_{T=1}^\infty {N-TK\choose T}(-qp^K)^T\end{array}

There’s your answer.

In the approximate (useful) case:

Assume that N is pretty big compared to K. A string of heads (that can be zero heads long) starts with a tails, and there should be about Nq of those. The probability of a particular string of heads being at least K long is pk so you can expect that there should be around E=Nqpk strings of heads at least K long. When E≥1, that means that it’s pretty likely that there’s at least one run of K heads. When E<1, E=Nqpk is approximately equal to the chance of a run of at least K showing up.

Jabberwocky: And that’s why exact solutions are stupid.

Mathematician: Want an exact answer without all the hard work and really nasty formulas? Computers were invented for a reason, people.

We want to compute S(N,K), the probability of getting K or more heads in a row out of N independent coin flips (when there is a probability p of each head occurring and a probability of 1-p of each tail occurring). Let’s consider different ways that we could get K heads in a row. One way to do it would be to have our first K coin flips all be heads, and this occurs with a probability p^{K}. If this does not happen, then at least one tail must occur within the first K coin flips. Let’s suppose that j  is the position of the first tail, and by assumption it satisfies 1 \le j \le K. Then, the probability of having K or more heads in a row in the entire set of coins (given that the first tail occurred at j \le K) is simply the probability of having K or more heads in a row in the set of coins following the jth coin (since there can’t be a streak of K or more heads starting before the jth coin due to j being smaller or equal to K). But this probability of having a streak of K or more after the jth coin is just S(N-j,K). Now, since the probability that our first tail occurs at position j is the chance that we get j-1 heads followed by one tail, so it is p^{j-1} (1-p) . That means that the chance that the first tail occurs on coin j AND there is a streak of K or more heads is given by p^{j-1} (1-p) S(N-j,K). Hence, the probability that the first K coins are all heads, OR coin one is the first tails and the remainder have K or more heads in a row, OR coin two is the first tails and the remainder have K or more heads in a row, OR coin three is the first tails and…, is given by:

S(N,K) = p^{K} + \sum_{j=1,K} p^{j-1} (1-p) S(N-j,K)

Note that what this allows us to do is to compute S(N,K) by knowing the values of S(N-j,K) for  1 \le j \le K. Hence, this is a recursive formula for S(N,K) which relates harder solutions (with larger N values) to easier solutions (with smaller N values). These easier solutions can then be computed using even easier solutions, until we get to S(A,B) for values of A and B so small that we already know the answer (i.e. S(A,B) is very easy to calculate by hand). These are known as our base cases. In particular, we observe that if we have zero coins then there is a zero probability of getting any positive number of heads is zero, so S(0,K) = 0, and the chance of getting more heads than we have coins is zero, so S(N,K) = 0 for K>N.

All of this can be implemented in a few lines of (python) computer code as follows:

An important aspect of this code is that every time a value of S(N,K) is computed, it is saved so that if we need to compute S(N,K) again later it won’t take much work. This is essential for efficiency since each S(N,K) is computed using S(N-j,K) for each j with 1 \le j \le K and therefore if we don’t save our prior results there will be a great many redundant calculations.

For your convenience, here is a table of solutions for S(N,K) for 1 \le N \le 10 and 1 \le K \le 10 (click to see it enlarged):

Q: Aren’t physicists just doing experiments to confirm their theories? Couldn’t they “prove” anything they want?

Thursday, July 22nd, 2010

The original question was: When we start investigating particles and effects at the quantum level, it seems we are not really measuring the reality of the particles, but rather, our instruments’ reactions to the particles.  So if we calibrated the instruments differently, wouldn’t we get different, perhaps contradictory, results?  It seems that physicists first construct mathematical models, then devise instruments to find just what they are looking for.  That seems to be the same as saying I’m going to make an instrument to find leprechauns, and lo and behold I did it!  Of course, no one can really see the leprechauns, but my instrument says they are there.  You can even make an identical machine and you will detect leprechauns, too.

Physicist: Every observation is nothing more than our instrument’s reactions (Quantum mechanical, or otherwise).
A measurement device that produces foregone conclusions is useless (it provides no new information) so nobody builds them.
While physicists do construct models, and then construct devices to test those models, the primary purpose of the devices is to tear down the models and equations.  Once done, physicists “close the circle” by coming up with new models.
If all we (scientists and Humans too) did was build machines that verified our crazy theories, we’d still be stuck in the stone age, having proven conclusively that everything is controlled by dead people and shamans.

For example: the early mathematical models behind quantum physics and relativity predicted a wide array of very bizarre things (quantum tunneling, super-position, time dilation, stretched spacetime). In an attempt to prove the model wrong (because no one believed it), dozens of different experiments were set up. Every experiment had at least two possible, different results (either disproving, or corroborating the theory).

In fact, this is one of the most basic results from information theory; the more you can anticipate a result, the less information you gain from it.  This is why 6th grade science experiments are pointless (except for edjucation or whatever), and why botched experiments and accidental discoveries are so useful.
As it happens, both the relativity model and quantum model held up to experiment, and so we still use them today.
Conversely, the theory of “luminiferous eather” (the idea that light is a wave in some kind of hidden material) was very popular and held for decades in the late 19th century. However, it wasn’t supported by experiment and so (despite its popularity) it was abandoned.
Admittedly, it’s easy to get tunnel vision with your subject, and even dismiss actual results as statistical noise.

My favorite example is a group of German scientists in the late 19th century who accidentally discovered electron diffraction (proof of the wave nature of electrons) when they were trying to measure the deflection of electrons off of a crystal.  The diffraction effect caused the electrons to come out of the crystal only at a small set of angles, thus saturating the film being used detect the outgoing electrons at points, instead of smoothly all over.  The German-tunnel-vision-solution?  Buy a “jiggler” to move the film around so that the overexposed points become reasonably exposed blurry patches.

Electron crystalography. It should be bright in the middle and then get dimmer toward to edges. But then stupid quantum mechanics makes everyting all "pointy".

But tendencies like tunnel-vision or “going with what everyone else thinks” are generally overwhelmed by a positive and contrary result.
For example: You could spend your whole life describing, in detail, the physics of a flat world. But the second someone travels all the way around the planet, all of your theories are instantly useless.

Q: What’s up with that “bowling ball creates a dip in a sheet” analogy of spacetime? Isn’t it gravity that makes the dip in the first place?

Monday, July 19th, 2010

The original question was: … also brings up the famous Einstein analogy of a bowling ball in a mattress as bending spacetime. What confuses me is that this seems circular- using the analogy, say we put a bowling ball on a mattress and then roll a marble past it. The marble will fall in towards the bowling ball. But what’s causing it to fall in? Gravity!

Physicist: Here’s what this is about. Way back in the day a popular demonstration used to explain how the presence of matter creates gravity was to drop a heavy ball onto a sheet of some kind, and then roll a smaller ball around the inside of the indentation that is made. If you were to try this demonstration while floating around on the space station you’d be wasting time that could be better spent putting on pants two legs at a time (no gravity to pull the bowling ball and make the indentation in the first place).

In Newtonian mechanics gravity is a spooky, unexplained force. In Einstein’s General Relativity gravity is caused by the curvature and stretching of space and time. Objects move in straight lines like always, but the messed up spacetime they move through makes it appear as though they’re changing direction (that is to say: falling). What’s weird as hell is that they really are moving in straight lines locally, but not globally. If you carefully try to draw a straight line on a bowl you’ll find that it may be straight if you look at a tiny piece of it, but if you stand back it’s curved.

The bowling-ball-mattress thing is another example of how messed up geometry can create “force”. It’s just a bad metaphor. In the one case the pull toward the center is a result of the object in question following a straight line through a messed up spacetime, and in the other it’s trying to roll downhill.
Different.

Q: If we find a “Theory of Everything” will we be done?

Monday, July 5th, 2010

Physicist: Not even close.

One could even make the argument that finding the theory of everything (often called “unified field theory”) is just the start of the real science.  The theory of everything (TOE) will finally tie together all of the fundamental forces, describe the behavior of every type of particle, and explain in fine detail how space and time behave in all cases.

We’ve seen unifying theories before (not the unifying theory) and they don’t generally answer questions on their own, but merely provide tools to explain things later on down the line.  For example; in several strokes of the quill Newton unified the “make apples fall” force with the “swing planets around” force under the umbrella of “universal gravitation”.

With universal gravitation (which says that gravitational force is: F=\frac{GMm}{R^2}, where M and m are the different masses involved) you can quickly explain why the Moon goes around the Earth, why all orbits are elliptical, and even why planets, Stars, Moons, and the Earth are round.

What you can’t explain, without buckets of math (and often as not: computer power), are things like phase lock, Lagrange points, and why many galaxies have spiral arms.  Even worse, you can’t actually solve problems involving 3 or more objects.  You can exactly write down how two objects will orbit each other, but as soon as there are three, the best you can do is approximation.  This is called the “three body problem”, and it’s likely to remain unsolvable forever.

The Trojan Asteroids float around in two of Jupiter's Lagrange points. This is completely described by the Law of Universal Gravitation, but it still took a lot of work to figure out what was going on. Image stolen from: http://www.dtm.ciw.edu/users/sheppard/satellites/trojan.html

So, a theory of everything, while it would be able to describe the details of how all forces and particles interact on all levels, would still only be a set of equations.  And having the equations is pretty different from having the solutions to those equations, and really different from understanding the implications of those solutions.

The equations required to describe the motion of a particle according to Quantum Electro Dynamics (an extremely accurate theory). Solving these equations is left as an exercise for the reader.

Q: Is it possible to say if the Earth is moving or sitting still without going into space?

Saturday, July 3rd, 2010

Physicist: Relativity (both Galileo‘s and Einstein‘s) states that the laws of physics will work the same no matter how fast or slow you’re moving, so long as that movement is at a constant speed and in a constant direction.  Galileo talked about boats, and Einstein talked about trains, but it’s all the same stuff.  A point on the Earth, rather than moving in a nice straight line, is being swung around on 3 circles at the same time.  As a result, physics doesn’t work quite the way it should.

One of these circles is the wobble induced by the Moon’s pull.  Rather than thinking that “the Moon orbits the Earth” it helps to think that “the Moon and the Earth orbit their common center of mass”.  The Earth is about 80 times more massive than the Moon, and as such, the center of the Earth-Moon system is about 1,500 km beneath the surface of the Earth (not in space between them), which is why I’m describing the effect as a “wobble”.  This wobble is made apparent by the tides, which would otherwise be very mysterious (where does the force come from?).

The Earth (blue) and the point around which the Earth wobbles (red).

Another circle is the Earth’s orbit around the Sun.  Although they originally didn’t know why, sailors have always been aware that in addition to lunar tides there is a smaller “solar tide” that occurs every day at noon and midnight.  This tide is a symptom of the Earth moving around the Sun, and it’s about 46% as strong as the lunar tide.
Finally, the most dramatic, fastest circle is the Earth’s rotation.  You can tell the difference between the Sun and Moon moving around the Earth, and the Earth spinning because a stationary Earth doesn’t experience “coriolis forces

Coriolis forces are responsible for large scale weather phenomena like hurricanes, as well as a host of much smaller, more boring effects, like Foucault pendulums.

The direction in which a Foucault Pendulum swings back and forth slowly rotates. In reality, the pendulum is trying to remain swinging in the same direction, but the Earth is turning under it.

So even before knowing the cause, it’s possible to deduce that the Earth is not stationary, because the laws of physics here are not the same as the laws we would observe on a completely stationary object.