Wikipedia:Reference desk/Archives/Mathematics/2007 January 3

= January 3 =

All the King's marbles
You are the royal statistician for the King of a small country. Recently, the King’s spies captured a machine from the enemy that manufactures orange and green marbles, along with an instruction manual. The instructions say that the machine can only produce one marble per day, and that the color of the marble will be determined at random. The manual further states that a factory preset determines the fraction of orange marbles that the machine will produce on average. Unfortunately, the spies could not find any evidence to indicate the value of the factory-preset for the machine they captured.

Since the nation’s GNMO (Gross National Marble Output) is critical to national security, the King has asked you to provide a daily report stating the current best estimate of the factory preset and to give an indication of the uncertainty of the estimate. The first report is due immediately, before the machine has produced any marbles. What do you tell the King? After 1 day, the machine produces an orange marble. What do you tell the King? The next day another orange marble is produced. What do you tell the King? What do you report on day 1000, by which time the sample consists of 1000 orange marbles and 0 green marbles?

I’ll attempt to answer. I will use the equation f = x/n, where f is my estimate of the factory preset fraction of orange marbles, x is the number of orange marbles in my sample, and n is the total number of marbles in my sample. I am currently unaware of what equation to use to express the uncertainty in the estimate.

In the first report, I would state that no estimate is possible because no data is available on which to base an estimate. The uncertainty is 100%.

In the second report, I have a sample of 1 orange marble, and I would state that the best estimate of the factory preset is 1 (f = x/n = 1/1 = 1), but that the uncertainty of the estimate is large. What I currently can’t figure out is how to express the uncertainty numerically.

In the third report, I have a sample of 2 orange marbles, and I would still give an estimate of 1 for the factory preset (f = x/n = 2/2 = 1), but now, my uncertainty is less (but how much less)?

In the 1001st report, I have a sample of 1000 orange marbles. I am now very certain that the factory preset is 1 or at least very close to 1 (f = x/n = 1000/1000 = 1). My uncertainty is far lower than it was in the first two reports, but by how much?

dryguy 14:14, 3 January 2007 (UTC)


 * A relatively acceptable way of measuring the uncertainty would be to see how much difference pulling a green next time would make. So the first time, you'd have an uncertainty of 100% (1/1), the second time, 50% (1/2), the third time 33% (2/3), and the last time, 0.1%. I'm not sure this is the right way to go about it, but I seem to remember having done something like this (a long time ago). yandman  14:21, 3 January 2007 (UTC)

I would look at the number of marbles produced as the sample size. I believe 1100 marbles works out to about a 3% margin of error over a 95% confidence interval (meaning 95% of the time the setting would be between 97% and 100% orange marbles). For the no marbles case, I would estimate a 50% setting with a 50% margin of error. (If you knew all the possible settings, say 50%, 60%, 70%, 80%, 90%, or 100% orange, then you could make a more intelligent guess by averaging all the possible settings to get 75% orange marbles, on average.)

Margin of error can also be calculated using a given confidence interval:

99% confidence 95% confidence 90% confidence Sample size $$\approx 1.29/\sqrt{n}\,...\approx 0.98/\sqrt{n}\,...\approx 0.82/\sqrt{n}\,$$ --- -- -- --     2                                                   \   1000                                                    > Margin of error 1100          3.9%            3.0%          2.5%      /

Those formulae don't work well for small samples, however, even giving over a 100% margin of error for a sample size of 1. I guess I'd say for a sample of 1 the margin of error equals the confidence interval. Thus, there is a 99% margin of error within a 99% confidence interval. So, adding the info from the above chart, I get:

Sample size Estimate 99% confidence 95% confidence 90% confidence --- -- -- --      0         50%       50.0%           50.0%         50.0%      \      1        100%       99.0%           95.0%         90.0%       \      2        100%                                                  > Margin of error 1000       100%                                                 /   1100        100%        3.9%            3.0%          2.5%      /

You can fill in the missing numbers. StuRat 16:21, 3 January 2007 (UTC)

