Wikipedia:Reference desk/Archives/Mathematics/2009 June 23
Mathematics desk | ||
---|---|---|
< June 22 | << May | June | Jul >> | June 24 > |
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. |
June 23
[edit]Limits
[edit]Hi. I haven't done much work on limits and so need a bit of help with this problem.
Given that where m is a positive integer and n is a non-negative integer, show that .
Do you just make the substitution ? Thanks 92.7.54.6 (talk) 16:04, 23 June 2009 (UTC)
- Yes, that's one way to look at it, and the method the problem seems to be setting you up for.RayTalk 17:25, 23 June 2009 (UTC)
- So do you just make the substitution and then divide by (-1)^n?. On a related note I had to determine where . Am I correct to say this is 1? After that I had to determine , which I got as -1 (using the approximation ) but then when I graphed it, this was wrong. Any ideas?
- You can do that one with L'Hôpital's rule (I'm not a fan of the rule, but I think it is the best method for that limit) and the answer is, indeed, 1. --Tango (talk) 17:50, 23 June 2009 (UTC)
- I've never learnt any rules for limits. I'm working solely with algebraic skills and approximations for small x. 92.7.54.6 (talk) 17:54, 23 June 2009 (UTC)
- For the first question - yes, you should divide by , which is just a nonzero constant and thus does not change the zero limit.
- For the second - the approximation is just not accurate enough for calculating here. Using will give the correct result, .
- As you may have noticed, knowing when is an approximation good enough is not always trivial. That's why rules like L'Hôpital's are useful. I think proving this limit without it is quite a challenge. -- Meni Rosenfeld (talk) 18:04, 23 June 2009 (UTC)
- Do you only know it's not good enough because you used L'Hôpital's rule first? So was it only luck that I got the limit of f(x) right then? If you used the terms in x^3 or higher powers in the approximation of e^x, would you not get a different answer because you've become more accurate? 92.7.54.6 (talk) 18:08, 23 June 2009 (UTC)
- A simpler questions perhaps; I hadn't heard of L'Hôpital's rule before this thread and looking through the page isn't helping me see how to apply it here. Could someone show me how it is used for the limits of f(x) and f'(x) please? Thanks. 92.7.54.6 (talk) 18:51, 23 June 2009 (UTC)
- I know it's not good enough because it's "just enough" for (if you try using you'll obviously fail), and thus you'll need more for (since taking a derivative amplifies errors). Another way is to add a hypothetical term and see if it changes the result (e.g., if you take you'll see that the result depends on ). In a more formal proof you would probably use a remainder term with a Big O notation. But if you don't want this kind of sophisticated thinking then yes, you can only know an approximation is not good enough if you see it gives a different result from an exact method (be that using L'Hôpital's rule or otherwise).
- So in a sense, yes, using it for the first limit without giving a justification was "lucky".
- Using more terms than necessary will not give a different result, because we are taking the limit at . These higher order terms would only make a contribution which is proportional to x and thus vanishes. If you try it for simpler cases, like you'll see what I mean.
- As for using L'Hôpital's rule - for the first case, express f as a ratio where and . Then verify that these functions vanish at the limit: , . Then calculate and , and finally
- .
- For the second case you will first need to find an expression for . -- Meni Rosenfeld (talk) 20:51, 23 June 2009 (UTC)
- A simpler questions perhaps; I hadn't heard of L'Hôpital's rule before this thread and looking through the page isn't helping me see how to apply it here. Could someone show me how it is used for the limits of f(x) and f'(x) please? Thanks. 92.7.54.6 (talk) 18:51, 23 June 2009 (UTC)
- Do you only know it's not good enough because you used L'Hôpital's rule first? So was it only luck that I got the limit of f(x) right then? If you used the terms in x^3 or higher powers in the approximation of e^x, would you not get a different answer because you've become more accurate? 92.7.54.6 (talk) 18:08, 23 June 2009 (UTC)
- I've never learnt any rules for limits. I'm working solely with algebraic skills and approximations for small x. 92.7.54.6 (talk) 17:54, 23 June 2009 (UTC)
- You can do that one with L'Hôpital's rule (I'm not a fan of the rule, but I think it is the best method for that limit) and the answer is, indeed, 1. --Tango (talk) 17:50, 23 June 2009 (UTC)
- So do you just make the substitution and then divide by (-1)^n?. On a related note I had to determine where . Am I correct to say this is 1? After that I had to determine , which I got as -1 (using the approximation ) but then when I graphed it, this was wrong. Any ideas?
Enumerating Rationals
[edit]Hi, I am working on qualifying exam problems, so I may start asking a lot of analysis type questions, mostly real analysis. For now, I need to construct a bijection from the natural numbers onto the rationals... in other words, I need to construct a sequence of all rationals without repeating. That's easy. But, I need more. Say g(k) is this function. I need an enumeration such that
diverges. And, I also need to know if there exists any such enumeration such that it converges.
My first thought was to just try the obvious enumeration and see if I get anywhere: 0, 1, 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, 4/5... . But, then I could not show that series converged or diverged. I tried root test but you get a limsup of 1 which is inconclusive. Ratio test, limit must exist... or you can use the one in Baby Rudin but it does not work either. I thought about switching it up a bit to make it larger... just for each denominator, write the fractions in decreasing order instead of increasing. But, same thing. Any ideas? Thanks. StatisticsMan (talk) 19:50, 23 June 2009 (UTC)
- Why does the sequence need to converge? DJ Clayworth (talk) 19:52, 23 June 2009 (UTC)
- If you assume that the sequence is a bijection, there's no way it converges. The terms do not go to 0, as after any finite number of steps, there are always infinitely many that are greater than any arbitrary constant. RayTalk 20:04, 23 June 2009 (UTC)
- Do you want all rationals or just those in [0,1]? If the former, then what Ray said. But if the latter, you should be able to construct so that (since ). -- Meni Rosenfeld (talk) 21:01, 23 June 2009 (UTC)
- That is, let be any enumeration of these rationals. Define
- The first (according to h) number which is at most and has not yet been picked.
- Since you have arbitrarily small numbers, this is well-defined. Furthermore, for every , there is some minimal such that . If , then for some . -- Meni Rosenfeld (talk) 21:12, 23 June 2009 (UTC)
- For one that diverges, use
- The first number which was not yet picked
- The first number which is greater than and was not yet picked
- -- Meni Rosenfeld (talk) 21:25, 23 June 2009 (UTC)
- Given your study objective, I think it is best to spend quite a long time thinking about this sort of problem before seeking help. There doesn't seem to be any technical machinery involved; it's just a matter of sharpening your ability of attacking such problems with elementary methods. 208.70.31.186 (talk) 23:13, 23 June 2009 (UTC)
- Yea, sorry, the point is the rationals in [0, 1]. I think I get what you're saying Meni. Thanks for the help. As far as the last comment, I disagree. I have only limited time. I do not think I would have ever figured this out. But, now that I have seen a probable solution, and now that I will go through and make sure it makes sense to me and write it up in detail, then I will understand it and have a bit of intuition I didn't have before. If I can do this with lots of problems, then I built lots of little bits of intuition, as well as much technique and theory. As far as spending hours on a problem, I just spent the last two semesters doing that on most homework assignments for real analysis. Once we, often as a group, figured out a problem, in the writing up process is when I actually learned things. Thinking about a problem for hours and not getting anywhere is not helpful to me. I am trying to know how to do as many problems as possible before the test. That will be very helpful. StatisticsMan (talk) 02:26, 24 June 2009 (UTC)
- Your dilemma is understandable. It is often the case that exams, although they test one's ability, are often not very useful. In particular, I think that one should not sacrifice a good understanding for good grades (if I have a perfect understanding and a D grade, I would be happier than if I had a poor understanding and an A grade), but I am not the one in your position! I think that you should attempt a problem for around 30 minutes, and if you cannot solve it, seek help. Often, reading something (such as a solution) does not aid in one's understanding. For instance, if I were memorizing some words from the dictionary, unless I write them down, I would probably forget the words in due time; even if I had looked at the word for at least 30 minutes. Therefore, if you at least attempt a problem (and then ask for the solution), not only will it help your memory (you will not go blank in the exam), but it will also, if your attempt is successful, provide you with another approach to a problem that we may not be able to give you. I also think that successfully solving many problems before an exam boosts your confidence as well as helps your intuition more than a mere solution we may be able to provide you. However, I am probably not the one to tell you what to do, so you should probably continue what you feel as best preparation for the exam. --PST 10:33, 24 June 2009 (UTC)
- Yea, I agree with you actually. I think it is good for me to try problems for a while. I think it bad for me to get stuck on one problem for hours. So there has to be a balance. We have a study group set up at our school and we basically break up the exams and do our part and then present solutions to each other. I learn a bit but not a huge amount from someone else presenting, unless it's a subject I understand pretty well already. But, in taking their description and rewriting up the whole solution, making sure I understand every detail, then I think I learn a lot. Plus, I am doing some problems on my own. And, I will probably reread the solutions at some point as well to refresh myself on various details. Perhaps, later, I will try to redo some of the problems without looking at the solutions again. StatisticsMan (talk) 00:02, 25 June 2009 (UTC)
- Your dilemma is understandable. It is often the case that exams, although they test one's ability, are often not very useful. In particular, I think that one should not sacrifice a good understanding for good grades (if I have a perfect understanding and a D grade, I would be happier than if I had a poor understanding and an A grade), but I am not the one in your position! I think that you should attempt a problem for around 30 minutes, and if you cannot solve it, seek help. Often, reading something (such as a solution) does not aid in one's understanding. For instance, if I were memorizing some words from the dictionary, unless I write them down, I would probably forget the words in due time; even if I had looked at the word for at least 30 minutes. Therefore, if you at least attempt a problem (and then ask for the solution), not only will it help your memory (you will not go blank in the exam), but it will also, if your attempt is successful, provide you with another approach to a problem that we may not be able to give you. I also think that successfully solving many problems before an exam boosts your confidence as well as helps your intuition more than a mere solution we may be able to provide you. However, I am probably not the one to tell you what to do, so you should probably continue what you feel as best preparation for the exam. --PST 10:33, 24 June 2009 (UTC)
- Yea, sorry, the point is the rationals in [0, 1]. I think I get what you're saying Meni. Thanks for the help. As far as the last comment, I disagree. I have only limited time. I do not think I would have ever figured this out. But, now that I have seen a probable solution, and now that I will go through and make sure it makes sense to me and write it up in detail, then I will understand it and have a bit of intuition I didn't have before. If I can do this with lots of problems, then I built lots of little bits of intuition, as well as much technique and theory. As far as spending hours on a problem, I just spent the last two semesters doing that on most homework assignments for real analysis. Once we, often as a group, figured out a problem, in the writing up process is when I actually learned things. Thinking about a problem for hours and not getting anywhere is not helpful to me. I am trying to know how to do as many problems as possible before the test. That will be very helpful. StatisticsMan (talk) 02:26, 24 June 2009 (UTC)
- Numerically, the sum for the standard enumeration (the one you gave in the original post) seems to converge to 1.83019344534825... . To prove that it converges I would try to find an upper bound on , the denominator of . Since (for ), this should allow you to bound the sum by a convergent sum. -- Meni Rosenfeld (talk) 11:50, 24 June 2009 (UTC)
Inequality
[edit]How would you go about showing that ≤1? I don't know where to start. Thanks Scanning time (talk) 20:24, 23 June 2009 (UTC)
- Never mind - just found the single turning point at t=0 and then found the value of the second derivative at this point, which is negative so it must be a maximum. Scanning time (talk) 20:28, 23 June 2009 (UTC)
- Right. It may be of interest for you to recall that for all real x the sequence (1+x/n)n converges to ex and it is increasing as soon 1+x/n ≥ 0, that is, as soon as n ≥ -x. This gives you a lot of inequalities, for instance, yours 1-t ≤ e-t (that of course also holds for all t>1) --pma (talk) 09:58, 24 June 2009 (UTC)
- You can just start the inequality , substitute to get , then divide by (which is always positive) to get . --76.91.63.71 (talk) 18:14, 24 June 2009 (UTC)
Empty mean
[edit]I'm reading a programming book in which the author gave an example method which takes an array of doubles and returns their mean. If the array is empty, the function returns 0, which the author explains with the comment "average of 0 is 0". This annoyed me quite a bit, since the author is obviously confusing the mean of no terms with the mean of a single zero term. IMO the function should return NaN (or throw an exception), since an empty mean is 0/0.
Does anyone have any further input on the matter? More importantly, is anyone aware of an online resource discussing this (my search in Wikipedia and Google didn't come up with anything)? Thanks. -- Meni Rosenfeld (talk) 22:59, 23 June 2009 (UTC)
- The standard definition certainly breaks down and gives 0/0. There might be a standard convention for how to define it (similar to the conventions for various other empty things), but I don't know what it is and can't think of anything obvious. I think it should probably be left undefined. Consider the average of n 5's. That's obviously 5 for all n>0, so should be 5 for n=0. Similarly the average of n 3's should be 3 for n=0, but no threes and no fives are the same thing. --Tango (talk) 23:07, 23 June 2009 (UTC)
- Yes, saying that the mean of an empty list is 0 certainly sounds wrong. That the sum of an empty list is 0 is standard, but the length is also 0, and 0/0 = NaN. 208.70.31.186 (talk) 23:21, 23 June 2009 (UTC)
The mean is not just a linear combination of the values; it's an affine combination, i.e. a linear combination in which the sum of the coefficients is 1. As John Baez likes to say, an affine space is a space that has forgotten its origin. It has no "zero". The point is that if you decide, e.g., that the zero point is located HERE, and measure the locations of the points you're averaging relative to that, and I decide the zero point is located somewhere else, and likewise compute the average, then we get the same result! That's not true of sums, and it's not true of linear combinations in which the sum of the coefficients is anything other than 1. If the "empty mean" were "0", then there would have to be some special point called "0". Michael Hardy (talk) 23:30, 23 June 2009 (UTC)
...Just for concreteness: Say we're measuring heights above sea level, and you get 0, 1, and 5 (after measuring the heights at high tide). Your average is
(0 + 1 + 5)/3 = 2 feet above sea level. I measure the heights at low tide when the water is 4 feet lower, so I get 4, 5, and 9. My average is (4 + 5 + 9)/3 = 6 feet above sea level. You got 2 feet. I got 6 feet, when the water is 4 feet lower. So we BOTH got the same average height. But if it were correct to say the average of 0 numbers is 0, then should that 0 be your sea level, or mine? There's no non-arbitrary answer. So it doesn't make sense to say the "empty average" is 0. Michael Hardy (talk) 23:36, 23 June 2009 (UTC)
- I completely agree that the mean value of zero observations is generally undefined. Consider however that you want to estimate a probability by a relative frequency. The probability of success is (the limiting value of) the relative frequency of success for a large number of trials. P = lim i/n. Even if the number of trials is not large it is tempting (and very common) to estimate the unknown probability by the relative frequency: P ~ i/n. This is the mean value of a multiset of i ones (for success) and n−i zeroes (for failure). The case n=i=0 gives P ~ 0/0 which is undefined. However, we know better than that: we know that 0 ≤ P ≤ 1, and that is all we know. So the likelihood function f is f(P)=1 for 0 ≤ P ≤ 1 and f(P)=0 elsewhere. This function has mean value 1/2 and standard deviation about 0.29. So the mean value of zero (0,1)-observations is 1/2. Generally the mean value of the likelihood function, (which is a beta distribution), is (i+1)/(n+2), rather than i/n. The estimate P ~ i/n is a tempting (and very common) error. Note that for large number of observations it doesn't matter: lim (i+1)/(n+2) = lim i/n. Bo Jacoby (talk) 07:01, 24 June 2009 (UTC).
- I think this is equivalent to saying that if we want to use a sample to estimate the population mean, then with no data this will be just the mean of our prior. While certainly worth noting, it is inconsequential with regards to calculating the sample mean. -- Meni Rosenfeld (talk) 08:55, 24 June 2009 (UTC)
- Yes Meni. It often goes without saying that the purpose of computing a sample mean is to estimate the population mean. But the mean of the posterior is not always equal to the mean of the sample. And the mean of the prior probability can never be computed by the undefined mean of the empty sample. Bo Jacoby (talk) 09:22, 24 June 2009 (UTC).
- I think this is equivalent to saying that if we want to use a sample to estimate the population mean, then with no data this will be just the mean of our prior. While certainly worth noting, it is inconsequential with regards to calculating the sample mean. -- Meni Rosenfeld (talk) 08:55, 24 June 2009 (UTC)
Ok, thanks for the answers. Looks like we all agree, with different ways to look at it. Perhaps someone will be interested in adding a note about this to one of our articles (personally I've stopped editing articles)? -- Meni Rosenfeld (talk) 08:55, 24 June 2009 (UTC)
- I got the impression that wikipedians have a peculiar taste for trivial objects and trivial cases in mathematics. I remember interesting threads about and ; empty sums and products; empty limits and co-limits in category theory as well as terminal and initial objects, and their ubiquity; the empty function and empty permutation; 00, 0!, ; 0-th order iterations of several constructions; derivatives and antiderivatives of order 0; orientations of a zero-dimensional manifold; 0 as a limit ordinal,... and what I'm forgetting? Certainly the empty average deserves a place among them. Moreover, these topics seem to be recurrent here, which is maybe a good enough reason for writing a short article, e.g. Mathematical trivialogy. --pma (talk) 11:12, 24 June 2009 (UTC)
- Are you sure it's only Wikipedians? I am of the opinion that
- Properly acknowledging the trivial\empty\limit cases can go a long way towards simplifying notation, definitions and proofs, and
- If someone doesn't understand these cases, they don't truly understand the general case either.
- This being the case, it is healthy for any mathematician to ponder these matters, and I bet most do. -- Meni Rosenfeld (talk) 11:41, 24 June 2009 (UTC)
- Indeed. I have even seen respect for trivial cases described (in the context of history of mathematics) as one of the characteristic features of the modern trend towards generalization and abstraction. Algebraist 11:49, 24 June 2009 (UTC)
- Are you sure it's only Wikipedians? I am of the opinion that
- I got the impression that wikipedians have a peculiar taste for trivial objects and trivial cases in mathematics. I remember interesting threads about and ; empty sums and products; empty limits and co-limits in category theory as well as terminal and initial objects, and their ubiquity; the empty function and empty permutation; 00, 0!, ; 0-th order iterations of several constructions; derivatives and antiderivatives of order 0; orientations of a zero-dimensional manifold; 0 as a limit ordinal,... and what I'm forgetting? Certainly the empty average deserves a place among them. Moreover, these topics seem to be recurrent here, which is maybe a good enough reason for writing a short article, e.g. Mathematical trivialogy. --pma (talk) 11:12, 24 June 2009 (UTC)
- Hey... I have the feeling that you may have taken my preceding post as hyronic. It was definitely not. I am really thinking to this article as a possibly nice and useful reference, for reasons that you have already expressed (foundational, hystorical, didactic). What maybe causes the misunderstanding is the use of the word "trivial", that sounds reductive, and does not make justice to these fundamental concepts in mathematics (as usual, the most basic and simple ideas came the last). There is one further reason I think. The aesthetic taste, humor included, for them, is one of those things that make a difference between mathematicians and the rest of the world, and one of the most difficult to communicate --I guess, because the elegance of ideas in mathematics relies mostly on how they work, which is of course something that a working mathematician feels better (how to explain to a non-mathematician the comfort of constructing n-spheres starting form the 0-sphere, or the ordinals from the empty set? &c)--pma (talk) 14:23, 24 June 2009 (UTC)
- I understood that you were being serious - the thing is that your usage of words like "Wikipedians", "peculiar", "recurrent here" seemed to suggest that you think dealing with trivial cases is neither common nor particularly desirable. -- Meni Rosenfeld (talk) 19:21, 24 June 2009 (UTC)
- Maybe I should have said we wikipedians --well, I did not for shyness. Yes, I do not see it as a common habit, deserving particular attention to trivial cases in the discussion of definitions and theorems. Though it is desirable for the sake of complete understanding, as we said, and I myself partecipate with pleasure to these debeats. That said, there is also a kind of peculiar humoristic aspect in looking at zero-cases, that I suppose you feel too. --pma (talk) 08:16, 25 June 2009 (UTC)
- Actually, my point is that trivial cases should not receive "special treatment". The definition should be phrased from the get-go to seamlessly include the trivial case. Only when the application of the general definition to the trivial case is not clear does it deserve "particular attention".
- My other point is that virtually all mathematicians prefer such seamless definitions and understand how they apply to trivial cases. Does "I do not see it as a common habit" mean you disagree with this? -- Meni Rosenfeld (talk) 11:59, 25 June 2009 (UTC)
- Well, talking about didactics, the fact that many people here are asking for explanations about e.g. the topics I quoted above suggests to me that their teachers did not have time to clarify these points enough (what's understandable). Of course, a theorem or a definition is generally stated so as to cover all cases. But to see the colour it takes in all contexts, trivial ones included, often wants a certain effort. --pma (talk) 00:09, 26 June 2009 (UTC)
- Maybe I should have said we wikipedians --well, I did not for shyness. Yes, I do not see it as a common habit, deserving particular attention to trivial cases in the discussion of definitions and theorems. Though it is desirable for the sake of complete understanding, as we said, and I myself partecipate with pleasure to these debeats. That said, there is also a kind of peculiar humoristic aspect in looking at zero-cases, that I suppose you feel too. --pma (talk) 08:16, 25 June 2009 (UTC)
- I understood that you were being serious - the thing is that your usage of words like "Wikipedians", "peculiar", "recurrent here" seemed to suggest that you think dealing with trivial cases is neither common nor particularly desirable. -- Meni Rosenfeld (talk) 19:21, 24 June 2009 (UTC)
- Hey... I have the feeling that you may have taken my preceding post as hyronic. It was definitely not. I am really thinking to this article as a possibly nice and useful reference, for reasons that you have already expressed (foundational, hystorical, didactic). What maybe causes the misunderstanding is the use of the word "trivial", that sounds reductive, and does not make justice to these fundamental concepts in mathematics (as usual, the most basic and simple ideas came the last). There is one further reason I think. The aesthetic taste, humor included, for them, is one of those things that make a difference between mathematicians and the rest of the world, and one of the most difficult to communicate --I guess, because the elegance of ideas in mathematics relies mostly on how they work, which is of course something that a working mathematician feels better (how to explain to a non-mathematician the comfort of constructing n-spheres starting form the 0-sphere, or the ordinals from the empty set? &c)--pma (talk) 14:23, 24 June 2009 (UTC)
Taking the mean of an empty set could be an arbitrary convention, and it is possible that there are circumstances where this would be useful. On the other hand I think it is more likely to arise as a result of a fundamental difficulty which many (perhaps most) people have in connection many ideas related to zero and empty sets. I have had considerable difficulty in trying to convey to non-mathematical people that a value not existing is not the same as the value existing and having the value zero (for example, how many daughters has the king of Germany?). Likewise conveying the distinction between an empty set and no set. A final example is people who are convinced that 12÷0 must be 0. It seems that to many people it is very difficult to conceive of anything involving 0 which produces anything other than 0. On the other hand it once took me a considerable time to persuade someone (of fairly average intelligence in most respects) that 6×0 was 0. He said "if you start with 6 and then do nothing you must still have 6". I eventually persuaded him that it was possible to meaningfully have an operation involving 0 which did not mean "do nothing", but it was hard work. Another example is people who feel 0!=1 is completely unnatural. Zero is a surprisingly confusing and difficult concept for many people. JamesBWatson (talk) 11:47, 24 June 2009 (UTC)
- (indentation confusion: this is to JamesBWatson) In some senses, your question about Germany has to have the answer 0, because the set {girls having a parent that is king of Germany} has no elements. I'm not sure why (aside from having an easier/less-ambiguous formulation in terms of set theory) that question is answerable when "How old is the king of Germany?" isn't. --Tardis (talk) 14:40, 24 June 2009 (UTC)
- Because you've twisted the question. The question was not 'how many girls are there whose parent is a king of Germany' but rather 'how many daughters does the king of Germany have'. The former makes sense if there is no king of Germany (or indeed if there are many), but the latter (by its use of a definite article) presupposes that there is exactly one king of Germany. Algebraist 14:49, 24 June 2009 (UTC)
- Sure, the mean is not really 0 if you have no values, but you have to start from some number that's not NaN or else the recursion algorithm to compute the mean won't work. Zero will do just like any other number. – b_jonas 05:08, 25 June 2009 (UTC)
- What recursion algorithm? If you mean , then that's neither efficient nor intuitive, and I see no reason to consider it at all. -- Meni Rosenfeld (talk) 11:59, 25 June 2009 (UTC)
A difficulty leaning mathematics is that the meaning of the word "many" changes from signifying three or more to signifying zero or more. Asked "how many?" a mathematician may answer "zero" while a nonmathematician answers "no, not many, not even one". To the nonmathematician "empty set" and "number zero" is nonsense because empty is not a set and zero is not a number, as you don't count to zero. Redefining common words must be carefully explained. Bo Jacoby (talk) 06:48, 25 June 2009 (UTC).
- I have never met anyone who would not consider zero to be a number, or would answer a 'how many' question in that strange fashion. Is this some bizarre regional difference? Algebraist 12:07, 25 June 2009 (UTC)
Well sir, you wrote that you "have never met anyone", not that you did meet zero. So you yourself prefer to express zero by "never anyone". If I said that I knew many more examples, wouldn't you understand "many more" to mean more than zero more? Bo Jacoby (talk) 23:13, 25 June 2009 (UTC).
- Yes, but that's not relevant to either of the claims I questioned above. Algebraist 10:00, 26 June 2009 (UTC)
- Assuming that you have not killed anybody, would you confess that you have killed a number of people? As a matematician you consider zero to be a number, right? I would advice against it. Mathematicians should not forget the world outside the ivory tower. Bo Jacoby (talk) 07:48, 27 June 2009 (UTC)
I have a better answer than all of the above. People expect the mean to be a kind of average. Like, "what weight girl (average) is at that Linux users group meeting"... Well the word average in that question is ambiguous, but whether the person would find the mean, the median, or the mode the information of greatest interest, for any of the three THEY WOULD IMMEDIATELY understand the meaning of the answer "empty set", and this is the correct result returned. I'm therefore quite sure that this is the function's best response, as anyone asking the question would understand this answer to mean there are't any girls. By contrast 0 implies zero-G conditions (without any implication of nobody being there) while NaN would seem to say "the numbers on the scale don't go up that far"... :) 193.253.141.64 (talk) 21:41, 25 June 2009 (UTC)
- and I have another argument for the empty set being the correct result: when people ask for the AVERAGE, and they mean the mode (most common value), it is perfectly correct to say "3 and 4" (if those two appear the most times, and the two appear an equal number of times). So if you can ASK for the average, and GET the set (3, 4), it means you are ALREADY intuitively prepared to receive a set rather than just an integer. Therefore ASKING for the average, and GETTING the set () would obviously and clearly tell you that there is nothing to choose among. Like, I ask for the mode and get (3,4) so I know there are more 3's and 4's than anything else. I ask for the mode and get (3, 7, 15, 21, 35), and I know those are some values in the data that appear at least once. I ask for the mode and get () then I know there isn't ANY value in the data that appears even once. Really, it is just a historical coincidence that the median is not returned in the same way for data with an even number of values, as it would make sense to ask for the "median" household income in this neighborhood of 10 houses and get (60000, 90000) -- and this answer is more informative than the "official" answer of a median of 75000, as the latter intuitively has the implication of there being a "middle" family at just that level -- however, this is true only for an odd number of data items. As for arithmetic average (ie the mean, what the question is about), if there is ONE data point, you just get the set back -- the average is the whole set. To me it makes perfect sense to extend that to "zero or one data poits" -- you just get the set back, ie either a single value, or an empty set. That's because in the case of 0 or 1 data points, there is nothing to AVERAGE. You dont need to add up items and divide, as the very word ADD makes no sense whatsoever without at least 2 operands. You cant add up the number 7. If I ask you to add up the number 7 and tell me the result, you would feel that this is an ungrammatical question. So you are already cheating on the definition of arithmetic mean, as it does not consist of adding the items together and dividing by the number of items -- it consists of this only when there are at least two. For one item, you just get it back. At least to my lispy, perly, pythony mind, the above explanation implies totally strongly that for a function for calculating the mean which you pass (), you should get back (). Same goes for the median and the mode. --82.234.207.120 (talk) 10:57, 26 June 2009 (UTC)
- There are numerous flaws in the above responses.
- the answer "empty set"... correct.... No, the empty set is the correct answer to "who are the girls in that group", not to "what is their average weight".
- 0 implies zero-G. I have no idea how we suddenly got to the gravitational field in outer space.
- NaN would seem to say "the numbers on the scale don't go up that far". No, that's not what NaN is. What you're describing is PositiveInfinity.
- Re sets as values for averages: This does not work for the mean, which is a precisely computed single real number. As for medians and modes - this only works if you agree that they returns sets consistently. It doesn't make sense to return a number sometimes and a set at other times. For mode in particular, if you want it to return a set, I would define it "the set of all numbers having the maximum frequency". Thus the empty mode would be rather than , since all numbers have the maximum frequency, 0. For the median, returning a set is not useful at all, since it is harder to represent and to use in calculations.
- ADD makes no sense whatsoever without at least 2 operands. That may be true for high-school arithmetic, but in real mathematics there is no problem at all calculating the sum of 1 or 0 terms.
- In short, I strongly disagree with your suggestion of using an empty set as the value of an empty mean. -- Meni Rosenfeld (talk) 12:20, 26 June 2009 (UTC)
- There are numerous flaws in the above responses.
- You seem to miss the basic point that we are discussing a function whose return type is a floating-point number (a double). Since the empty set is not a floating-point number, it cannot be returned by the function. The IEEE 754 NaN ("not a number") is designed for exactly this kind of circumstances, and it should be the result of the function, just like the OP said. (0/0 gives NaN for the same reason.) NaN most definitely does not mean "the numbers on the scale don't go up that far", that's what the infinities are for. — Emil J. 12:02, 26 June 2009 (UTC)
- That too, however, personally I'm more interested in an abstract mathematical discussion. -- Meni Rosenfeld (talk) 15:18, 26 June 2009 (UTC)
- You seem to miss the basic point that we are discussing a function whose return type is a floating-point number (a double). Since the empty set is not a floating-point number, it cannot be returned by the function. The IEEE 754 NaN ("not a number") is designed for exactly this kind of circumstances, and it should be the result of the function, just like the OP said. (0/0 gives NaN for the same reason.) NaN most definitely does not mean "the numbers on the scale don't go up that far", that's what the infinities are for. — Emil J. 12:02, 26 June 2009 (UTC)
Let me address the zero-G comment first, then we could go on to the other parts of my argument if there is no dispute. The zero-G comment is to show that returning zero is absolutely wrong and should be out of the question in all cases - it should not even be considered for a second. I realize this isn't the physics ref desk, so let me illustrate with an even more forceful example. Go ahead and answer the following question:
“ | In reflecting over all the times you have shot somebody in the face, what is the average number of warning shots you fired first? | ” |
What is your answer? I don't think any of us here would answer 0 to that question, and that is because 0 is not an appropriate answer. So as mathematicians, how would YOU answer it? I know when *I* reflect over all the times I have shot somebody in the face, I come up with the empty set! The average distance in centimeters the tip of the barrel was from their face? Empty set. Average number of beers I had prior to shooting them? Empty set. Average number of times I shot each person? Empty set. Why... What are YOUR answers to these questions?
Can we agree on this much: zero is totally inappropriate for any of the above questions, and more generally, for the average of an empty set... --82.234.207.120 (talk) 13:52, 26 June 2009 (UTC)
- My response to that question would be to refuse to answer, saying that a wrong question cannot have a right answer. Since "average" is undefined for empty sets, asking about the average of shots assumes that there were any shots, which is wrong, thus making the question void.
- Returning to the empty mean, the correct response is either no answer at all (programmatically, an exception) or, if we agree to define 0/0 as an entity called "NaN", it would be it. So 0 is incorrect. But - if we are forced to choose a real number as an answer, 0 would probably be the least wrong. IIRC, defining 0/0=0 causes less contradictions than other arbitrary choices. -- Meni Rosenfeld (talk) 15:18, 26 June 2009 (UTC)
- I think you're making a mistake in thinking that the mean of an empty set has no sensible value. Usually when you compute a mean what you're aiming for is a best approximation to some quantity of interest based on noisy measurements. The mean of an empty set is an approximation based on no data. There is an ideal answer in that case, namely the actual value of the quantity, but in the absence of data you can't guess that, so you return "I don't know". That's what a NaN in IEEE floating-point arithmetic represents: an unknown value. It doesn't really mean "not a number"—there might well be a correct floating-point answer, but the calculation failed to produce it for some reason (consider for example). The correct return value here is not "no possible answer" but "could be anything". It might be appropriate in certain cases to return zero in the absence of any data. Probably, though, if you wanted a bias toward zero in the absence of data you would want the bias to disappear gradually as you added more data points, not immediately when the first data point arrived, so you wouldn't really be computing the mean. -- BenRG (talk) 15:25, 26 June 2009 (UTC)
- This brings us back to my exchange with Bo. I'll emphasize again the difference between the sample mean - which is precisely calculated by some formula, and the population mean - which has some unknown value we would like to estimate using, among other things, the sample mean. If the data is , then the answer to "what is the population mean?" is "could be anything, but based on the available information it is likely to be around 2", while the answer to "what is the sample mean?" is "it is 2". If there is no data, the answer to "what is the population mean?" is either "could be anything, and I don't have enough information to even begin to know it" or "could be anything, but based on my prior assumptions it is likely to be around 0 [or something else]". But there is no answer to the question "what is the sample mean?". -- Meni Rosenfeld (talk) 15:49, 26 June 2009 (UTC)
You can rationalize it all you want, but the fact remains that the concept of an average EXISTS to be a "typical" item that is middling in the data. Further the concept of the empty set exists to represent the absence of any items. I suppose you think asking for even primes above two should throw some obscure error too? A middling reduction of no items would be "no item" not a result like 0/0... 193.253.141.80 (talk) 04:26, 27 June 2009 (UTC)
I realize what the problem is: you're mathematician, while I am smarter than mathematics. Here is an example: the fact that the definition of median is WRONG - for an even number of items the median should be the middle two items - NOT their average. Mathematics is wrong. But you, being a mathematician, and not smarter than math (unlike me), would say "a definition can't be 'wrong' - it just is.". Well you would be wrong in that assertion. Mathematics simply is wrong on the definition of the median, and as for the average of the empty set, I don't know what mathematics (and hence mathematicians like you) have to say on the subject, but the correct answer, the TRUTH is that the average is the empty set. 193.253.141.80 (talk)|
- The purpose of computing an average value is, I suppose, to simplify a complicated situation. Say, the height of individuals. Measuring and listing 5000000000 heights is not worth while. The huge amount of data may be called a statistical population or a multiset of numbers. It is a multiset rather than a set because the same number might occur several times. As a characteristic measure there are several possible choices. One is to pick any random element. Another possibility is to compute the arithmetic mean of the elements of the population. This is called the population mean. User 193.253.141.80 seems to define a TRUE median, TRUE written with upper case letters, like this: If the population is empty then the TRUE median is the empty set; else if the number of elements of the population is odd then the TRUE median is a one-element set containing only the median; else the TRUE median is a two-element multiset containing the two central elements of the ordered list of the population. So: TRUE median({})={}, TRUE median({1})={1}, TRUE median({1,2})={1,2}, TRUE median({1,2,3})={2}, TRUE median({1,2,2,3})={2,2}, etc. The TRUE median is well defined, but it is not practical, and it is not standard. The standard median is not practical either, and it is undefined for the empty population. The arithmetic mean is practical, but it is also undefined for the empty population. Often the population multiset is only partially known by means of a submultiset, a sample. The sample may provide information of the population. A sample mean is often a good estimate of the population mean. The TRUE median of a sample is not a good estimate, because the sample does not tell whether the number of elements in the population is even or odd, nor does an empty sample indicate that the population is empty. Bo Jacoby (talk) 07:48, 27 June 2009 (UTC).
Of course it is well-defined: I said I was smarter than mathematics, not that I was a crank! Anyway I don't need mathematics, mathematics needs me. Your argument about the data being a sample is ridiculously inapplicable to the question, as the empty set is certainly not a sample of anything.... It would mean you didn't collect data at all. The average data item you collected was likewise nothing at all. The only motive you might have for hiding this fact about the average data item you collected is if you wanted to bill for collecting the sample, by making it seem like there was work done collecting the samples, but you ended up excavating samples that weren't numbers. You want to bill for an average sample of NaN whereas the truth is that you did no work at all, which would if you were honest be reflected in the fact that your "average" sample is the null set. More fully, there is not a single sample in your set of samples. Have the balls to report it rather than trying to compromise mathematics with a disinformation campaign to serve your own (or your employer's) narrow interests.193.253.141.64 (talk) 23:07, 27 June 2009 (UTC)