Solved

Excel: quadratic equation

Posted on 2011-09-27
15
718 Views
Last Modified: 2012-05-12
Does excel have a quadratic equation function?
I have a set of points that I would like to fit ax^2+bx+c=0 though.
0
Comment
Question by:allelopath
  • 5
  • 4
  • 3
  • +2
15 Comments
 
LVL 12

Expert Comment

by:viralypatel
ID: 36709804
no direct function but this should solve the purpose:
http://www.bettersolutions.com/excel/EAV113/LT721811311.htm
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 36710019
How many points do you have?  You need three points to determine a parabola.

If you have more than three points, you can use linear regression in Excel to solve for A, B, and C.
You have to set your data up in a table.  

For each data point:   x² is the coefficient of A     x is the coefficient of B      1 is the coefficient of C
0
 
LVL 1

Author Comment

by:allelopath
ID: 36710040
In this case, 105 points
0
 
LVL 1

Author Comment

by:allelopath
ID: 36710062
like so
points.xls
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 36710210
You have have a 105 values.  What do they mean?  What is x?

Why do you think this data should be fit to a quadratic?

These values are measurements of  ?????  varying with respect to ?????.
0
 
LVL 80

Accepted Solution

by:
byundt earned 500 total points
ID: 36710299
Assuming that your x values are the numbers 1 through 106, then your quadratic formula might be:
y = -0.000514x2 + 0.048557x - 0.657532
R² = 0.695230


I array-entered the following formula in a 5 row x 3 column block of cells:
=LINEST(B2:B107,A2:A107^{1,2},TRUE,TRUE)
Among other things, it returns the coefficients a, b, c      for ax^2 + bx + c)

I also made a scatter plot
pointsQ27343514.xls
0
 
LVL 1

Author Comment

by:allelopath
ID: 36710336
d-glitch:
my apologies, the file I attached had only the y values. The x values should have been 0 - 105.
byundt, however, went the extra mile and figured it out.
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 80

Expert Comment

by:byundt
ID: 36710387
If x values are 0 to 105, then the R squared will be the same, but the coefficients will be slightly different:
y = -0.000514x2 + 0.047529x - 0.609489
R² = 0.695230


Brad
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 36710392

Doing a rough fit by eye:

     Doing a rough fit by eye:

          -(60 - X)²                -X²      3X
    Y  =  ----------  +  0.5    =   ---  +  ----  -  8.5
            400                     400      10

Open in new window

0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 36710404
I seriously doubt that a quadratic is a good fit for your data. Should the data really start dropping rapidly with no lower bound as x gets higher?
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 36710457
Here's a graph showing what the data of a best-fit quadratic would go compared to your data.
 best fit
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 36710505
Needs some work, but it's a start.
ExEx-Quadratic.pdf
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 36710531
TommySzalapski is way ahead here....
0
 
LVL 37

Expert Comment

by:TommySzalapski
ID: 36710681
I assumed byundt did a proper best-fit method to get his function and just used it. The point is that I am unsure that a quadratic is the right choice as d-glitch mentioned earlier. I repeat his questions here:
"These values are measurements of  ?????  varying with respect to ?????."
0
 
LVL 1

Author Comment

by:allelopath
ID: 36710803
TommySzalapski:
You have no way of knowing this, but project the data beyond 106 doesn't make sense.
The quadratic fits well enough to suit my purposes.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now