# Wikipedia:Reference desk/Archives/Mathematics/2008 November 12

Mathematics desk
< November 11 << Oct | November | Dec >> November 13 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.

# November 12

## Strange LaTeX feature

When rendered in PNG, the code \sqrt 3 results in $\sqrt 3$ while \sqrt{3} results in $\sqrt{3}$. The latter image has additional white space before the root symbol. Why?

When you replace 3 with 1 or 2 the resulting pictures do not have any leading space:
$\sqrt 1$       $\sqrt{1}$       $\sqrt 2$       $\sqrt{2}$
CiaPan (talk) 13:06, 12 November 2008 (UTC)

Your two allegedly different square roots of three look exactly identical on the two browsers on which I've viewed them. What browser are you using? Michael Hardy (talk) 23:59, 13 November 2008 (UTC)
Probably they are fixed now. They look identical here too now, which they didn't when the question was asked. -- Jao (talk) 00:08, 14 November 2008 (UTC)
The LaTeX images are cached based on a hash (SHA1 MD5, I think) of the markup. Apparently there's something funny going on with the cached image for \sqrt{3}. Changing it to, say, \sqrt{{3}} again produces the expected rendering: $\sqrt{{3}}$. We've had other problems like that recently; perhaps someone should simply purge the whole LaTeX image cache. —Ilmari Karonen (talk) 16:31, 12 November 2008 (UTC)
I've asked on IRC for something to purge it, hopefully it will be fixed soon. --Tango (talk) 16:46, 12 November 2008 (UTC)

Root corrected to radical. CiaPan (talk) 19:47, 12 November 2008 (UTC)

