Jump to content

Wikipedia:Reference desk/Archives/Mathematics/2012 April 14

From Wikipedia, the free encyclopedia
Mathematics desk
< April 13 << Mar | April | May >> April 15 >
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.


April 14

[edit]

Black and white balls problem

[edit]

A machine generates a random integer from 0 to 5. Then my partner puts 5 balls into a bag. The value of the integer indicates how many of the balls must be black, and the rest must be white.

My partner then gives me the bag. I take out one ball on a random basis, and it is black (so the number generated can't have been 0).

In that situation, what are the probabilities that the generated number could be each of 1, 2, 3, 4 and 5? --Theurgist (talk) 08:40, 14 April 2012 (UTC)[reply]

It is exactly as if there are four balls chosen ignoring the business about the fifth ball. It is just as if you closed your eyes as you stuck in the fifth ball and then immediately took it out again. It's colour makes no difference except to adjust the number of such balls remaining.Dmcq (talk) 10:35, 14 April 2012 (UTC)[reply]
I'm afraid that's wrong. If the generated number were low, it would be less likely that first selected ball were black. Thus, by an application of Bayes's theorem, the fact that the first was black makes it less likely that the generated number was low. The probability of there being n black balls and one of those black balls selected on the first pull is 1/6 * n/5 = n/30. So the probability of a black ball being selected on the first pull is 15/30. So the probability that the generated number is n is n/15.--121.74.125.218 (talk) 10:58, 14 April 2012 (UTC)[reply]
Edited the above because I confused black and white.--121.74.125.218 (talk) 11:01, 14 April 2012 (UTC)[reply]
Sorry misunderstood the question. I was just considering the balls being stuck in at random and then counting. If the count is predetermined and each count has an equal chance then things are different. There you start off with a 1/6 chance of each count. The ones of count n are chosen with probability proportional to n. The sum of 1 to 5 is 5.6/2 so n is chosen with probability n/15, i.e. 0 1/5 2/15 3/15 4/15 and 5/15 Dmcq (talk) 11:22, 14 April 2012 (UTC)[reply]
The answer is in a simple application of Bayes Theorem. You want the probability of the number of black balls being n given that the first one you drew is black. The theorem says this is equal to the probability of the first ball drawn being black given n balls are black (which is simply n/5) times the probability of there being n black balls (1/5 or 1/6, depending on how you interpret the question) divided by the probability of drawing a black ball over all cases considered (1/2, I believe). SamuelRiv (talk) 16:19, 14 April 2012 (UTC)[reply]
Succinctly: let N=unknown number of black balls and n=some realization of N. Then
Here because a priori there were six possibilities: N=0, 1, 2, 3, 4, 5, of which N=n was just one of the six.
Duoduoduo (talk) 18:10, 14 April 2012 (UTC)[reply]

The odds for having K type-1 and NK type-2 items in the population, and k type-1 and nk type-2 items in a sample, is

.

The probabilities are odds divided by sum of odds. The sum of odds is for deduction:

and for induction:

Your example is induction - knowing the sample you want information about the population. Type-1=black, type-2=white, N=5, n=1, k=1. So odds are for K=0,1,2,3,4,5, and the denominator is . Bo Jacoby (talk) 19:35, 14 April 2012 (UTC).[reply]

The Rationals Are Dense In The Reals

[edit]

Suppose and are continuous functions and that . Show that . I know this follows from the fact that the rationals are dense in the reals, but how? Widener (talk) 11:44, 14 April 2012 (UTC)[reply]

For any given we can find a sequence of rational numbers such that . For each we have by hypothesis, so . Now think how we can use and continuity of f and g to reach a conclusion about and . Gandalf61 (talk) 14:52, 14 April 2012 (UTC)[reply]
Right; and presumably we have from the continuity of and . Widener (talk) 12:19, 16 April 2012 (UTC)[reply]
Just want to add a fun little fact; that property you mentioned shows there are no more continuous functions from than there are real numbers. Money is tight (talk) 08:04, 15 April 2012 (UTC)[reply]

It's instructive to do it also with the general topological definition of continuous functions (inverse images of open sets are open), where sequences are unnecessary. The hypotheses are certainly satisfied by R with the usual topology, for your question.

You can prove this: Suppose f, g:X→Y are continuous functions between topological spaces where Y is Hausdorff, and furthermore, f=g on a dense subset D of X. Show f=g.

  • If f and g disagreed on a number x, you could separate f(x) and g(x) with a pair of disjoint open sets (Hausdorff property).
  • The intersection of the inverse images of these open sets is open (by continuity) and nonempty.
  • By density the open set in the last step contains a point of D, but this contradicts the disjointness of the open sets separating f(x) and g(x).

I understand that this may be overabstract for your purposes, but if you can invest the thinking I think it is worthwhile. Rschwieb (talk) 14:09, 15 April 2012 (UTC)[reply]

Does a continuous function always exist, given a continuous defined on a dense subset of satisfying for all in this dense subset? Widener (talk) 12:19, 16 April 2012 (UTC)[reply]
No. You can surely figure out a few counterexamples in the case of . In fact, it is rather tricky to give necessary and sufficient conditions for a function on to extend to all of continuously. --COVIZAPIBETEFOKY (talk) 12:53, 16 April 2012 (UTC)[reply]
@Widener If D is the dense subset of X, I hope in your statement you mean that f is continuous as a function from D to Y (or else the answer would be trivially "yes, f itself"). Rschwieb (talk) 13:48, 16 April 2012 (UTC)[reply]
Yes, is a function , which is what I meant when I said " defined on a dense subset of " Widener (talk) 15:44, 18 April 2012 (UTC)[reply]
Yes, and since that statement (that you just repeated) does nothing to clarify the ambiguous phrase "continuous f", a 100% clear statement would be "a function f defined and continuous on a dense subset D". Rschwieb (talk) 18:46, 18 April 2012 (UTC)[reply]
Well, hopefully that made it obvious that it was continuous as a function from D to Y (since it's only defined on D). Widener (talk) 03:24, 19 April 2012 (UTC)[reply]
"Only defined on", which is semantically stronger than "defined on", would have been a stronger indicator of your intentions to talk only of continuity on D. Functions "defined on X" are also "defined on D", so the scope of continuity of f would still be a mystery. Rschwieb (talk) 17:44, 19 April 2012 (UTC)[reply]
The notation implies that the function is defined only on D. Widener (talk) 05:26, 20 April 2012 (UTC)[reply]
In the case of R over Q, uniform continuity on bounded subsets is a necessary and sufficient condition for the existence of a continuous extension. For general metric spaces, this condition is sufficient but not necessary (necessity requires the Heine-Borel property). Sławomir Biały (talk) 14:05, 16 April 2012 (UTC)[reply]

I love modern algebra like this. VernaRebnick (talk) 00:54, 17 April 2012 (UTC)[reply]

Algebra?! Rschwieb (talk) 13:27, 18 April 2012 (UTC)[reply]