Functions and Mathematical Models Used to compute the values on a variable [Y] given values on other variables [X1, X2 . . .] Purposes: 1. Prediction of values of Y given known values of X Purposes: 1. Prediction of values of Y given known values of X 2. Explanation by comparing predicted values of Y with known values of Y Purposes: 1. Prediction of values of Y given known values of X 2. Explanation by comparing predicted values of Y with known values of Y 3. Estimation of Y: Example: using CPI to estimate real from nominal values Purposes: 1. Prediction of values of Y given known values of X 2. Explanation by comparing predicted values of Y with known values of Y 3. Estimation of Y: Example: using CPI to estimate real from nominal values 4. Conversion of values to a different scale: Example: computing index numbers Other examples of functions: • Converting absolute numbers into relative numbers, e.g., sports injury rate, country HIV rate Example: conversion of Celsius to Fahrenheit Example: conversion of Celsius to Fahrenheit AKA: Night of the Living Dead Chemistry Lesson Example: conversion of Celsius to Fahrenheit At what temperature Fahrenheit does water freeze? Example: conversion of Celsius to Fahrenheit At what temperature Fahrenheit does water freeze? 32 degrees Example: conversion of Celsius to Fahrenheit At what temperature Fahrenheit does water freeze? 32 degrees At what temperature Celsius does water freeze? Example: conversion of Celsius to Fahrenheit At what temperature Fahrenheit does water freeze? 32 degrees At what temperature Celsius does water freeze? 0 degrees Example: conversion of Celsius to Fahrenheit At what temperature Fahrenheit does water boil? Example: conversion of Celsius to Fahrenheit At what temperature Fahrenheit does water boil? 212 degrees Example: conversion of Celsius to Fahrenheit At what temperature Fahrenheit does water boil? 212 degrees At what temperature Celsius does water boil? Example: conversion of Celsius to Fahrenheit At what temperature Fahrenheit does water boil? 212 degrees At what temperature Celsius does water boil? 100 degrees Example: conversion of Celsius to Fahrenheit Fahrenheit Freezing point Boiling point Celsius 32 0 212 100 Example: conversion of Celsius to Fahrenheit • So, in Fahrenheit, to get from freezing to boiling takes 180 degrees (212 minus 32) • In Celsius, it takes 100 degrees (100 minus 0) • Dividing 180 by 100, we see that every 1 degree Celsius is equivalent to 1.8 degrees Fahrenheit Example: conversion of Celsius to Fahrenheit Y = 32 + 1.8 X Where Y = Fahrenheit temperature x= Celsius temperature Go to Excel file 1. Enter 4 numbers between 32 and 212 in the next four cells in the Celsius column 2. Enter the formula for the “Celsius to Fahrenheit” function in the first empty cell in the Fahrenheit column 3. Copy the function for the next three cells 4. Create XY scatter diagram (along with me) Function yields a straight line • Formula: Y = b + aX “a” is slope: the amount of change in Y given a unit change in X “b” is intercept: the value of Y when X=0 • Alternative arrangement: Y = aX + b Y = b + aX [Y = aX + b] is also called the regression equation Function is linear: Y changes by constant absolute amount given fixed change in X Linear functions are one of the two primary types of functions for this class. The other type is exponential functions. Linear vs. Exponential Linear Exponential Absolute change Constant Varying with value of X Rate of change (% change) Constant Varying with value of X Using linear functions Using linear functions • To compute Y: Plug in value of X and do arithmetic Using linear functions • To compute Y: Plug in value of X and do arithmetic • To solve for X given Y: • Y = b + aX • Y – b = aX • (Y – b)/a = X Adding trendline to xy scatter diagrams: Open the Minimum Wage Excel file from Lab 8 R2 . . . Coefficient of determination • Measures degree to which predicted values match actual values • How close are the points to the line, on average? • Zero means no correspondence between predicted and actual values • 1.0 means all predicted values exactly match actual values or all points are exactly on the regression line