Wikipedia:Reference desk/Mathematics
of the Wikipedia reference desk.
Main page: Help searching Wikipedia
How can I get my question answered?
- Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
- Post your question to only one section, providing a short header that gives the topic of your question.
- Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
- Don't post personal contact information – it will be removed. Any answers will be provided here.
- Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
- Note:
- We don't answer (and may remove) questions that require medical diagnosis or legal advice.
- We don't answer requests for opinions, predictions or debate.
- We don't do your homework for you, though we'll help you past the stuck point.
- We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.
How do I answer a question?
Main page: Wikipedia:Reference desk/Guidelines
- The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
April 9
Minimum number of elements to produce an average
StackOverflow hates me, can you do better? I use a Web site where people vote on songs from 1 to 5 stars (integer). So if I see a score like 3.5, that might be two votes, 3 and 4. Given an overall score, how can I determine the minimum number of votes that could have produced that score? Equinox ◑ 00:33, 9 April 2022 (UTC)
- Write it as a fraction in lowest terms (e.g. 3.5 = 7/2); the denominator is your answer.--2406:E003:858:CA01:24BF:8EA6:3747:8373 (talk) 02:45, 9 April 2022 (UTC)
- That works if the fraction as a decimal fraction is exact. If it was obtained by rounding, that does not work. If the average is shown as 3.14, sure, it could be 157/50, but 22/7 rounded to two decimals is already 3.14. A very simple method is just to try successive denominators till you find one that does the job. So by the time you try 6, compute 6 × 3.14 = 18.84, which is closest to 19. Does that work? Let's see. 19/6 = 3.16666..., which rounds to 3.17. No cigar, so let's move on to the next try. 7 × 3.14 = 21.98, which is closest to 22. Does that work? 22/7 = 3.14159..., which rounds to 3.14. Bingo! Doing this by hand for a number like 3.29166 is not practical, but as a job run on a computer it will take only a millisecond or so. There are algorithms for expressing a real number as a continued fraction, which can be used to find best rational approximations. While more complicated, this may be faster by hand. The last two approximants of the continued fraction expansion of 3.29166 before they are close enough are 23/7 and 79/24. This means the simplest rational takes the form (23 + 79k) / (7 + 24k) for some positive integer k. The value of k needs to satisfy 3.291655 ≤ (23 + 79k) / (7 + 24k) ≤ 3.291665. Since the fraction in the middle equals (79 − 1/(7 + 24k)) / 24, we see that it increases monotonically with k, so we only need to pay attention to the left inequation. Solving this algebraically tells us that k has to be at least 8317/56 = 148.5..., and since k is an integer, we know now that we can take k = 149, which gives us (23 + 79×149) / (7 + 24×149) = 11794/3583 = 3.2916550+. So the least denominator that can explain the result 3.29166 is 3583. --Lambiam 08:32, 9 April 2022 (UTC)
- Perhaps simpler: The continued fractions for 3.291655 and 3.291665 are respectively [3,3,2,3,148,1,1,13,2] and [3,3,2,3,1041,2,1,2]. Find the first place where they differ, increase the lower of these two numbers by one, and lop off the rest, giving [3,3,2,3,149] = 11794/3583. —Tamfang (talk) 01:53, 12 April 2022 (UTC)
- Definitely less work, but this needs some refinement or elaboration for the case that one expansion is a prefix of the other. For example, for 3.14063, 3.140625 gives [3,7,9] while 3.140635 gives [3,7,9,48,1,2,1,1,4]. Then the shorter of the two will do if rounding can go either way. Also, due to rounding ambiguity, simpler fractions may occasionally be possible. For example, for 3.69812 this clever method finds 6113/1653 = 3.6981246..., but 5917/1600 = 3.698125 rounded down already produces 3.69812. --Lambiam 09:07, 12 April 2022 (UTC)
- Perhaps simpler: The continued fractions for 3.291655 and 3.291665 are respectively [3,3,2,3,148,1,1,13,2] and [3,3,2,3,1041,2,1,2]. Find the first place where they differ, increase the lower of these two numbers by one, and lop off the rest, giving [3,3,2,3,149] = 11794/3583. —Tamfang (talk) 01:53, 12 April 2022 (UTC)
- That works if the fraction as a decimal fraction is exact. If it was obtained by rounding, that does not work. If the average is shown as 3.14, sure, it could be 157/50, but 22/7 rounded to two decimals is already 3.14. A very simple method is just to try successive denominators till you find one that does the job. So by the time you try 6, compute 6 × 3.14 = 18.84, which is closest to 19. Does that work? Let's see. 19/6 = 3.16666..., which rounds to 3.17. No cigar, so let's move on to the next try. 7 × 3.14 = 21.98, which is closest to 22. Does that work? 22/7 = 3.14159..., which rounds to 3.14. Bingo! Doing this by hand for a number like 3.29166 is not practical, but as a job run on a computer it will take only a millisecond or so. There are algorithms for expressing a real number as a continued fraction, which can be used to find best rational approximations. While more complicated, this may be faster by hand. The last two approximants of the continued fraction expansion of 3.29166 before they are close enough are 23/7 and 79/24. This means the simplest rational takes the form (23 + 79k) / (7 + 24k) for some positive integer k. The value of k needs to satisfy 3.291655 ≤ (23 + 79k) / (7 + 24k) ≤ 3.291665. Since the fraction in the middle equals (79 − 1/(7 + 24k)) / 24, we see that it increases monotonically with k, so we only need to pay attention to the left inequation. Solving this algebraically tells us that k has to be at least 8317/56 = 148.5..., and since k is an integer, we know now that we can take k = 149, which gives us (23 + 79×149) / (7 + 24×149) = 11794/3583 = 3.2916550+. So the least denominator that can explain the result 3.29166 is 3583. --Lambiam 08:32, 9 April 2022 (UTC)
Shuffling sections of students
There are 4 classes of students in grade 1 each containing 30 students. When students are promoted to a higher grade they are shuffled randomly again in 4 sections. Presuming all students are always promoted, and the total count remains the same, by which grade is it guaranteed that for all students any given pair has at some point been in the same grade?
This seems like a problem of block designs to me, but I don't know how to solve it. -- Abdul Muhsy talk 06:25, 9 April 2022 (UTC)
- Did you mean "has at some point been in the same class"? (Also, in presenting something to be mathematically modelled, the use of consistent terminology can reduce confusion, so use either class or section but not both.) If the shuffling is truly random, it could produce, just by chance, the same partition for each next grade as that of the grade before. There needs to be some restriction, which could be that no class has the same composition as any earlier class, or the weaker restriction that the whole partition is different. --Lambiam 08:49, 9 April 2022 (UTC)
- Yes. I meant the same class. I realize now that random shuffling has no guarantee, in the way the problem is posed. Let me pose a different question: how to shuffle the students so that at some grade n any pair has shared a class at some point of time, and how to tell the least such n?-- Abdul Muhsy talk 09:34, 9 April 2022 (UTC)
- I get n=7. Divide students into 8 teams of 15 students and pair them off.
- 1: AB CD EF GH
- 2: AC BD EH FG
- 3: AD BC EG HF
- 4: AE BF CG DH
- 5: AF BE CH DG
- 6: AG BH CE DF
- 7: AH BG CF DE
- .. Modocc (talk) 13:39, 9 April 2022 (UTC)
- There is a somewhat obvious lower bound of and this design establishes as an upper bound. How do we know there is no design formed by a set of partitions? --Lambiam 15:46, 9 April 2022 (UTC)
- I don't know. The new relationships can be increased more rapidly by not grouping them as such. The OP did ask for a guaranteed outcome for some arrangement, so perhaps this one will be useful. Modocc (talk) 19:43, 9 April 2022 (UTC)
- A computer algorithm written by someone who is motivated can certainly brute force minimum class schedules. It would also be less tedious and more robust. --Modocc (talk) 21:50, 9 April 2022 (UTC)
- I'm afraid the running time will be prohibitively large. There are more than 56·1066 ways of forming 4 sets of 30 elements each from a given set of 120 elements (T(4,30) in OEIS A060540), which would be about the branching factor in a search tree. Or is there some clever way of pruning the search space? --Lambiam 10:27, 10 April 2022 (UTC)
- Searching all the permutations is unnecessary. For example, the first grade is arbitrary, thus those are not permutated. After that, any remaining groups of complete strangers are not permutated either, but in-groups of friends do form and these can be distributed as evenly as possible across the 4 classes in order to maximize the number of new friendships per grade. Modocc (talk) 12:09, 10 April 2022 (UTC)
- Distributing acquaintances (elements that at some time have shared a block) across different classes is a greedy heuristic like best-first search that may help to find a reasonable solution more quickly but does not guarantee optimality of the first solution found. It may help to prune when the best possible continuation from a node being visited cannot improve on the currently best full solution, but that will not help much in this case. Using the symmetry of anticliques in the acquaintancy graph reduces the number of combinations to be reduced somewhat. But this can only be used for more than one anticlique if they are disjoint and not connected in the acquaintancy graph by an edge, which after the first grade cannot be the case if they are maximal. The size of these anticliques after the first grade is at most 4, so I fear this can offer no more than a reduction by a factor 24 for the number of second grades to be considered, and probably at most 2 for only very few subsequent grades. --Lambiam 14:45, 10 April 2022 (UTC)
- I think I understand what you're driving at, but its not clear to me yet that it matters here, for its not so much a search algorithm, but an optimization program that maximizes the most number of possible new friends for each grade, hence I may have abused the term brute force when I said that above. Each grade is and has to be optimized, for example we have for the first two grades:
- Distributing acquaintances (elements that at some time have shared a block) across different classes is a greedy heuristic like best-first search that may help to find a reasonable solution more quickly but does not guarantee optimality of the first solution found. It may help to prune when the best possible continuation from a node being visited cannot improve on the currently best full solution, but that will not help much in this case. Using the symmetry of anticliques in the acquaintancy graph reduces the number of combinations to be reduced somewhat. But this can only be used for more than one anticlique if they are disjoint and not connected in the acquaintancy graph by an edge, which after the first grade cannot be the case if they are maximal. The size of these anticliques after the first grade is at most 4, so I fear this can offer no more than a reduction by a factor 24 for the number of second grades to be considered, and probably at most 2 for only very few subsequent grades. --Lambiam 14:45, 10 April 2022 (UTC)
- Searching all the permutations is unnecessary. For example, the first grade is arbitrary, thus those are not permutated. After that, any remaining groups of complete strangers are not permutated either, but in-groups of friends do form and these can be distributed as evenly as possible across the 4 classes in order to maximize the number of new friendships per grade. Modocc (talk) 12:09, 10 April 2022 (UTC)
- I'm afraid the running time will be prohibitively large. There are more than 56·1066 ways of forming 4 sets of 30 elements each from a given set of 120 elements (T(4,30) in OEIS A060540), which would be about the branching factor in a search tree. Or is there some clever way of pruning the search space? --Lambiam 10:27, 10 April 2022 (UTC)
- There is a somewhat obvious lower bound of and this design establishes as an upper bound. How do we know there is no design formed by a set of partitions? --Lambiam 15:46, 9 April 2022 (UTC)
- Yes. I meant the same class. I realize now that random shuffling has no guarantee, in the way the problem is posed. Let me pose a different question: how to shuffle the students so that at some grade n any pair has shared a class at some point of time, and how to tell the least such n?-- Abdul Muhsy talk 09:34, 9 April 2022 (UTC)
- 1: A B C D -4 new groups of 30 friends, 29 each, at most.
- 2: A B C D | A B C D | A B C D | A B C D
- or:7, 8, 8, 7 | 8,7,7,8 | 8,7,7,8 | 7,8,8,7 -moved 23 from each class, 22 or 23 new friends, at most, for which there is no better shuffle.
- Grade 3: A tad too exhausting for me now.
- Note that new relations between strangers is factorial, but between any two cliques x and y its only x*y. The program therefore optimizes each grade by shuffling cliques, which on a first approximation, each class happens to be a clique.
- If the number of students were slightly different, it would be possible to do it in 5 grades: divide the students into 16 equal groups, and assign the classes of each grade based on the finite affine plane of order 4. This is shown in the portion of the diagram within the pink line: in each section, each colour represents a class.
- It is not possible to directly make this work for 120 students by adjusting the sizes of the groups while keeping each class at size 30: the corresponding system of equations has a unique solution (with every group size being 7.5).
However, this does give a 6-grade solution for 120 students by making the 16 groups have size 7 and adding 4 more groups of size 2, as shown in the full diagram (the grey portion can be assigned arbitrarily).--116.86.4.41 (talk) 14:46, 13 April 2022 (UTC)- Correction: I have realised that it isn't actually a 6-grade solution, failing to pair the top-left large group with three of the small groups. --116.86.4.41 (talk) 13:21, 14 April 2022 (UTC)
April 13
Lemma?
"For all CM-points τ, the “singular moduli” j(τ) and the values of E4(τ)/η8(τ) and E6(τ)/η12(τ) are algebraic integers.", this is a lemma, like it is taught in college/university? Or any one tells you that? --ExclusiveEditor Notify Me! 16:18, 13 April 2022 (UTC)
- No idea on this specific statement, but in terms of form, it appears to qualify as a Lemma (mathematics), a short true statement that is part of a larger proof. Not sure if this one is true, or what its use is, but it is a lemma-like statement. --Jayron32 16:28, 13 April 2022 (UTC)
The lemma used here appears in "An efficient determination of the coefficients in the Chudnovskys’ series for 1/π" (on springer- An efficient determination of... on page 5(of pdf)/ 807 of papers.)--ExclusiveEditor --ExclusiveEditor Notify Me! 17:50, 13 April 2022 (UTC)
- This does not look like undergraduate material, and I don't think this is material routinely taught at the universities at the graduate level; if treated at all, it would be part of some specialized seminar. For one thing, the definitions of the Eisenstein series and are specific to this paper. If it was known material, it would have been published before. Instead of giving a proof themselves, the authors could then simply have referred the reader to the published proof, as they do for the statement that is an algebraic integer for all -points --Lambiam 22:56, 13 April 2022 (UTC)
I don't recognize the specific theorem or lemma, but the general "language" it uses is algebraic number theory. Particularly, it is talking about complex multiplication and the j-invariant. This is something that an undergraduate student could study if they wanted to pursue the topic, but it wouldn't be part of the regular curriculum for undergraduate math majors. A grad student specializing in number theory or related topics would have to study the general area (elliptic curves etc.) enough to read the paper, though the computation of pi specifically is a niche area that the Chudnovsky brothers (as well as the Borwein brothers, Jonathan and Peter) were leading figures. The Borweins published a book called "Pi and the AGM" with more material in this vein. 2601:648:8202:350:0:0:0:4671 (talk) 05:58, 15 April 2022 (UTC)
April 15
What does it mean when we say that data is normally distributed?
Suppose we have a set of data which is possibly infinite. When we say that the data is normally distributed, mathematically what do we mean? My understanding is that we consider the probability space where is the sigma algebra of all real Borel sets, where is the normal PDF with the mean and variance given by the descriptive data. On this probability space we further have the identity function as a random variable . Now the statement that the data is normally distributed means (according to my understanding), that the frequency polygon of the data coincides (approximately) with the graph of the PDF. I have not been able to find this written anywhere however, and hence I am asking this question to clarify whether my understanding is correct or not? Is it correct, and if so can it be made more rigorous. If not, what is the correct meaning of saying that the data is normally distributed.-- Abdul Muhsy talk 07:26, 15 April 2022 (UTC)
- The term is often used somewhat loosely, not to say sloppily, when the authors actually should have said that the sample distribution is not significantly different from a (best-fit) normal distribution, as might be revealed by a normality test. Probably, the test they applied was the squinting test: squinting their eyes and noticing some similarity. In such cases one should not be surprised they are not more precise. Are you aware of cases where the claim is applied to an infinite set? --Lambiam 09:37, 15 April 2022 (UTC)
- Thanks. The first option given by you, (given a set of data apply a normality test and if there isn't sufficient evidence to reject normality, then it is normal) is rigorous enough but a person not well versed in statistical theory will probably not understand the justification easily. Your second criteria of squinting is somewhat similar to my undersanding and seems more satisfying visually. To clarify, are we taking the frequency polygon (after standardizing the data), squinting and then 'seeing' whether it is resembling N(0,1)? If so, is standardizing necessary? Thirdly, to answer your question I think it is possible to construct a number whose digits follow any given distribution but I am not competent enough to understand fully the proof [1]-- Abdul Muhsy talk 11:43, 15 April 2022 (UTC)