I just changed it back. First off, you shouldn't be editing what other people say, unless it's something like adding a wikilink. Secondly, root is perfectly correct. They are called square roots, cube roots, whatever. The symbol is the root symbol. -mattbuck (Talk) 20:32, 12 November 2008 (UTC)
I agree, don't edit other people's signed comments. Doing so means that their signature follows something that they didn't write. I also agree that "root" is perfectly correct. --Tango (talk) 22:42, 12 November 2008 (UTC)
Are you two referring to this edit? The only comment I see edited there is CiaPan's own; am I just confused? -- Jao (talk) 00:08, 14 November 2008 (UTC)
I did not change what other people say. YOU did. --CiaPan (talk) 07:06, 14 November 2008 (UTC)
It seems Mattbuck missed the fact that you were the OP (and I didn't think to look, sorry!). --Tango (talk) 19:56, 14 November 2008 (UTC)

BTW, now I see both images displayed in my question looking the same. Possibly the cache has been cleaned and now both expressions (with digit in braces {3} and with 3 alone) render identical. --CiaPan (talk) 07:11, 14 November 2008 (UTC)

Excellent, someone managed to fix it! The sysadmins seemed a little unsure of whether they would be able to (I didn't understand half of what they said, unfortunately). --Tango (talk) 19:56, 14 November 2008 (UTC)

## Very improbable election results

Suppose we have a population of N people who must vote for President A or President B (no other options). If N is a large number it is very improbable that the difference d between the votes of the two presidents will be 0 or 1 (unless we assume very particular - and improbable - hypotheses about the structure of the population). It is also improbable that the difference d between the votes of the two presidents is too close to 0 (say less then ε). Can we try to give an estimate of this probability given N and ε in any typical real situation?--Pokipsy76 (talk) 14:17, 12 November 2008 (UTC)

A very simple model would be assuming that everyone is as likely to vote for A as for B. In that case, we would have a binomial distribution with $p = 0.5$, which for large $N$ will be close enough to a normal distribution (the number of votes for A is distributed around $0.5N$ with a standard deviation of $0.5\sqrt N$), which would make it easy to answer the questions. Obviously, this assumption is drawn from thin air, but I can't really think of a better one, unless we actually know something about the population. -- Jao (talk) 14:51, 12 November 2008 (UTC)
Ok, it seems reasonable at least for an estimate, however a 0.5 distribution would in any case give a very unrealistically small (and improbable) difference between the votes of the two presidents. This model doesn't say anything about how improbable is to have such a small difference.--Pokipsy76 (talk) 15:12, 12 November 2008 (UTC)
Illustrating this with a particular case of N=10000 and $p = 0.5$, the number of votes for A will have, to a sufficient approximation, a normal distribution with mean 5000 and SD 50. The probability that each candidate gets the same number of votes will come from considering the area below the normal curve between the values 4999.5 and 5000.5, with respective z values -0.01 and 0.01, and likewise for any other distribution of the total vote.→81.151.247.46 (talk) 16:07, 12 November 2008 (UTC)
In case the OP or other readers aren't familiar with basic stats, this gives a probability around 1%. For 10000 votes differing by 0 or 1 gives around a 2% chance. While you can adjust the bernoulli probability p=0.5 a bit, note that if it differs significantly from 0.5, the probability of one of the candidates winning is too low for the election to be more than a formality. At least in the voting theory chapters I've read, in a two party election p=0.5 is always approximately the right choice since the two parties will adapt their stance until they both reach this equilibrium. The wikipedia article landslide victory seems to think already p=0.6 is a huge margin.
Using the normal distribution, however, it looks like the probability of winning drops quite dramatically as p moves from 0.5. For instance with 10000 votes, p=0.52, I get the non-favored choice has less than a millionth of a percent chance of winning. Can someone confirm that? It seems reasonable given that 2% of the vote is then 4 standard deviations. Of course the problem just gets worse with more votes. JackSchmidt (talk) 17:09, 12 November 2008 (UTC)
I don't see why you'd assume that people vote randomly. Most people vote a straight party ticket who vote at all, and even among the swing voters I doubt the decision is anything like random. The magic statistic fairies only give the right answer to people who check their assumptions. Black Carrot (talk) 18:01, 12 November 2008 (UTC)
Actually, as near as I can tell, the model where they vote randomly, and the model where people decide randomly whether to vote or not (or are included in the random poll) are nearly identical. Assuming a certain percentage decide to vote, but unexpected influences alter that percentage according to a normal distribution, also does not appear to significantly change the analysis. It seems to me that if the number of voters who will vote is large, then the election almost certainly reflects the true population's preferences, and so if the preference is anything distant from p=0.5, then the election outcome is certain already from large enough polls. JackSchmidt (talk) 19:19, 12 November 2008 (UTC)

### Let's put it in this way

Suppose we can prove that with the binomial distribution with p=0.5 the probability of a less than d% difference in a population of N individual is less than 0.000001.

1. Can we say that the same extimate holds for any typical real polupation of N individuals?
2. If the answer is "yes" we can reasonably think that the estimate is however not optimal, can we do better?--Pokipsy76 (talk) 18:04, 12 November 2008 (UTC)
The binomial distribution is appropriate if not everyone votes. As you have mandated that everyone votes, then there is no use for probability here. The difference between the votes is simply the difference between the size of the two camps. I don't see any reason to think that any particular number between 0 and N inclusive cannot be the number of people who favor choice A. Assuming the two choices can influence the vote and are equally adept at doing so, the end result after years of influence is likely to be that N/2 favor each choice.
If you are asking for historical information, then probably the math ref desk is the wrong place. As I mentioned above, landslide victory gives some historical data whether the difference is large. You could probably find an article on the 2004 US presidential election that points to historical data on other close elections. JackSchmidt (talk) 19:19, 12 November 2008 (UTC)
The point is that even if "any particular number between 0 and N inclusive can be the number of people who favor choice A" it is still true that small intervals near 0 - say for example (-0.001%,0.001%) - will have a small probability, therefore some sets of outcomes with small differences are almost impossible.--Pokipsy76 (talk) 19:37, 12 November 2008 (UTC)
I assume you mean "small intervals near N/2". And yes, they will be almost impossible, but no more so than any other difference. Assuming that N/2 is truly the mean of the distribution (which, in the long run and all other things equal, could be accomplished by the effect described by JackSchmidt), a difference of 0 (assuming an even number of voters) is more likely than a difference of 2, which is in turn more likely than a difference of 4, etc. It's just that among a million votes or more, there's so many possible differences that even the most likely ones become very implausible when singled out. -- Jao (talk) 19:54, 12 November 2008 (UTC)
What you say is correct, in fact the focus should be on the set of events (in this case a small interval near 0) and not on the single events.--Pokipsy76 (talk) 20:08, 12 November 2008 (UTC)
• Probability theory does not say something is impossible. It tells us what we do not know, and what we can expect. The chances of me being hit by a car on Friday 13 are very low. However, large numbers of people get hit by cars, and Friday 13 is no exception. So I could make a list of people who get hit by a car on Friday 13th, and worry about that. It's the same with elections: you would not expect a small difference between A and B always, but it can easily happen sometimes. Have you got some historical data you would want to analyse? Kaaskop6666 (talk) 20:00, 12 November 2008 (UTC)
Yes it happen sometimes because the probabity is small but not too small. There are events that do not happen "sometimes" but just in almost impossible cases (for example a quantum fluctuation which creates an exact copy of yourself ).--Pokipsy76 (talk) 20:08, 12 November 2008 (UTC)
I would expect marginal wins quite often, because the party that is expected to loose will work like hell to win. Kaaskop6666 (talk) 20:03, 12 November 2008 (UTC)
You obviously can expect marginal wins quite often, but not "too" marginal wins quite often.--Pokipsy76 (talk) 20:08, 12 November 2008 (UTC)
Of course, when defining "marginal" you would probably do so by looking at the historical distribution of margins, so it's all circular. --Tango (talk) 00:01, 13 November 2008 (UTC)