Jump to content

Wikipedia:Reference desk/Mathematics

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Tardis (talk | contribs) at 04:16, 28 August 2017 (Wikipedia article about adding subtracting dividing and multiplying two PDF: terminology; change of variables; full inverses). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Welcome to the mathematics section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

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.
See also:


August 23

Statistical estimation

I thought this was a stats-101 straightforward math question, but thinking about it more, it could be somewhat open ended. Basically I know X's shoe size and I want to guess his or her height, by the following method:

  1. Round up N=1000 (say) people and measure the height and shoe size of each one (assume X is drawn from the same population as this sample). Enter all the data in a big spreadsheet.
  2. Figure that height H and shoe size S are each about normally distributed, and correlated. Do some calculations (this is the part I need help with) on the spreadsheet data, to get a maximum likelihood estimate (hopefully with a confidence interval) of X's height given X's shoe size.

My question: how do I do step 2 above? (Step 3 is of course "Profit!!!"). In the simple version, it's ok to assume H and S's distributions are exactly normal, so it's a matter of estimating the parameters and figuring out a joint distribution somehow. But otherwise maybe messier techniques like Lowess could be involved.

Thanks!

(No this isn't homework, just something I've been thinking about).

173.228.123.121 (talk) 07:54, 23 August 2017 (UTC)[reply]

See Multivariate_normal_distribution#Estimation_of_parameters I guess. PeterPresent (talk) 12:07, 23 August 2017 (UTC)[reply]
At the stats-101 level, I would think the easiest starting point is just to do a simple linear regression treating shoe size as your x and height as your y. The confidence interval can then be estimated from the fit, and especially the typical misfit of the line to the data. Of course, in the real world you need to look at the data and verify whether or not a linear relationship is reasonable. If the fit is poor and/or the data is non-linear, one may need to do more sophisticated analysis, but a quick linear regression is probably the easiest starting point. Since you seem to be saying this is a largely hypothetical exercise, then I suppose one needs to ask how complicated you want to make it. Ordinarily, the complexity of the model and analysis is heavily guided by the qualities of the data. Dragons flight (talk) 14:46, 23 August 2017 (UTC)[reply]
Thanks! Linear regression sounds like a simple practical solution, though I wonder if the relationship would actually be linear, due to the Square–cube law. But by "open ended" I was wondering more about methods to squeeze all the useful info from the data. I thought of a stats 101 solution as doing something with the the spreadsheet data involving a covariance matrix, but had no idea what the "something" was. PeterPresent's suggestion of multivariate normal distributions sounds like about what I imagined, so I'll try to read that article. 173.228.123.121 (talk) 03:04, 24 August 2017 (UTC)[reply]
That article should be accessible if you've studied some probability and linear algebra. PeterPresent (talk) 10:51, 24 August 2017 (UTC)[reply]

Regarding the square_cube law, you can plot the data and see if it is indeed a linear relationship, or one of higher order. If it is higher order, you can do a polynomial regression with the appropriate higher-order terms, or even a non-linear regression if you can express the relationship between the two variables mathematically. OldTimeNESter (talk) 22:44, 24 August 2017 (UTC)[reply]

Take a logarithm before you make your statistical analysis in order to avoid dealing with negative shoe sizes and heights. Bo Jacoby (talk) 06:45, 25 August 2017 (UTC).[reply]

Approximating low-frequency modes with discrete non-uniform data

I am looking for some algorithms and/or conceptual pointers for whether or not there are generally preferred way(s) of estimating low-frequency behavior from discrete non-uniform data. In my context, an ideal time series would be uniformly sampled with one data point every year. Then one can define a low frequency representation of that data in several ways. For example, by taking an N-year moving average, or by using a Fourier transform to remove high frequency components, or by applying various other smoothing approaches. However, I am looking for tips on how best to get a similar low-frequency representation given non-uniform data.

Specifically, instead of one data point per year, imagine the data is still sampled on an annual time scale, but many years were not reported (i.e. missing data) and the distribution of missing data is random. Is there a best way to approximate, for example, the 20-year moving average, if 80% of the years are missing? There are obvious strategies, such as interpolating the data in various ways before smoothing or simply applying the moving average to just the data that one does have, but I am wondering if there are a selection of techniques that are generally preferred for situations like this. I am imagining that a "preferred" solution is an estimate of the low-frequency behavior that would be expected to come closest to the true low-frequency behavior (if the missing data were available) given some set of assumptions about the statistical distribution of the missing data (e.g. normality, autocorrelation, etc.). Dragons flight (talk) 14:31, 23 August 2017 (UTC)[reply]

