Given a,b,c are random real numbers,so for ax2+bx+c=0,what's the probability that the roots are real?
Looks like about statistics,actually it's about volume calculation.Anyone can give me some tips?Thx!

Given a,b,c are random real numbers,so for ax2+bx+c=0,what's the probability that the roots are real?
Looks like about statistics,actually it's about volume calculation.Anyone can give me some tips?Thx!
Well probability is mostly about counting and in this case that counting is a "volume calculation." Though I think it is no ordinary volume calculation because I think the volumes seem to be infinite. Though I think without loss of generality you can restrict yourself to the surface of a unit sphere. a^2+b^2+c^2 = 1 and then it becomes a problem of the ratio of finite surface areas.
The important question is what is the condition for the solution of the quadradic equation to be real and that is that b^24ac must be greater than or equal to zero. The the probability question then becomes what fraction of the surface of the unit sphere satisfies this condition.
Your first step is to determine what you mean by "a,b,c are random real numbers". Do you mean a gaussian distribution of some kind? A uniform distribution over some bounded set? Something else?
Mentioning a volume calculation suggests you mean a uniform distribution, but then you need to specify the bounded set as you can't have a uniform distribution over the entire real line (arbitrarily selecting a sphere is definitely losing much generality).
So, just determine your probability density function, then integrate it over the region where b^24ac>=0. There will be lots of symmetry unless your distribution is something bizzare.
Or maybe you want to consider an asymptotic density in R^3 (essentially a volume calculation over expanding but bounded regions).
To mitchellmckain:
The volume is not infinite I think.Coz we can set up a 3D graph which have three axis,perpendicular to each other,let's assume they're a,b,cthe same as our quadratic coeficient.We wanna calculate the volume enclosed by the bent plane b^2=4ac,I think we can use integration to calculate them,just don't know how,but once I used Mathematica to draw the graph of the plane b^2=4ac,the shape is regular and the volume is obviously finite. :P
To shmoe:
Except the things I talked about above,I think I need to explain the meaning of "a,b,c are random real numbers".In my opion,you overthought of this question,this is not about probability problem,or I can change it into a mathematical expression:
First set up a 3D graph which have three axis,perpendicular to each other,let's assume they're a,b,cthe same as our quadratic coeficient.Having the relationship b^2=4ac,calculate the volume enclosed by the sphere,which a,b,c are all positive.
b^2=4ac is a surface that coincides with the a and c coordinate axes when b is zero, hyperbolas when b is not zero and parabolas when either a or c is fixed. It is obviously symmetric across the b=0 plane. This is an open surface and does not enclose any volume. BUT even if it did you would have to calculate the probability by dividing by the volume of all 3 dimensional space which is infinite, which would mean that the probability would be zero, which we know is wrong which is an additional proof that a finite volume is not enclosed. This is a direct consequence of the fact that can divide a quadratic equation by any constant without changing the equation. We can without loss of generality subject the problem to an additional constraint such as requiring a to be 1, because that is the same as dividing the quadratic equation by a. However this is unhelpful because then b^2=4ac becomes b^2=4c which is a parabola and the areas on either side of the parabola are infinite. Thus the way to do the problem is precisely as I said which is to restrict yourself to a unit sphere a^2+b^2+c^2=1 (which is the same as dividing the quadratic equation by the square root of a^2+b^2+c^2) on which all the areas are finite then ask what portion of the sphere satisfies b^2>=4ac.Originally Posted by Forrest
Exactly! If it was a non uniform distribution then he would know it.Originally Posted by shmoe
He did not overthink it, he simply used his better knowledge of probability to ask a meaningful question, and he confirmed my conclusion if we are to presume a uniform distribution.Originally Posted by Forrest
Yes this is another solution. If you want to force the use of volume calculation then yes you can limit yourself to a sphere of some arbitrarily chosen size. This is only justified because the problem is spherically symmetric which means this will give the same answer as the ratio of areas on the surface of a unit sphere. You cannot for example restrict yourself to a finite cubic volume for that will give the wrong answer.Originally Posted by Forrest
The restriction to the surface of a unit sphere is the most natural solution because it is so easily justified by simply dividing the quadratic equation by the square root of a^2+b^2+c^2.
In my opinion you seem to think that "random real number" has some implicit meaning. It doesn't. If you can't sort out exactly what you mean by this, then your problem would be meaningless.Originally Posted by Forrest
yet you asked "what's the probability that the roots are real?", so there is some sort of distribution you need to consider even if it is a uniform one over some region that can be computed using the usual volume integral.Originally Posted by Forrest
You are taking a uniform distribution inside a bounded sphere. If you don't take this bounded restriction then the region you are considering does have an infinite volume. You might want to think about how this interpretation relates to say taking a, b, and c to be independendant identically distributed gaussians with mean 0 and some standard deviation.Originally Posted by Forrest
Just consider spherical coordinates in this case, if phi is the angle to the b axis and theta is the angle to the a axis (in the ac plane) you can find phi explicitly in terms of phi when b^2=4ac. Mathematica should be able to do the integration numerically if it can't be solved exactly. (if r is the distance to the origin, how does taking (a,b,c) to be gaussian distributions relate to (r, theta, phi), where r has a gaussian, phi, theta uniform over meaningful values?)
By the way, taking a uniform distribution inside a bounded cube centered at the origin wouldn't be "wrong", it's just a different interpretation to your otherwise vague "random real number" statement.
Thank you very much for you two's clearly explaination.But I may not exactly get your point because of languages,I mean,I'm a chinese,a little bit hard for me to understand your saying but I know the general meaning.By the way,after I check the books about distribution,I'm sure this problem can be solved in this way but I just don't know how to,haha,sorry for my limited knowledge Shmoe.My Alevel courses didn't contain this content but recently I'll try to selfstudy it to see if I can solve it in this way.If I can I'll post it out,and if I can't I'll ask for your help,thanks again!! 8) 8)
By the way,may you tell me the general steps of this question?Or if it's too complicated,just tell me the answer let me know if my solving is right or wrong OK?Thank you.
Well here is a straight forward attempt
To restrict the problem to the surface of a unit sphere you parameterize using spherical coordinates (with r=1)
like this
a = cos t
b = cos p sin t
c = sin p sin t
where p ranges from 0 to 2 pi
and t ranges form 0 to pi
Now your condition becomes cos^2 p sin^2 t >= 4 sin p sin t cos t.
Now in order to solve for t we would like to divide both sides by sin t cos t cos^2 p. Well, cos^2 p is always positive but sin t cos t is negative from pi/2 to pi, so dividing by sin t cos t reverses the inequality on pi/2 to pi. So we need a few logical considerations first.
First notice that b^2>4ac whenever ac<0 which takes care of half the sphere and is both when t<pi/2 and p>pi and when t>pi/2 and p<pi. So for these regions we simply add an area of pi each (total area is 4 pi). The two remaining areas are each divided into two separate areas (positive and negative b) we must add up, but since all these are equal, we do only one integration and multiply by 4.
so for one of these areas we must have
tan t >= 4 sin p / cos^2 p from t=0 to pi/2 for p<=pi
So the area on the unit sphere satisfying the condition is as follows
4 integral wrt p from p = 0 to p = pi of:
integral wrt t from t = tan^1(4 sin p / cos^2 p) to t = pi/2 of:
sin t dt dp
+2pi=
4 integral wrt p from p = 0 to p = pi of:
[cos t]at t=pi/2  [cos t] at t=tan^1(4 sin p / cos^2 p)
+2pi=
4 integral wrt p from p = 0 to p = pi of:
cos[tan^1(4 sin p / cos^2 p)]
+2pi=
4 integral wrt p from p = 0 to p = pi of:
cos^2 p / sqrt[cos^4 p + 16 sin^2 p]
+2pi
(Next a substitution u = sin p might be helpful. If not there is always numerical integration.)
Anyway, evaluate the integral (leaving the nastiest part of the problem to you), and divide the total by the area of the full unit sphere ( 4 pi) and (if I have made no mistakes) you will get the probability that the a quadratic equation (given that a,b and c are random variables with uniform probablility distribution over a spherical volume) has real roots.
As a very very rough approximation we can see the probability is going to be around 75%.
In what level of grades do u study this? college?Originally Posted by Forrest
Masters guy already handled it.
This whole question is illpoised : there exists no unifrom probability measure on the reals and i think the question is usually stated over some cube in R^3.
I saw a elementary calculation of this probability over the unit cube a while back, ill try remember the trick and post it latter.
An interesting side question though is consider the different quadratic
x^2 + q x + p = 0
What is the probability that a random quadratic of this form has real roots if p, q are elements of [k, k]. Letting k > infinity gives the amusing result that a "random" quadratic over the reals always has real roots
I was the setter of this problem
I understood that there was considerable subtlety in the question of distribution, but unfortunately my students had not encountered the "uniform distribution" (but they have discussed the normal distribution  go figure ).
The problem was just meant to get people's interest  it was not an assignment, but rather just for fun.
I'm sure you're right that the question is ill posed .. If we specify a cube (this was my suggestion to those students who wanted to try), the resulting answer for the probability (which is about .627; it has a ln 2 in there) is independent of R, so we can let R>infinity safely.
It's interesting; I took "uniformly distributed over an arbitrarily large interval" to be the most natural interpretation of "random", but later discussions on the topic show that this is not good enough.
Here's what interests me now: suppose we do the integration over a spherical rather than cubic volume and let R>infinity. Surely we don't get a different result?! (I must admit I'm not inclined to do it ..
:wink: )
And if indeed we do get the same result, then I think the problem has a single natural interpretation, and the answer is indeed .627 (exact: ln2/12 + 5/72 + 1/2 I believe)
The problem is that there is no uniform probability distribution in the reals because every way you take the limit gives you a different answer  im sure you could actually get almost any answer you want. Its a similar problem to deciding what a random chord in a circle which circumscribes an equilateral triangle is longer then one of the triangles sides, three reasonable "solutions" each give a different answer to the question. (Bertrands paradox).
I think you guys are wrong. In quantum field theory we are always fixing up ill conditioned problems and I think this one can be fixed.
My proposal was to treat the following two quadratic equations as the same quadratic equation.
x^2 + 7x  3 = 0
2x^2 + 14x  6 = 0
after all the difference between these is trivial.
So in each case I suggest dividing the equation, a x^2 + b x + c = 0
by sqrt(a^2 + b^2 + c^2)
then we instead of integrating over all of three dimensional space we are integrating over the surface of the unit sphere.
And I do think it gives a different answer than integrating over a cubic volume, though of course until we do the integration over the unit sphere we cannot be absolutely sure.
First problem Mitchellmckain is that by dividing by sqrt(a^2 + b^2 + c^2) you no longer have three independant random vairiables, also intergrating about a spherical volume also limts the number of independant variables you get.
In QFT you are trying to handle divergence in an intergral that is not properly defined, which is a different problem to this one as every way of taking the intergral gives a different answer and there is not one obviously correct one due to symmetry.
If all you are saying is that the problem I am posing is not equivalent to the original one, then I agree. The original problem is ill posed and nonsensical. So I am suggesting a natural modification that makes it a sensible problem. In physics we often make whatever assumptions that are required to make sense of a problem, rather than excusing ourselves on the basis of a technicality. Physics tends to be slightly less legalistic in practice than mathematics because of this. So the real question is whether the equivalence of quadratic equations under uniform multiplication of all three coefficients is a natural one to make and I think it is. That equivalence does in fact represent a natural symetry in the problem, that of a spherical symmetry.Originally Posted by river_rat
Of course you could simply argue that this really is a mathematics problem and not a physics problems at all, and you would be quite correct.
The problem you solved is not even an extension of the original problem though mitchell, that was my point  if you want to divide by parameters its a lot easier to consider the equation
x^2 + p x + q = 0 for p in [k, k] and q in [k, k] and let k increase without bound. But this problem shows that almost every quadratic has real roots, a bit of a paradox. I dont see how the roots of a quadratic exhibit spherical symmetry either  please explain your idea here?
A problem exhibits symmetry if the problem remains the same after a certain change of coordinates (or parameters). My arguement is that the quadratic equation does not change under the following change of parameters a>d * a, b> d * b, c> d * c for any number d. The fact that the solution is completely unchanged is a pretty solid basis for calling this a symmetry of the problem.Originally Posted by river_rat
If we make a spherical coordinate transformation a> r cos p sin t, b> r sin p sin t, c> r cos t first to the parameters r, p, t, the above symmetry transformation is just r > d * r, for any number d. Now I probably should not use the term "spherical symmetry" since that usually means a symmetry under the change of spherical coordinates p and t rather than r. But the point is that it is most definitely is a symmetry of the problem.
Now the reduction of the problem to x^2 + p x + q = 0 does eliminate the extra degree of freedom which the above symmetry is responsible for but by does so in a way that leaves you with infinite space R^2 (the real plane) on which you cannot have a uniform distribution. As a result you still have an infinite area satisfying the condition and an infinite area which does not, so the ratio is technically undefined. And as a result your calculation, which I verified by the way, is probably spurious. I think this is consequence of not including the symmetry in your calculation method.
Hi Mitchell
I see what you have done but that is not a sperical symmetry, merely a scaling one. A scaling symmetry does not allow you to do what you tried, for example the inequality b^2  4ac > 0 is not preserved by any rotation of the sphere and thats the problem. By your argument the quadratic equation is preserved by almost any symmetry transform, as any function in three variables f(a, b, c) can be written as d*g(a, b, c).
Also, divinding by the sqrt(a^2+b^2+c^2) insures that your new variables are not independant so you cannt even start with the integral of the form you used to find the probability, independant random variables dont form a field.
Yes, scaling symmetry is the correct term for it. Thanks for reminding me. But you will have to explain your claim that a scaling symmetry does not allow me to do what I have done, because I see no reason to believe it. The quadradic eqution is preserved only by the scaling symmetry transform a>d * a, b> d * b, c> d * c, and you are wrong, this is not true of f(a,b,c) = 0 for any function f of three variables.Originally Posted by river_rat
Examples:
f(a,b,c) = (x + a)^2 + b x + sqrt(c x)
f(a,b,c) = a + (x + b)/(x + c)
f(a,b,c) = a sin (b x + c)
The equation f(a,b,c) = 0 may have other kinds of scaling symmetry when these other functions are used but not the same one as the one I used in the problem. In the case of the last function for example f(a,b,c) = 0 would have a scaling symmetry a>d*a.
I am sorry but I do not see your arguement. My argument is quite simple and involves no such complexities. By the scaling symmetry which I have explained all possible quadratic equations are adequately represented by the points on a unit sphere. That is, every quadratic equation can be scaled (by dividing all the coefficients a,b,c by sqrt(a^2+b^2+c^2)) to produce a quadratic equation whose whose coefficients lie on the unit sphere and which have the same solution as the original quadratic equation. Therefore a uniform distribution on the unit sphere is a logical interpretation of the original problem. And the solution is well defined for the fraction of the sphere that satisfies b^2  4ac > 0 is well defined.Originally Posted by river_rat
This should be considered a valid interpretation expecially because no distribution was mentioned in the original problem. The uniform distribution which I have described is in fact the only uniform distribution that makes any sense at all. And it will give exactly the same answer as any spherically symmetric probability distribution on a,b,c space. The uniform distribution on a cube in a,b,c space and the uniform distribution on a square in p,q space are not spherically symmetric probability distributions so they do not give the same answer.
I never said it was true for f(a, b, c) = 0, but consider any transformation of the coeffs of a quadratic say
a' = f(a, b, c)
b' = g(a, b, c)
c' = h(a, b, c)
where the f, g, and h are any real valued smooth functions on R^3. Then every one of these functions can be written as a "scaling transformation" of the sorts you used and justified your spherical coords on, namely d*( f(a, b, c)/d) for any d nonzero. Thats my point, a scaling transformation and spherical transformation are not connected in any meanigful way in this problem.
You need independence of each random variable to calculate your probability in the form you are using, dividing one random variable by another does not preserve independence. Each coeff is choosen independantly and that property of the problem has to be preserved.
I don't see the relevance of what you are saying. I am not reparameterizing according toOriginally Posted by river_rat
a' = d * a
b' = d * b
c' = d * c
This would indeed not accomplish anything. But this is not what I have been talking about. I have been talking about actually changing the coeffients to different numbers like this.
a>d * a, b> d * b, c> d * c
And the quadratic equation becomes da x^2 + db x + dc =0, which has the same solution as the original quadratic equation.
For example with a=3,b=2,c=1, d = 3
The original equation is 3 x^2 + 2 x  1 = 0
The new equation is 9 x^2 + 6 x  3 = 0
And these do have exactly the same solutions.
But a different way of changing the coefficients like this
a > a + b
b > a  b
c > c
Gives us the quadratic equation (a+b) x^2 + (ab) x + c = 0, which does not in general have the same solution as the original quadratic equation.
For example with a=3,b=2,c=1
The original equation is 3 x^2 + 2 x  1 = 0
The new equation is 5 x^2 + x  1 = 0
And these do not have the same solutions.
Therefore a>d * a, b> d * b, c> d * c is a true scaling symmetry of the problem and a>a+b, b> ab, c> c is not a symmetry of the problem.
I am quite certain that this is only true if a well defined distribution is provided with the problem. I must insist that you consider my claim that the uniform distribution over the sphere that I have described will in fact give the same answer as any spherically symmetric probability distribution over the a,b,c cartesian space. This is a consequence of the scaling symmetry that we have been talking about.Originally Posted by river_rat
Perhaps different backgrounds is making this easy for me to see while it is giving you trouble. This kind of scaling symmetry does play an important role in quantum field theory.
Okay, first point is that your spherical coords have nothing to do with scaling  thats what i am trying to get at. If you want to get technical then solving the corresp. lie equations will give you the cords for a scale independant system. Being rotationally invariant is what you need for spherical coords.
The "correct answer" for the problem is ln2/12 + 41/72  which you did not get with your method. You still need three independant variables once you have done your transformation, which your method does not give you.
There's nothing wrong with taking the distribution to be uniform over a spherical shell. This is equivalent to taking the asymptotic density over spheres (as the radii tend to infinity) using the usual volume measure. a,b,c are not independant variables under this distribution, nor are they uniformly distributed, but this is no reason to declare this interpretation as "wrong".
Likewise there is nothing wrong with a uniform distribution over a cube. This kind of asymptotic density is a very standard thing and I would consider it a better fit for what's usually intended by the vague statement "random real number"*. Specifically it's the uniformness and independance that are preserved (in a sense at least). In any case the scaling symmetry makes any objections about an asymptotic density moot, any bounded cube gives the same answer.
Neither approach is wrong in any way given the initial vague problem. There are other reasonable interpretations as well.
*I have a biased view though, abusing the phrase "random integer" to mean an asymptotic density like this is common practice in my area.
edit It's maybe also worth pointing out that using a uniform distribution on the surface of a sphere amounts to the same thing as taking a, b, and c to be iid gaussians (note that if you then project onto the unit sphere, the resulting coordinates are no longer independantly distributed).
I dont see mitch's work as wrong shmoe  i just believe he solved a VERY different problem.
It's definitely different from using a uniform distribution over a cube. It's still a reasonable way to interpret the original problem though.
I think independance of the coefficients is the defining point of this problem  but anyway how are you justified calculating conditional probabilities the way Mitch did?
For what it is worth  i wrote up my solution to the problem in latex http://www.fileshack.us//files/126/random_quadratic.zip
Independance isn't specified in the problem, the defining point of the problem is it's vagueness! In any case, a uniform distrubution over the sphere is equivalent to taking a,b,c in the original quadratic to be independant gaussians (mean zero, same variance all around), so you've still got independance in the sense you would like.Originally Posted by river_rat
I didn't read his work too carefully, it looked like he was just doing a simple area calculation no? This is what you'll get with gaussians in this case, the pdf is rotationally invariant, so you can just project onto the sphere and go from there.
Hi shmoe  ive been trying see how a uniform distribution around the sphere corresponds to a, b, c being independant gaussian random variables. How do you get that result? The variables cannot be independant the way i see it  chosen two of them immediatly limits your choice of the third to two values.
If you are selecting (a,b,c) to be on the unit sphere uniformly then the coordinates are of course not independant.
If you select (a,b,c) in R^3 with each coordinate an independant gaussian (mean 0, same variance all around), then project onto the unit sphere, you end up with the same distribution as above. The pdf for this distribution in R^3 is just exp(a^2b^2c^2) (modulo some constant), this is rotationally invariant. In other words all directions are 'equally likely'. Thinking in terms of spherical coordinates, projecting onto the unit sphere is just performing the integration over r in advance, the value of r has no bearing on real or imaginary roots. This is where your 3rd degree of freedom has gone, it's been simplified away from the problems scaling invariance.
ahhh  okay i see where you are going now. I was going about the idea by trying to map directly to the unit sphere and getting lost with the change of variable formula.
Looking at the change of variable formula again though  why doesnt the projection onto the unit sphere break the independance (and almost everything else) you are talking about? I think the jacobian of that operation is 0 if i am not mistaken.
if we are scaling  why not just use the simplified quadratic
x^2 + p x + q = 0? We are working on 2d surfaces anyway and R^2 is about as simple as you can get in that regard.
The nature of the roots of ax^2+bx+c depends on only on the direction of the vector (a,b,c). You can parameterize this by theta and phi in the usual spherical coordinates. Projecting onto the sphere is just integrating over r in advance. We still have 3 independant variables, one of them is just irrelevant to the problem and easy enough to simplify into oblivion when using spherical coordinates.
Projecting the gaussian distribution in R^3 onto the sphere is just one step towards solving the problem (equivalent to integrating over r), this isn't some arbitrary scaling.Originally Posted by river_rat
Looking at some distribution of (p,q) for x^2 + p x + q = 0 is a different problem for anything that I would consider a natural distribution of (p,q).
Okay  i agree with the first point that the direction of the vector (a, b, c) is the only thing that counts. So in fact there is no "projection" (the thing that is bothering me) but instead we are just moving from R^3 > R^2 by considering direction angles instead. Okay, so no projection operator, so no jacobian and no melt down  got it, plus the two direction angles are uniformly distributed, and apparently independant (i still need to check that though). Thats actually quite a neat trick.
For theta and phi in spherical coords, if phi is the angle to the zaxis, then theta is uniformly distributed in [0, 2*pi), but phi is not uniformly distributed in [0,pi]. The surface area element has a sin(phi) in it (of course so does the pdf of the gaussian in spherical), so we actually have the cosine of phi uniformly distributed over [1,1].Originally Posted by river_rat
Just a thought; should we, a la Einstein, go for an "operational definition" of what random means here?
Can we define the problem by stating that you have 3 dice, one for coefficient a, one for b and one for c. Each has n faces, let's say 1000. We subtract 500 from whatever number is thrown. Thus producing a uniform distribution over 500,+500. If you want nonintegers, just multiply up the number of faces and throw in a few decimal places. Whatever.
Then we can let n>inf. , or more importantly, note that n doesn't matter.
I think this is what the question is really asking, I think what's implicit and should be explicit is that a, b and c are independent. For that, I think a cube is the right way to do it analytically, because that's an orthogonal basis. Spherical coords are not.
I apologise that I haven't read all the previous messages, and I think you have been discussing this.
Btw I liked your pdf river rat Nice to see you get the same answer, too.
AGibson  this is the standard form of solving "take n real numbers at random". In general you use a bounded figure of some shape and let the diameter of that figure tend to infinity  the problem is that the shape matters. For your example taking 3 die of sizes n, 2n and 3n gives a different "uniform" distribution then taking die of size n for example. As the choice of shape is totally arbitrary you have not got round the problem. Its the dependance on the shape that causes the problem and you cant get round it  you cant have a unifrom probability distribution even on a countable space in general.
So where do you teach AGibson?
« math challenge: 3d globe for turnbased game  Who to make a fourier function? » 