Serving the Quantitative Finance Community

 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

probability of a quadratic function has two real roots?

January 16th, 2010, 1:44 pm

QuoteOriginally posted by: wileyswQuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: Traden4AlphaQuoteOriginally posted by: CuchulainnQuoteA.4. a*x^2 + b*x + c = 0: a,b,c from [-R, +R]: p = 0.627..Indeed! This value of p is also the answer of a,b,c, = N(0,1), which makes sense given the scale invariance for any result on an symmetric uniform interval.I get a slightly different answer when N(0,1): .6485227 ??I use LFGBy golly, you're right! I get 0.647 +/- 0.007 on a Q&D XLS sim. Hmmm... I've missed something someplace..........doing a sanity check with the Kac formula by Edelman & Kostlan.however, i got 1.297 from the numerical integration, exactly twice of what you guys got.WOW! Probability >1. Now that is interesting! P.S. Nice results on the geometrical method work and I liked your use of the derivative to bound the number of roots.
Last edited by Traden4Alpha on January 15th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

probability of a quadratic function has two real roots?

January 16th, 2010, 1:44 pm

QuoteOriginally posted by: CuchulainnI tried a,b,c in the quadratic equation and got for uniform parametersAny ideas on why the answers differ?U(0,1) : .254637U(-1,1) : .627584Yes, with U(-1,1), 50% of the cases will have ac<0, which makes b^2-4ac strictly nonnegative which guarantees real roots. For U(0,1), ac is never negative which increases the chance that b^2-4ac is negative. P(RealRoots | a,b,c = U(-1,1) ) = 0.5 + P(RealRoots | a,b,c = U(0,1) )/2
Last edited by Traden4Alpha on January 15th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
wileysw
Posts: 7
Joined: December 9th, 2006, 6:13 pm

probability of a quadratic function has two real roots?

January 16th, 2010, 3:16 pm

QuoteOriginally posted by: Traden4AlphaWOW! Probability >1. Now that is interesting! i see. i forgot the original question posed here is asking for the prob, which is what you guys were simulating. the Kac formula given in the paper by Edelman & Kostlan instead calculates the average number of real roots for a given random n-th degree polynomial with the coefficients being independent standard normals:for which i just plugged in n=2. that is indeed twice the prob since a quadratic eq. can only have zero/two real roots.----- ----- ----- ----- -----the geometrical interpretation in Edelman & Kostlan is very nice: the average number of real roots of any random-coefficient eq. is the length of a one-parameter family curve on a unit sphere.(if the coefficients follow a different distribution other than the independent standard normal, e.g., correlated normal or uniform, one just needs to put in a corresponding metric)now if one wants to restrict the range where the roots could lie in, just change the integral limits of the parameter when calculating the length.e.g., the Kac formula is from -inf to +inf, since one counts all the real roots; if instead we want the average number of positive roots, then set the limit from 0 to +inf, which is just half of the original answer: 0.6485; another cute result is if we only want roots within [-1,1], that gives the same answer 0.6485 by setting the integral limit from -1 to +1.(this can be proven by changing variable t->1/t either in the integration or in the original quadratic eq., and it holds for general n: on average half of the roots will sit in [-1,1] range)back to a + b sin(x) + c exp(abs(x)) = 0, symmetry of b's distribution guarantees that on average there is same number of positive roots as negative ones, so we can remove the abs, only consider the positive roots of sin(x) = - a/b - (c/b)*exp(x). seems to me, by specifying a particular monotonic range of sin(x), it is relatively simple to count the # of roots by considering the values on both ends of these two functions, along with their derivatives. this might result some simple algebraic criteria on these coefficients which seems formidable in the general case.
Last edited by wileysw on January 15th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

probability of a quadratic function has two real roots?

January 17th, 2010, 7:53 pm

