class: center, middle, inverse, title-slide .title[ # Polynomial Functions ] .subtitle[ ## Session 06 ] .author[ ### Alejandro Ucan ] .date[ ### 2023-10-04 ] ---
# Goals * Describe the general form a the Polynomial function model. <br/><br/> * Describe the general behavior of a polynomial function. <br/><br/> * Apply the polynomial function to model business problems. <br/><br/> --- # Polynomial Functions > __Definition:__ A polynomial function is a function of the form `$$f(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0$$` where `\(a_n\neq 0\)` and `\(n\)` is a nonnegative integer. The domain of a polynomial function is `\((-\infty,\infty)\)`. <br/><br/> * `\(a_n\)` are known as coefficientes. <br/><br/> * `\(n\)` is called the degree of the polynomial. <br/><br/> * `\(a_0\)` is called the constant term. <br/><br/> --- # Criterium > Assume that we have a large collection of data (that depends on one variable). This data could fit a polynomial function if there are multiple sign change (in the mean changes of the data). <br/><br/> * The degree of the polynomial is the number of sign changes minus one. <br/><br/> * The polynomial functions take values in `\((-\infty, \infty).\)` <br/><br/> * The numbers of intercepts of the polynomial function with the `\(x\)`-axis is lower than its degree. <br/><br/> --- #### Example Consider the following polynomial function `\(f(x)=x^3-3x^2-4x+12.\)` ```r x <- seq(-5, 5, by = 0.1) y <- x^3 - 3*x^2 - 4*x + 12 plot(x, y, type = "l", col = "blue", lwd = 2) abline(h = 0, col = "red") ``` --- #### Example Consider the following polynomial function `\(f(x)=x^4 + 2 x^3 - 19 x^2 - 8 x + 60.\)` ```r x <- seq(-6, 6, by = 0.1) y <- x^4 + 2*x^3 - 19*x^2 - 8*x + 60 plot(x, y, type = "l", col = "blue", lwd = 2) abline(h = 0, col = "red") ``` --- # What happens when we work with real life data? > Sometimes collected data does not fit a linear regression model. --- ## How to solve that problem? > There is a technique called __polynomial regression__ that allows us to fit a polynomial function to a set of data. ## How to decide if my data fits a polynomial function? 1. Plot the data in a scatter plot to see some tendencies. <br/><br/> 2. Use the __criterium__ to decide if the data fits a polynomial function. <br/><br/> 3. Use the __polynomial regression__ to fit a polynomial function to the data. <br/><br/>