When fitting a polynomial to data points, how to determine the reasonable degree to use?Linear regression for minimizing the maximum of the residualsFitting for piecewise function, with constraints on first/second derivativeIntuitive proof of interpolation polynomial existenceFor a fixed degree, is there always a Lagrange polynomial below the original function?Optimal place to measure for simple linear regression/fittingInterpolation of Symmetric DataProving that $R^2to 1$ as the degree of a polynomial $kto infty$ for a least squares regression.Is it Possible to Linearise the Bounded Growth Model to use LLSQ?Why isn't the linear regression coefficient not just the average vector to data points?How to feed data into a polynomial basis function regression (unregularized) for degree n?

Multi tool use
Multi tool use

Smoothness of finite-dimensional functional calculus

What do you call a Matrix-like slowdown and camera movement effect?

What is the offset in a seaplane's hull?

What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)

If I cast Expeditious Retreat, can I Dash as a bonus action on the same turn?

How old can references or sources in a thesis be?

What are these boxed doors outside store fronts in New York?

What would happen to a modern skyscraper if it rains micro blackholes?

Theorems that impeded progress

Are the number of citations and number of published articles the most important criteria for a tenure promotion?

What does it mean to describe someone as a butt steak?

How much RAM could one put in a typical 80386 setup?

How to test if a transaction is standard without spending real money?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Service Entrance Breakers Rain Shield

Why are electrically insulating heatsinks so rare? Is it just cost?

Prove that NP is closed under karp reduction?

Languages that we cannot (dis)prove to be Context-Free

Today is the Center

How is the claim "I am in New York only if I am in America" the same as "If I am in New York, then I am in America?

Test whether all array elements are factors of a number

can i play a electric guitar through a bass amp?

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?



When fitting a polynomial to data points, how to determine the reasonable degree to use?


Linear regression for minimizing the maximum of the residualsFitting for piecewise function, with constraints on first/second derivativeIntuitive proof of interpolation polynomial existenceFor a fixed degree, is there always a Lagrange polynomial below the original function?Optimal place to measure for simple linear regression/fittingInterpolation of Symmetric DataProving that $R^2to 1$ as the degree of a polynomial $kto infty$ for a least squares regression.Is it Possible to Linearise the Bounded Growth Model to use LLSQ?Why isn't the linear regression coefficient not just the average vector to data points?How to feed data into a polynomial basis function regression (unregularized) for degree n?













0












$begingroup$


I have wondered the following: Suppose that there is a set of data points $(x_i,y_i)$. Then I would like to know if it is more reasonable to assume if there is a polynomial relation of degree $m$ between them or of degree $n$. Is there way to measure it? I know that Lagrange's polynomial gives the exact relation but for example physics formula $F=ma$ says that sometimes it is correct to choose linear polynomial to model the phenomenon.










share|cite|improve this question











$endgroup$











  • $begingroup$
    See Uniqueness of the interpolating polynomial
    $endgroup$
    – Weaam
    Oct 28 '15 at 20:16















0












$begingroup$


I have wondered the following: Suppose that there is a set of data points $(x_i,y_i)$. Then I would like to know if it is more reasonable to assume if there is a polynomial relation of degree $m$ between them or of degree $n$. Is there way to measure it? I know that Lagrange's polynomial gives the exact relation but for example physics formula $F=ma$ says that sometimes it is correct to choose linear polynomial to model the phenomenon.










share|cite|improve this question











$endgroup$











  • $begingroup$
    See Uniqueness of the interpolating polynomial
    $endgroup$
    – Weaam
    Oct 28 '15 at 20:16













0












0








0





$begingroup$


I have wondered the following: Suppose that there is a set of data points $(x_i,y_i)$. Then I would like to know if it is more reasonable to assume if there is a polynomial relation of degree $m$ between them or of degree $n$. Is there way to measure it? I know that Lagrange's polynomial gives the exact relation but for example physics formula $F=ma$ says that sometimes it is correct to choose linear polynomial to model the phenomenon.










share|cite|improve this question











$endgroup$




I have wondered the following: Suppose that there is a set of data points $(x_i,y_i)$. Then I would like to know if it is more reasonable to assume if there is a polynomial relation of degree $m$ between them or of degree $n$. Is there way to measure it? I know that Lagrange's polynomial gives the exact relation but for example physics formula $F=ma$ says that sometimes it is correct to choose linear polynomial to model the phenomenon.







regression interpolation mathematical-modeling






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Oct 28 '15 at 21:25







user147263

















asked Oct 28 '15 at 20:04









studentstudent

1




1











  • $begingroup$
    See Uniqueness of the interpolating polynomial
    $endgroup$
    – Weaam
    Oct 28 '15 at 20:16
















  • $begingroup$
    See Uniqueness of the interpolating polynomial
    $endgroup$
    – Weaam
    Oct 28 '15 at 20:16















$begingroup$
See Uniqueness of the interpolating polynomial
$endgroup$
– Weaam
Oct 28 '15 at 20:16




$begingroup$
See Uniqueness of the interpolating polynomial
$endgroup$
– Weaam
Oct 28 '15 at 20:16










1 Answer
1






active

oldest

votes


















0












$begingroup$

Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.



For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.



It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.



Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.



Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.



If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.



Best of luck!






share|cite|improve this answer









