Wikipedia:Reference desk/Archives/Mathematics/2017 February 22

= February 22 =

Theories concerning the interrelationship of congruence classes of a certain form
I'm looking for references to any theoretical works pertaining to possible relationships between the quadratic residues of prime moduli (specifically "safe" primes here, although just primes in general will probably do) with respect to those of all other prime moduli. Just to be clear I'm basically asking what, if any, correlations can be found between the residues (X*X) mod M1 and (X*X) mod M2 for arbitrary X where M1 and M2 are both (safe) primes? I've had absolutely no luck at all locating anything worth mentioning - it's almost as if it's a topic that just hasn't been covered yet in mathematics, though I really have a hard time believing the likelihood of that. Am I just looking in the wrong places? Earl of Arundel (talk) 09:19, 22 February 2017 (UTC)

Creating Images, Graphs, and Animations
What are some preferred (or optimal) ways to create graphs and animations for wikipedia? I occasionally see images/graphs/animations where the code is posted within the picture details (such as GNU plot, or matPlotLib python code). I find that mathematics articles with these kinds of visuals can be very informative and useful. [https://commons.wikimedia.org/wiki/Commons:Help_desk#Looking_for_Recommendations_on_Software_to_make_Graphs.2C_Animations.2C_etc. I made a post in the help desk of WikiMediaCommons] to ask a somewhat related questions. Popcrate (talk) 16:04, 22 February 2017 (UTC)


 * Animated GIFs are good for short animations, but the limit of 256 colors per frame means you wouldn't want to use it for live-action. Works well for many math topics, though, like showing a plane cutting through a cone at various angles to create conic sections. StuRat (talk) 16:07, 22 February 2017 (UTC)


 * You may want to check in with the folks at Graphics Lab who work in this area. You can probably find standards for graphics files there, as well as a bunch of like-minded Wikipedians who are already working in the field.  -- Jayron 32 16:31, 22 February 2017 (UTC)
 * I’ve used Inkscape to generate images for articles. It generates SVG files, which are just text files so you may see them posted. The easiest way to get started with it is download an existing image and use that as a starting point, rather than starting from scratch. Wikipedia’s licence means you can modify any of the images here, as long as you give attribution. Animations are trickier: the one I did I also used Inkscape to produce frames, saved them out as GIF files, then merged them with a tool that is no longer supported.-- JohnBlackburne wordsdeeds 16:52, 22 February 2017 (UTC)

Thank you, everybody, for all the great replies!! I'm off to the graphics lab, and will return with some (hopefully) fantastic images and graphs! Popcrate (talk) 01:55, 23 February 2017 (UTC)

Three &zeta;-like Products
It is known that the infinite series $$\zeta(k)=\sum_{n=1}^\infty\frac1{n^k}$$ can be factored, and that its multiplicative inverse can be written as an infinite product of the form $$\frac1{\zeta(k)}=\prod_{prime~p}\left(1-\frac1{p^k}\right),$$ with p prime. I was wondering to what infinite series the multiplicative inverses of the following infinite products might correspond: Initially I thought, for instance, that the middle one could be expressed as $$g(k)=\sum_m\frac1{m^k},$$ where m stands for all numbers whose prime factorization is of the form $$m=\prod_j(2p_j)^{a_j},$$ but it would seem that this is incorrect, since their two values do not match numerically, being very close to —but ultimately distinct from— one another. — 79.113.237.153 (talk) 16:28, 22 February 2017 (UTC)
 * $$\frac1{f(k)}=\prod_{prime~p}^{p~>~2}\left(1-\frac{2^k}{p^k}\right)$$
 * $$\frac1{g(k)}=\prod_{prime~p}\left[1-\frac1{(2p)^k}\right]$$
 * $$\frac1{h(k)}=\prod_{semiprime~s}\left(1-\frac1{s^k}\right),$$ with s semiprime.


 * For things like the first two, just use the usual tricks that get you the sum-product identity for the zeta function in the first place:
 * $$ \begin{align}

\prod_{p \text{ prime}} \frac{1}{1 - x p^{-s}} & = \prod_{p \text{ prime}} \sum_{j \geq 0} x^j p^{-sj} \\ & = \sum_{n = p_1^{a_1} \cdots p_k^{a_k}} (x^{a_1} p_1^{-sa_1}) \cdots (x^{a_k} p_k^{-sa_k}) \\ & = \sum_{n \geq 1} x^{\Omega(n)} n^{-s} \end{align} $$
 * where Ω is the function described here. (In your cases we have $$ x = 2^{\pm s}$$.)  You can play the same game with the third, but it's more complicated: when you play the game you pick up a coefficient counting the number of factorizations of n as a product of powers of semiprimes. --JBL (talk) 21:49, 22 February 2017 (UTC)

Chi-squared test
I have test statistics between categories A and B, and between A and C. Is there any neat relationship/inequality for a test statistic between B and C, exploiting the known test statistics? I'll say that I have the degrees of freedom for each statistic.--Leon (talk) 20:30, 22 February 2017 (UTC)


 * I would think not. Consider the following case:

A = It being a Monday. B = Percentage of people calling in sick to work. C = It being a legal holiday.


 * You may well find a correlation between A and B, in that people often may try to extend their weekend by a day, and between A and C, as legal holidays are sometimes also chosen for that reason. But the correlation between B and C should be zero, as what's the point in calling in sick if you already have the day off ? StuRat (talk) 20:58, 22 February 2017 (UTC)


 * Bad example: there's a strong negative correlation between the two! Nobody calls in sick when it's already a holiday!--Leon (talk) 21:17, 22 February 2017 (UTC)


 * Yes, but the positive correlation between (A and B) and (A and C) would not have allowed you to predict the strong negative correlation between (B and C). StuRat (talk) 22:56, 22 February 2017 (UTC)


 * But to give a pure mathematical answer, let's say that A is the resultant waveform when two sine waves B and C with different amplitudes and period are added together. Some correlation would be expected between (A and B) and (A and C), but that doesn't imply any correlation between (B and C). StuRat (talk) 23:01, 22 February 2017 (UTC)


 * Copula (probability theory) offers something somewhat similar. But be careful, applying without full understanding of how they work and what their limitations are can have undesirable side effects, like the 2008 financial crisis:
 * "The limitations of a widely used financial model also were not properly understood." Such meddling with unknown forces "will go down in history as instrumental in causing the unfathomable losses that brought the world financial system to its knees."
 * Do not delve too greedily and too deep... SemanticMantis (talk) 22:05, 22 February 2017 (UTC)


 * I would think that you could look at it this way. You have variables X, Y, Z with data points $$x_1, ...,x_n; \,\, y_1, ..., y_n; \,\, z_1, ..., z_n.$$ The chi squared statistic between any two variables is
 * $$\chi^2_{XY}=f(x_1, ..., x_n; y_1, ..., y_n)$$
 * $$\chi^2_{XZ}=f(x_1, ..., x_n; z_1, ..., z_n)$$
 * $$\chi^2_{YZ}=f(y_1, ..., y_n; z_1, ..., z_n)$$


 * You only assume knowledge of $$\chi^2_{XY}$$ and $$\chi^2_{XZ}.$$ So the unknowns are all the x's, y's, and z's, and $$\chi^2_{YZ}.$$ So you have a system of 3 equations in 3n+1 unknowns, which is underdetermined and can't be solved uniquely. Loraof (talk) 01:24, 23 February 2017 (UTC)


 * (Leon): You also asked for an inequality relationship. If your test statistic is the Pearson correlation coefficient, the correlation matrix, with  i,j  element $$\rho_{ij}$$ and hence 1s on the main diagonal, is always positive semi-definite and hence has a non-negative determinant. Thus


 * $$-\rho_{23}^2 +\rho_{23}(2\rho_{12}\rho_{13}) +(1-\rho_{13}^2-\rho_{12}^2)\ge 0.$$


 * Plotting this against $$\rho_{23},$$ it is concave from below, so $$\rho_{23}$$ must be between the critical values that make the expression 0:


 * $$\rho_{23}^{crit}=\rho_{12}\rho_{13} \pm \sqrt{\rho_{12}^2\rho_{13}^2+(1-\rho_{12}^2-\rho_{13}^2)}.$$


 * These are the upper and lower bounds on $$\rho_{23}.$$ For example, if $$\rho_{12}=1/2=\rho_{13},$$ then $$\rho_{23}\in [-1/2,1].$$ Loraof (talk) 18:24, 23 February 2017 (UTC)