Could filling in the missing years by multiple imputation help if that many are missing? Then run your moving average or a fancier low-pass filter. 173.228.123.121 (talk) 16:52, 23 August 2017 (UTC)[reply]
That kind of poor input data isn't going to give you good results no matter what you do to it. However, it should work better with a consistent and slowly changing stat, such as world population, than something more volatile, like a stock price. StuRat (talk) 17:31, 23 August 2017 (UTC)[reply]
My understanding is that Fourier analysis is a special case of least squares analysis; it's just that the math works out especially cleanly in the case of Fourier analysis. But that doesn't mean that other types of analysis are impossible. First you need to decide on the how to weight the data. For a rolling average you might give the the last n data points a weight of 1/n, but another popular weighting is proportional to p-t where p is fixed and t is the time difference between the data point and the present. Second you have to decide how you're modelling the data, constant for plain average, linear for a trend, polynomial or trigonometric polynomial for more detailed results. Then use calculus to find the expression with the least square distance from the data. There is a limit to how much meaningful information you can get from a given data set, so you need the limit the degrees of freedom in your model. Probably the best way to start is to simply plot the data and let you brain's visual cortex detect a pattern. That should at least narrow down what type of model you should use. --RDBury (talk) 00:38, 24 August 2017 (UTC)[reply]
See also here. Count Iblis (talk) 00:42, 24 August 2017 (UTC)[reply]
The compressed sensing idea is interesting, though from looking at the article it seems the idea is to get high frequency info from samples taken more slowly than the Nyquist rate, using the uneven spacing of the samples. For low frequencies, I'm imagining something like 1000s of years of climate data, which I'd imagine to be some periodic components plus something like a random walk. So one idea might be to guess a model for the periodic part, and fit parameters to it until the residual part looks like a random walk. There has to be something better though. 173.228.123.121 (talk) 02:44, 24 August 2017 (UTC)[reply]

Angles

The difference between an obtuse angle and acute angle and a right if it is larger than a right angle its obtuse — Preceding unsigned comment added by Jaayinlove1 (talkcontribs) 18:03, 23 August 2017 (UTC)[reply]

Right. --CiaPan (talk) 19:06, 23 August 2017 (UTC)[reply]
... as clearly explained in our article: angle. Dbfirs 19:56, 23 August 2017 (UTC)[reply]
And here I thought a cute angle had dimples and obtuse angles were stupid, right ? StuRat (talk) 20:01, 23 August 2017 (UTC) [reply]

August 24

Resources to learn A-level (year 11 & 12) maths?

I'll be doing A-level maths independently and am looking for additional resources for when the textbook isn't enough to explain the problem. 2.102.187.156 (talk) 12:56, 24 August 2017 (UTC)[reply]

There are several websites such as this, this, this, this, this this this this this and this, many of them free. I haven't checked to see which is best. Most seem to follow the Edexcel syllabus. You can always ask here if you have specific problems you are having difficulty with. Dbfirs 13:36, 24 August 2017 (UTC)[reply]
Khan Academy is a good resource; it's more geared towards the US Curriculum in terms of pacing and order of subjects, but if you know specific subject matter, you can follow the videos there as an additional resources. here is their library of all topics covered; if you have specific topics on the A-levels you want additional help with, that could be an additional resource. --Jayron32 14:11, 24 August 2017 (UTC)[reply]
Yes, that's an excellent resource if you pick the appropriate topics from your syllabus. There are some minor differences in terminology (such as plotting on the "complex plane" instead of an "Argand diagram"), and you will need to be careful to choose the right level, but the explanations are better than I've seen on any British website. Dbfirs 16:07, 24 August 2017 (UTC)[reply]
Cheers those are really helpful. 2.102.187.156 (talk) 23:48, 26 August 2017 (UTC)[reply]

Simultaneous quadratic equations

I have three quadratic equations with three unknowns (x,y,z). What is the easiest way to solve for x,y,z?