Quotethe geometrical interpretation in Edelman & Kostlan is very nice: the average number of real roots of any random-coefficient eq. is the length of a one-parameter family curve on a unit sphere.(if the coefficients follow a different distribution other than the independent standard normal, e.g., correlated normal or uniform, one just needs to put in a corresponding metric)Nice. Are there any numerical results in circulation? e.g. uniform on a sphere of dimension n. Quotee.g., the Kac formula is from -inf to +inf, since one counts all the real roots; if instead we want the average number of positive roots, then set the limit from 0 to +inf, which is just half of the original answer: 0.6485; another cute result is if we only want roots within [-1,1], that gives the same answer 0.6485 by setting the integral limit from -1 to +1.This probably has a geometrical interpretation, it's a dart board? Very general Q: what kinds of equations can be transformed to a random polynomial? Weierstrass
Last edited by Cuchulainn on January 16th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
wileysw
Posts: 7
Joined: December 9th, 2006, 6:13 pm

probability of a quadratic function has two real roots?

January 19th, 2010, 1:02 am

Edelman & Kostlan's method works as long as the random equation can be written as an inner product, e.g., for a n-th degree random polynomial, denote the random coefficients: A=(a0,a1,...,an), and the one-parameter solution family: X=(1,x,x^2,...,x^n). the polynomial can be written as: A dot X = 0.their trick is to note for any real root of this random equation, the corresponding normalized vector X/||X|| on the unit sphere determines a great circle of the vector A/||A||. note the normalized A is uniform on sphere if the components are independent standard normals, so the prob translates to the fractional area covered by these great circles. this in turn is proportional to the length of X's trace on the sphere. that's how the Kac formula is derived.(note the method thus only gives the average number of roots. when beyond quadratic, it does not give the prob of a random equation having real roots)similarly, for a+b sin(x)+c exp(abs(x))=0, the one parameter family is ( 1,sin(x),exp[abs(x)] ). the results i posted earlier is by getting the differential length, then integrating on the corresponding interval:(though integrating from -inf to +inf results 0.646066, slightly off compared with the # in their paper)i'm not quite sure about your first question. what numerical results do you need?
Last edited by wileysw on January 18th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

probability of a quadratic function has two real roots?

January 20th, 2010, 8:17 pm

Quotei'm not quite sure about your first question. what numerical results do you need? The idea is to compare the probability of finding real roots of ax^2 + bx + c = 0 when a,b and c are from any distribution (we agreed on the result for N(0,1) and U(0,1)). Basically, I would like to test boost distributions when a,b and c are (cauchy, triangular, poisson etc.). It's a kind of sanity check. Example: Triangular (a = 0, b = 1/2, c = 1) I get Prob(real) = 0.116357
Last edited by Cuchulainn on January 19th, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
wileysw
Posts: 7
Joined: December 9th, 2006, 6:13 pm

probability of a quadratic function has two real roots?

February 4th, 2010, 6:56 am

sorry i did not follow up on this earlier. it turns out to be quite tedious to apply their Theorem 5.1 with the distributions other than Gaussian. meanwhile they listed some results for non-central Gaussian distributions if you would like to check numerically.e.g., for any real constant m, (m+a)*x^2+sqrt(2)*b*x+(m+c)=0 where a,b,c are all standard normals, the prob is sqrt(2)/2 * exp(-m^2/2)
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

probability of a quadratic function has two real roots?

March 23rd, 2010, 2:42 pm

What is the probability of real roots ofx^3 + ax^2 + bx + c = 0 (a, b, c are N(0,1))?hunches:it wil be less than 0.648conjecture , p ~ 0.33 * 0.648
Last edited by Cuchulainn on March 22nd, 2010, 11:00 pm, edited 1 time in total.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

probability of a quadratic function has two real roots?

March 23rd, 2010, 4:22 pm

QuoteOriginally posted by: CuchulainnWhat is the probability of real roots ofx^3 + ax^2 + bx + c = 0 (a, b, c are N(0,1))?hunches:it wil be less than 0.648conjecture , p ~ 0.33 * 0.648Wouldn't the probability of at least one real root be 1 because the x^3 term would dominate all other terms for large magnitude enough x on both sides of x=0?Thus, the expected number of real roots would be > 1.
 
User avatar
wileysw
Posts: 7
Joined: December 9th, 2006, 6:13 pm

probability of a quadratic function has two real roots?

March 24th, 2010, 3:04 am

