ARA: Relationship Between Salaries and Years of Service

download ARA: Relationship Between Salaries and Years of Service

of 8

Transcript of ARA: Relationship Between Salaries and Years of Service

  • 7/24/2019 ARA: Relationship Between Salaries and Years of Service

    1/8

    Interpolation and Data Fitting: Salaries and Yearsof Service

    02/30/16

  • 7/24/2019 ARA: Relationship Between Salaries and Years of Service

    2/8

    Summary:

    For tis analysis! I used te data tat relates te nine"mont salary of 3#$ %S

    professors during 200&"200# 'it respect to teir years in service inacademia( I found tat 'it tis )ind of data tat is pretty caotic as can *eseen in Fig 1(0! te *est 'ay to appro+imate suc *eavior is trougpolynomial appro+imation( ,ven toug strict trigonometric polynomialappro+imations get almost as close to minimi-ing te residual as polynomialappro+imate .t! te residuals of strict trigonometric polynomialappro+imations 'it respect to te data *lo's up to in.nity as m goes toin.nity( Same goes for strict e+ponential appro+imation of te data( encete *est model for suc data set is of polynomial appro+imation(

  • 7/24/2019 ARA: Relationship Between Salaries and Years of Service

    3/8

    Fig 1(0: otice te caotic pattern of te data(

    1 %sing your o'n cosen data! .t dierent models tat migt suit te

    *eavior of your data i(e polynomials! trigonometric polynomials!e+ponentials(

    %sing 45 least suares metods 'it te factori-ation found usingouseolder re7ections for numerical sta*ility! I8ve found multiple 'ays of.tting a model into te data set( 9ltoug some of tem are prettyunsuccessful! some are actually uite o) to use for appro+imation( ere8s ane+ample of polynomial of degree 2 .t troug te scatter plot of data points:

    9nd ere8s a polynomial of degree 3 .t troug te same data:

  • 7/24/2019 ARA: Relationship Between Salaries and Years of Service

    4/8

    I8ve also tried trigonometric polynomials of te form *n

    an

    (sin( nx45)+bn cos ( nx45 ))n=1

    m

    fourier series 'ic 'en m ; 3! yields:

  • 7/24/2019 ARA: Relationship Between Salaries and Years of Service

    5/8

    9nd 'en mi+ed 'it linear function i(e *n

    an

    (sin( nx20)+bn cos ( nx20 ))+xn=1

    m

    ! 'e

    get:

    %nfortunately! some models are

  • 7/24/2019 ARA: Relationship Between Salaries and Years of Service

    6/8

    =ic is pretty *ad as it almost never its or gets close to more tan alf ofte points(

    2 >ose a model and discuss 'y tat model is te most suita*le(

    9s 'e can see from te a*ove e+ponentials are automatically out ofuestion( o' if I 'ere to coose *et'een polynomials or trig polynomials! Imigt ave to go 'it polynomials since from te start I ave noticed asu*tle *ut natural para*olic *eavior on te data set( 9ltoug mi+ed/trigpolynomial is good too! 'at as 'e 'ill see later! teir optimal residuals areactually greater tan te optimi-ed residual of polynomial appro+imation(

    3 ?rap te residual of your cosen appro+imation 'it respect to tenum*er of *asis functions in a semilogy plot! and mar) te optimal num*erof *asis functions tat gives te least residual(

    =ell in my case te num*er of *asis functions are actually te degree of te

    polynomial minus 1 ence if 'e plot suc relation in a semilogy plot 'it teresidual *eing on te y a+is 'e get te follo'ing plot:

  • 7/24/2019 ARA: Relationship Between Salaries and Years of Service

    7/8

    9s 'e can see from te a*ove! te minimum residual is attained 'en tedegree of te polynomial is & 'it an a*solute value of @(1A2@$###1$&1@@#B 10@! 'ic is te lo'est I can get for all )inds of models( Ce grap of sucpolynomial is as follo's:

    A For large m! grap te parameter si-e a

  • 7/24/2019 ARA: Relationship Between Salaries and Years of Service

    8/8

    Ce grap of te parameters for a degree # polynomial appro+imation of tedata is as follo's:

    9ltoug te spi)e of large values is not totally on te .rst position! it stillloo)s li)e te large values are near to'ards te starting position of teappro+imating polynomial( If I 'ere to guess as to 'y tis migt *e! I 'ouldsay tat tis as someting to do 'it te curvature of te grap! and o'te larger degree polynomials tend to ave sarper curves 'ic relates toderivatives8 iger siftstan te lo'er degree polynomials 'ic tends to

    me 7atter as seen in part 1 of 2 degree polynomial appro+imation(