(x-a1)^2 + (y-b1)^2 =(z-c1)^2
(x-a2)^2 + (y-b2)^2 =(z-c2)^2
(x-a3)^2 + (y-b3)^2 =(z-c3)^2

-- SGBailey (talk) 15:22, 24 August 2017 (UTC)[reply]

Perform the binomial expansions, collect like terms, then solve as a system of equations. --Jayron32 15:35, 24 August 2017 (UTC)[reply]
Haven't looked to solving it, but I can say that the locus of a point where the distance to two other points differs by s constant is a hyperbola. And two hyperbolas can meet at up to four points. Dmcq (talk) 15:39, 24 August 2017 (UTC)[reply]
This actually looks like an intersection of three cones with different coordinate origins. To solve it just subtract the second equation from the first then the third from the first and finally the third from the second. As a result you will get a system of three linear equations:
Only two equations are independent
You need to express two variable through the third then substitute these expressions into one of the original equations and solve the resulting quadratic equation. Ruslik_Zero 17:56, 24 August 2017 (UTC)[reply]
Nice approach, Ruslik. But I would add a caveat. It's true that the left hand side matrix of your linear system has a zero determinant, meaning that if the three equations are consistent then one of them is redundant. But the third equation could be inconsistent with the other two due to its right hand side constant, meaning that the linear system and thus the original quadratic system has no solution. The can be checked by considering the rank of the augmented matrix—if it is greater than the rank of the unaugmented matrix, the linear system is inconsistent. Loraof (talk) 19:37, 24 August 2017 (UTC)[reply]
The third equation can be obtained by subtracting the first equation from the second. So, it adds no new constants on the solution. Therefore, the system is always consistent. Ruslik_Zero 20:18, 24 August 2017 (UTC)[reply]
Thanks all - I'll give it a go. -- SGBailey (talk)
Not true, Ruslik. For a trivial example, let c1=1, c2=2, c3=3, and all other parameters =0. Then x^2+y^2=(z-1)^2, x^2+y^2=(z-2)^2, and x^2+y^2=(z-3)^2, which is inconsistent. Your corresponding linear equations are 0=z–3, 0=2(z–4), and 0=z–5. Loraof (talk) 21:42, 24 August 2017 (UTC)[reply]
  • Further, we can say that almost all parametrizations are inconsistent. Using the left side matrix and augmented matrix I referred to earlier, the left side matrix always has zero determinant, so its rank is less than or equal to 2, and will generally be 2. But the augmented matrix does not in general have rank 2; if you delete one of the first three columns from the augmented matrix (a redundant column), the rank of the resulting 3×3 matrix is the same as the rank of the augmented matrix; for this to be 2 requires that the determinant of the latter 3×3 matrix be 0, which imposes a restriction on the relation of the parameters to each other. For randomly chosen parameters this relation will almost surely not hold.
So using Ruslik's approach gives candidate solutions for the original quadratic system, but in general these will not be valid solutions and have to be checked against all three quadratic equations. Loraof (talk) 22:06, 24 August 2017 (UTC)[reply]
Loralof, I don't know what you're talking about: in the relevant 3 by 3 linear system, the third equation is *always* consistent with the other two, just as Ruslik0 says. This is clear both from the equations and from the process by which they were constructed. --JBL (talk) 12:05, 25 August 2017 (UTC)[reply]
Then what's a solution to the case I mentioned: c1=1, c2=2, c3=3, all other parameters=0, which gives the quadratic system and what's the solution to its linear counterpart ? Loraof (talk) 15:27, 25 August 2017 (UTC)[reply]
The ranks of the left side and augmented matrices are at most 2, not 3. This follows from the fact that you can eliminate one of the equations. Then the left side matrix is 2×3 and the augmented matrix is 2×4. So, their ranks can not exceed 2. The pathological example that you found (and which, I admit, I missed) corresponds to case when the left side matrix has rank 1. So, in this case there is indeed no solution. Ruslik_Zero 17:55, 25 August 2017 (UTC)[reply]
Loralof, the answer to your question is that the third equation in that case is implied by the other two, which are inconsistent with each other. --JBL (talk) 01:52, 26 August 2017 (UTC)[reply]

The 3 equations are

0 = for .

Expand the squares

0 =

Subtract the first one from the second one and from the third one

0 = for

where