TradenAlpha is right, as a cubic equation has either one/three real root(s).one could then ask what the probability is for this cubic equation to have (non-real) complex roots, i.e., when it has only one real root. this probability can be deduced from the expected number of real roots, hence one could still apply corollary 5.1 in Edelman & Kostlan, which results a pretty complicated integral: (think the leading coefficient "1" as following a Gaussian with zero variance and unit mean)mathematica gives 1.33986. this gives the prob of the cubic eq. NOT having complex roots (or having three real roots) ~ (1.34-1)/2=0.17one could do a cross-check by drawing these standard normal coefficients and checking the discriminant: 18*b*c*d - 4*b^3*d + b^2*c^2 - 4*c^3 - 27*d^2 >= 0(got 0.1694 with 100,000 samples)----- ----- ----- ----- -----in general, seems there is no clean way to determine whether a polynomial has real roots or not. e.g., the sign of the discriminant does not work for even degree polynomials beyond quadratic. although there is a useful theorem due to Sturm which gives a practical algorithm to determine the exact number of real roots.
Last edited by wileysw on April 10th, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

probability of a quadratic function has two real roots?

April 1st, 2010, 12:28 am

 
User avatar
frenchX
Posts: 11
Joined: March 29th, 2010, 6:54 pm

probability of a quadratic function has two real roots?

April 1st, 2010, 6:10 pm

I really love your picture Traden4Alpha. The article of Edelman&Kostlan seems to give very powerfull results (thanks to wileysw to have found it).I have a question. What is the probabaility that a random polynom with integer coefficients admits roots written in a radical form? For n<=4 it's P=1 but for n>4, if the Galois group is not a solvable group, roots can't be expressed in such a way.
Last edited by frenchX on March 31st, 2010, 10:00 pm, edited 1 time in total.
 
User avatar
wileysw
Posts: 7
Joined: December 9th, 2006, 6:13 pm

probability of a quadratic function has two real roots?

April 2nd, 2010, 6:24 pm

FrenchX, judging from the degree of freedom for solvable quintic equations, i guess the probability is zero when n>=5?
 
User avatar
frenchX
Posts: 11
Joined: March 29th, 2010, 6:54 pm

probability of a quadratic function has two real roots?

April 3rd, 2010, 5:50 am

I agree with you wileysw if the coefficient of the polynom are reals but what happen if you restrain the coefficients to integer values?In my guess I think the probability should be low but not null. Example if P(x) is a quintic equation which admits radical form solutions so n*P(x) admits the same roots for each n integer.Another example if P(x)=(x-x1)Q(x) with Q(x) a quartic equation with real coefficient for each x1 written in a radical form, P(x) admits radical form roots. The only restriction is that the product (x-x1)Q(x) develops in integer coefficient.I don't remember exactly how you find the Galois group of a polynom, I have to search that first .
 
User avatar
Cuchulainn
Posts: 23029
Joined: July 16th, 2004, 7:38 am

probability of a quadratic function has two real roots?

April 3rd, 2010, 8:40 am

QuoteOriginally posted by: frenchXI agree with you wileysw if the coefficient of the polynom are reals but what happen if you restrain the coefficients to integer values?In my guess I think the probability should be low but not null. Example if P(x) is a quintic equation which admits radical form solutions so n*P(x) admits the same roots for each n integer.Another example if P(x)=(x-x1)Q(x) with Q(x) a quartic equation with real coefficient for each x1 written in a radical form, P(x) admits radical form roots. The only restriction is that the product (x-x1)Q(x) develops in integer coefficient.I don't remember exactly how you find the Galois group of a polynom, I have to search that first .The theorem is "the polynomial equation p(x) = 0 is solvable by radicals iff its Galois group is solvable, i.e. the Galois group of splitting fields" We start with finding the automorphisms that map each element of the smallest field that contains all coefficients of p onto itself. //Not all polynomials of degree n >= 5 are solvable by radicals because the symmetric group S(n) is not solvable for n>=5. Then things become ultraradical. So, is the probability of finding even a real or complex root == 0?
Last edited by Cuchulainn on April 2nd, 2010, 10:00 pm, edited 1 time in total.