Generating Cost Functions Using Spreadsheets and Multiple Linear Regression