Now the squares have been eliminated from the second and the third, but not from the first equation. Multiply the first one by and the second one by and subtract in order to eliminate

0 =

where

and

This equation, and equations 2 and 3, are of degree 1 in . So can be eliminated from equations 2 and 3, and we are left with 2 equations in the 2 variables and

0 = for

Continuing this procedure eliminate first , and then , to obtain one algebraic equation in the variable . Bo Jacoby (talk) 16:39, 25 August 2017 (UTC).[reply]

Diophantine question...

Does x/(y+z)+y/(x+z)+z/(x+y) = N have a solution where x,y,z and N are all integers?— Preceding unsigned comment added by Naraht (talkcontribs)

Yes. Many solutions, such as x=1, y=1, z=3. That would be 1/4+1/4+3/2=2. 209.149.113.5 (talk) 16:40, 24 August 2017 (UTC)[reply]
And of course, by symmetry of the original equation, any permutation of a solution is a solution also. And also kind of trivially, any multiple of a solution will be a solution as well (like (2,2,6), (3,3,9), etc.). --Deacon Vorbis (talk) 16:44, 24 August 2017 (UTC)[reply]
OK, so we have k*(1,1,3),2 and k*(1,1,0),2. Any more come to mind?
Sure, e.g. (-2,1,1) and (-5,1,1), both for N=-3. There are probably others. --Deacon Vorbis (talk) 17:18, 24 August 2017 (UTC)[reply]
I think those may be the only solutions with all non-negative integers. If you consider negative integers as well, then there are many additional solutions. For example for every set of positive integers (a,b,k) there is a solution k*(a,-b,b-a), -3. Also, k*(-5,6,7), 6; k*(-2,1,5), -5; k*(-7,-5,9), -5; k*(-7,-5,8), 8; k*(-5,4,41), -41; etc. Dragons flight (talk) 17:59, 24 August 2017 (UTC)[reply]
Another general class for every positive integer a is k*(-2a^2-2a-1, -a, a+1), -2a^2-2a-1. Dragons flight (talk) 18:09, 24 August 2017 (UTC)[reply]

August 25

Revised Simultaneous quadratic equations

This follows on from my question yesterday.

In an xy plane, position four (distinct) points (x1,y1) (x2,y2) (x3,y3) (x0,y0).

Draw three circles centred at (x1,y1) (x2,y2) (x3,y3) passing through (x0,y0), with radii r1 r2 r3.

Given the 8 values x1 y1 x2 y2 x3 y3 (r2-r1) (r3-r1) (and you can have 0=(r1-r1) if you like as well), how can you calculate x0 and y0?

-- SGBailey (talk)

More. If it should happen that r1 = r2, then (r2-r1) will be 0 and you know that (x0,y0) will be on the perpendicular bisector of (x1,y1) (x2,y2). Generally (x3,y3) r3 will intersect with this line in two places. Does that mean to make a unique calculation I should add (x4,y4) r4 giving (r4-r1)?
Then imagine that (x1,y1) is (0,0) and (x2,y2) is (3,0). If (r2-r1) happens to equal 1, then one solution to this sub problem is (1,0) (r2-r1 = 2-1). What shape is the equivalent (to perpendicular bisector above) locus of satisfying points? Does this help?
-- SGBailey (talk)
This is basically the Problem of Apollonius. Dmcq (talk) 18:04, 25 August 2017 (UTC)[reply]

August 27

Wikipedia article about adding subtracting dividing and multiplying two PDF

A long long time ago, I asked a question about how to form a new pdf (probability density function) which is a product of two other pdf

PDF_A = PDF_H * PDF_W

Where PDF_A is the Probability Density Function of Area

PDF_H is the Probability Density Function of Height

PDF_W is the Probability Density Function of Width

And the answer given is

Is there a wiki article about how to do this for

PDF_B = Sqrt(PDF_A)

PDF_B is the square root of PDF_A Ohanian (talk) 20:26, 27 August 2017 (UTC)[reply]

First, terminology: you are not multiplying PDFs or taking their square roots; you are applying those operations to random variables, and wondering how to compute (or construct) the PDF of the result. For injective functions of a single variable this is easy. (It can be extended to simple non-injective functions by summing over the branches of their full inverses.) --Tardis (talk) 04:16, 28 August 2017 (UTC)[reply]

August 28