This is a textbook example of Bayesian inference. Let x be the fraction of orange marbles. Then, given x, the probability of drawing x orange marbles is xn. That means that the likelihood for x is xn times the prior probability of x. If you initially make the not unreasonable assumption that each fraction x between 0 to 1 is equally likely (i.e. a uniform prior) then after 0 samples, the mean and median values of x are 1/2. After n samples, the probability distribution for x is given by the normalized likelihood: (n+1)xn. Thus, the most likely value of x is 1 whereas the estimated median value of x is 2-1/n and the mean value is (n+1)/(n+2) (computing this is a simple integral). The variance about this mean is (n+1)/(n+2)(n+3) (the standard deviation is the square root of this). –Joke 16:45, 3 January 2007 (UTC)
 * That is one of the two most convincing answers anyone has given me so far. The other suggestion came from someone at Craigslist who said to use Wilson's interval. I will be mulling this over for a while, but would love to hear any more comments. My thanks to everyone who contributed! dryguy 17:29, 3 January 2007 (UTC)

Vertex operator algebra and vertex algebras - question
In wikifying an article on the mathematician, James Lepowsky, there is this statement: "His current research is in the areas of infinite-dimensional Lie algebras and vertex algebras." Is Vertex operator algebra the same area as vertex algebras? That is, could I use the working link as a substitute for the red link? Sincerely, Mattisse 14:33, 3 January 2007 (UTC)


 * Yes. –Joke 16:48, 3 January 2007 (UTC)


 * Thanks for answering. I realised it was a stupid question to as on closer inspection I could see they were the same. Sincerely, Mattisse 00:05, 4 January 2007 (UTC)

product
Can someone direct me to a page dealing with the product

Product (from x=0 to x=N) of (n+x)/(x+1) or similar eg 1/n!{n(n+1)(n+2)...(n+N)}

Thanks.87.102.4.89 16:39, 3 January 2007 (UTC)


 * I don't think we have an article on these product per se, but as they both ultimately come down to factorials, maybe that article will help. Can you specify what do you want to know about these? -- Meni Rosenfeld (talk) 17:43, 3 January 2007 (UTC)

See binomial coefficient or combination:
 * $$\prod_{i=0}^N\frac{i+n}{i+1}=\frac{(N+n)!}{(n-1)!(N+1)!}={N+n\choose N+1}$$

Moreover, by Stirling's approximation
 * $$\log{N+n\choose N+1}\sim N\log\frac{N+n}{N+1}+n\log\frac{N+n}{n-1}+\frac{1}{2}\log\frac{(N-n)(n-1)}{2\pi(N+1)^3}$$

for large values of N+n. –Joke 20:43, 3 January 2007 (UTC)
 * Thanks is the above brakets the same as c(N+x,N+1) ie a combination - I honestly hadn't spotted that it was an exmaplpl of a combination Cr. Thanks.87.102.4.89 21:24, 3 January 2007 (UTC)
 * I wanted to know if there was a 'name' or symbol as per combinations and permutations (Cr Pr), since I've been finding this equation cropping up a lot (distinct ways of arranging n 'things' over x 'holes', sum of integers, number of balls in a tetrahedral pyramid, derivations sums of powers eg 14+24+34 etcto name a few I know). It seems common in counting problems and thought there might be a conventionally used symbol etc.
 * I'd also bee interested in other properties/uses of it if any common ones are known, and also any history of it's usage. Thanks.87.102.4.89 21:18, 3 January 2007 (UTC)

Please read: combination, binomial coefficient, combinatorics. –Joke 21:44, 3 January 2007 (UTC)

1 plus 1
Whats 1 plus 1? —The preceding unsigned comment was added by 74.102.217.142 (talk) 22:20, 3 January 2007 (UTC).


 * It's -1 in $$\mathbb{Z}_3$$, 0 in $$\mathbb{Z}_2$$, 1 in boolean algebra, 2 in the integers, 10 in binary and 11 in reflective binary code (about which I could not find an article). Pick your favorite. -- Meni Rosenfeld (talk) 22:47, 3 January 2007 (UTC)
 * I added a redirect for reflective binary code -> Gray code. --Ornil 20:07, 4 January 2007 (UTC)


 * One plus one is two, and 1 + 1 is 2, but 1 plus 1 is an unholy chimera, so let's say it's undefined and pretend it didn't come up. Melchoir 23:33, 3 January 2007 (UTC)


 * As 1 red apple is a red apple, 1 plus 1 can be interpreted as a plus 1, i.e. a single occurrence of a unary plus preceding the integer 1.86.132.238.241 19:51, 4 January 2007 (UTC)