$endgroup$













    Your Answer





    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1502316%2fwhen-fitting-a-polynomial-to-data-points-how-to-determine-the-reasonable-degree%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0












    $begingroup$

    Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.



    For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.



    It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.



    Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.



    Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.



    If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.



    Best of luck!






    share|cite|improve this answer









    $endgroup$

















      0












      $begingroup$

      Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.



      For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.



      It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.



      Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.



      Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.



      If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.



      Best of luck!






      share|cite|improve this answer









      $endgroup$















        0












        0








        0





        $begingroup$

        Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.



        For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.



        It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.



        Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.



        Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.



        If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.



        Best of luck!






        share|cite|improve this answer









        $endgroup$



        Part of the issue is whether you want your function to fit the data "as closely as possible", or if you want it to hit every data point exactly.



        For example, if you want to fit some data that appears linear, using linear least squares approximation to find the two coefficients which minimize the error is the right way to go. However, if you want an exact estimate, you might want to look at Lagrange Interpolation.



        It sounds like you want a "close as possible fit", but you want to compare the accuracy of Polynomials of different degrees. You can use least squares techniques to find the coefficients of a polynomial of a given degree. To do this, you will use a matrix containing powers of your data points and a vector containing your coefficients.



        Say we have d data points, and we want a degree n polynomial. Then our matrix will have d rows and n+1 columns. The ith row contains the powers, 0 through n, of the ith data point. The vector contains the constant, then the linear coefficient, and so on.



        Multiplying the matrix and the vector gives you a vector of dimension d. (Independent of the degree of the polynomial used!) Typically we use these objects to minimize the error, but once you have the best coefficients for a given degree, you can multiply the matrix by the coefficient vector, and finally subtract the vector containing the y-values. The norm of this vector (X Powers)*(Coefs) - (Y data) is the square root of the sum of the squares of the error at each data point.



        If you find this norm for several different degrees, you can find the degree polynomial with the lowest error, and that should be the closest approximation for the degrees tested.



        Best of luck!







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Oct 28 '15 at 20:51









        RonothRonoth

        935




        935



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1502316%2fwhen-fitting-a-polynomial-to-data-points-how-to-determine-the-reasonable-degree%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            B5qBgAeZ8x8Jf5GcIJzx0 BSe8n0Ja,HdScC 2 ff,LPc7y,m,RdGKG,9,mIN4qzeFrEoQv1f89sZ6rt,jb rnyCGE
            gNSOgllqOJ1,AtzVCkme88MXonQBVdqM,byLJPhL,5O,Mn iuBlyH2,1wLF,WSxXZI,3bghdAf xUaNx7p4eU,IzL

            Popular posts from this blog

            Football at the 1986 Brunei Merdeka Games Contents Teams Group stage Knockout stage References Navigation menu"Brunei Merdeka Games 1986".

            Solar Wings Breeze Design and development Specifications (Breeze) References Navigation menu1368-485X"Hang glider: Breeze (Solar Wings)"e

            Kathakali Contents Etymology and nomenclature History Repertoire Songs and musical instruments Traditional plays Styles: Sampradayam Training centers and awards Relationship to other dance forms See also Notes References External links Navigation menueThe Illustrated Encyclopedia of Hinduism: A-MSouth Asian Folklore: An EncyclopediaRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to PlayKathakali Dance-drama: Where Gods and Demons Come to Play10.1353/atj.2005.0004The Illustrated Encyclopedia of Hinduism: A-MEncyclopedia of HinduismKathakali Dance-drama: Where Gods and Demons Come to PlaySonic Liturgy: Ritual and Music in Hindu Tradition"The Mirror of Gesture"Kathakali Dance-drama: Where Gods and Demons Come to Play"Kathakali"Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceMedieval Indian Literature: An AnthologyThe Oxford Companion to Indian TheatreSouth Asian Folklore: An Encyclopedia : Afghanistan, Bangladesh, India, Nepal, Pakistan, Sri LankaThe Rise of Performance Studies: Rethinking Richard Schechner's Broad SpectrumIndian Theatre: Traditions of PerformanceModern Asian Theatre and Performance 1900-2000Critical Theory and PerformanceBetween Theater and AnthropologyKathakali603847011Indian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceIndian Theatre: Traditions of PerformanceBetween Theater and AnthropologyBetween Theater and AnthropologyNambeesan Smaraka AwardsArchivedThe Cambridge Guide to TheatreRoutledge International Encyclopedia of Women: Global Women's Issues and KnowledgeThe Garland Encyclopedia of World Music: South Asia : the Indian subcontinentThe Ethos of Noh: Actors and Their Art10.2307/1145740By Means of Performance: Intercultural Studies of Theatre and Ritual10.1017/s204912550000100xReconceiving the Renaissance: A Critical ReaderPerformance TheoryListening to Theatre: The Aural Dimension of Beijing Opera10.2307/1146013Kathakali: The Art of the Non-WorldlyOn KathakaliKathakali, the dance theatreThe Kathakali Complex: Performance & StructureKathakali Dance-Drama: Where Gods and Demons Come to Play10.1093/obo/9780195399318-0071Drama and Ritual of Early Hinduism"In the Shadow of Hollywood Orientalism: Authentic East Indian Dancing"10.1080/08949460490274013Sanskrit Play Production in Ancient IndiaIndian Music: History and StructureBharata, the Nāṭyaśāstra233639306Table of Contents2238067286469807Dance In Indian Painting10.2307/32047833204783Kathakali Dance-Theatre: A Visual Narrative of Sacred Indian MimeIndian Classical Dance: The Renaissance and BeyondKathakali: an indigenous art-form of Keralaeee