MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical.

Slides:



Advertisements
Similar presentations
Probabilistic & Statistical Techniques Eng. Tamer Eshtawi First Semester Eng. Tamer Eshtawi First Semester
Advertisements

1 Simple Linear Regression and Correlation The Model Estimating the Coefficients EXAMPLE 1: USED CAR SALES Assessing the model –T-tests –R-square.
P M V Subbarao Professor Mechanical Engineering Department
MTH15_Lec-03_sec_1-3_Lines_LinearFcns_.pptx 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical &
2.2 Correlation Correlation measures the direction and strength of the linear relationship between two quantitative variables.
Statistics for the Social Sciences
Regression Chapter 10 Understandable Statistics Ninth Edition By Brase and Brase Prepared by Yixun Shi Bloomsburg University of Pennsylvania.
CHAPTER 3 Describing Relationships
Regression, Residuals, and Coefficient of Determination Section 3.2.
1 Chapter 10 Correlation and Regression We deal with two variables, x and y. Main goal: Investigate how x and y are related, or correlated; how much they.
Regression and Correlation
Calibration & Curve Fitting
Correlation and Linear Regression
McGraw-Hill/Irwin Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 13 Linear Regression and Correlation.
Lecture 3: Bivariate Data & Linear Regression 1.Introduction 2.Bivariate Data 3.Linear Analysis of Data a)Freehand Linear Fit b)Least Squares Fit c)Interpolation/Extrapolation.
Linear Regression and Correlation
MTH55_Lec-06_sec_1-3_Graph_Functions.ppt.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical.
MTH55_Lec-49_sec_8-2_Derive_Quadratic_Eqn.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical.
Relationship of two variables
Linear Regression and Correlation
MTH55_Lec-07_sec_2-3a_Lines_by_Intercepts.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical.
1 Chapter 3: Examining Relationships 3.1Scatterplots 3.2Correlation 3.3Least-Squares Regression.
Correlation Correlation measures the strength of the LINEAR relationship between 2 quantitative variables. Labeled as r Takes on the values -1 < r < 1.
Chapter 6 & 7 Linear Regression & Correlation
MTH55_Lec-51_sec_8-3a_Quadratic_Fcn_Graphs.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical.
MTH55_Lec-09_sec_2-4_Pt-Slp_Line-Eqn.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical.
MTH55_Lec-36_sec_6-8_Model_by_Variation.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical &
Anthony Greene1 Regression Using Correlation To Make Predictions.
MTH16_Lec-08_sec_7-5_LaGrange_Multipliers.pptx 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical.
Notes Bivariate Data Chapters Bivariate Data Explores relationships between two quantitative variables.
AP STATISTICS LESSON 3 – 3 LEAST – SQUARES REGRESSION.
1 Chapter 10 Correlation and Regression 10.2 Correlation 10.3 Regression.
1.6 Linear Regression & the Correlation Coefficient.
MTH55_Lec-10_sec_3-1_2Var_LinSys_ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical.
Section 5.2: Linear Regression: Fitting a Line to Bivariate Data.
MECN 3500 Inter - Bayamon Lecture 9 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
Chapter 3 Section 3.1 Examining Relationships. Continue to ask the preliminary questions familiar from Chapter 1 and 2 What individuals do the data describe?
Notes Bivariate Data Chapters Bivariate Data Explores relationships between two quantitative variables.
Examining Relationships in Quantitative Research
MTH55_Lec-28_sec_Jb_Graph_Rational_Functions.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical.
MTH55A_Lec-05_sec_2-2_Fcn_Graphs.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 3 Describing Relationships 3.2 Least-Squares.
ENGR-25_Plot_Model-4.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Registered Electrical.
Correlation tells us about strength (scatter) and direction of the linear relationship between two quantitative variables. In addition, we would like to.
CHAPTER 5 CORRELATION & LINEAR REGRESSION. GOAL : Understand and interpret the terms dependent variable and independent variable. Draw a scatter diagram.
Correlation/Regression - part 2 Consider Example 2.12 in section 2.3. Look at the scatterplot… Example 2.13 shows that the prediction line is given by.
^ y = a + bx Stats Chapter 5 - Least Squares Regression
Simple Linear Regression The Coefficients of Correlation and Determination Two Quantitative Variables x variable – independent variable or explanatory.
MTH55_Lec-51_sec_8-3a_Quadratic_Fcn_Graphs.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical.
Copyright © Cengage Learning. All rights reserved. 8 9 Correlation and Regression.
Describing Relationships. Least-Squares Regression  A method for finding a line that summarizes the relationship between two variables Only in a specific.
Copyright © Cengage Learning. All rights reserved. 8 4 Correlation and Regression.
The simple linear regression model and parameter estimation
Copyright © Cengage Learning. All rights reserved.
Lecture 9 Sections 3.3 Objectives:
CHAPTER 3 Describing Relationships
Chapter 5 STATISTICS (PART 4).
Licensed Electrical & Mechanical Engineer
CHAPTER 3 Describing Relationships
Regression All about going back (regressing) from the points to the function from which they came. We are looking at linear regression.
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
Licensed Electrical & Mechanical Engineer
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
CHAPTER 3 Describing Relationships
Presentation transcript:

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical Engineer Chabot Mathematics §7.4 Least Squares Regression

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 2 Bruce Mayer, PE Chabot College Mathematics Review §  Any QUESTIONS About §7.3 → Optimization of 2-Variable Functions  Any QUESTIONS About HomeWork §7.3 → HW

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 3 Bruce Mayer, PE Chabot College Mathematics §7.4 Learning Goals  Explore least-squares approximation of data as an optimization problem involving a function of two variables  Examine several applied problems using least-squares approximation of data  Discuss nonlinear curve-fitting techniques using least-squares approximation

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 4 Bruce Mayer, PE Chabot College Mathematics Scatter on plots on XY-Plane  A scatter plot usually shows how an EXPLANATORY, or Independent, variable affects a RESPONSE, or Dependent Variable  Sometimes the SHAPE of the scatter reveals a relationship  Shown Below is a Conceptual Scatter plot that could Relate the RESPONSE to some EXCITITATION

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 5 Bruce Mayer, PE Chabot College Mathematics Linear Fit by Guessing  The previous plot looks sort of Linear  We could use a Ruler to draw a y = mx+b line thru the data  But which Line is BETTER? and WHY?

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 6 Bruce Mayer, PE Chabot College Mathematics Least Squares Curve Fitting  Many Software programs Calculate “fitted” Values of m & b How does the Software Make these Calcs? How Good is the fitted Line Compared to the Data?  Most automated curve fitters, use the “Least Squares” Criterion

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 7 Bruce Mayer, PE Chabot College Mathematics Least Squares  To make a Good Fit, MINIMIZE the |GUESS − data| distance by one of data Best Guess-y Best Guess-x

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 8 Bruce Mayer, PE Chabot College Mathematics Least Squares Minimziation  To Minimize J take Simultaneously  The above produces Two Eqns in the Two UnKnown “Fitting” Parameters, m 0 & b 0

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 9 Bruce Mayer, PE Chabot College Mathematics Least Squares cont  It is Typical to Minimize the VERTICAL distances; i.e.:  Note that The Function J contains two Variables; m & b  Recall from the previous text sections that to MINIMIZE a Function of 2-Vars set the 1 st partial Derivatives equal to Zero

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 10 Bruce Mayer, PE Chabot College Mathematics Goodness of Fit  The Distance from The Best-Fit Line to the Actual Data Point is called the RESIDUAL  For the Vertical Distance the Residual is just δy  If the Sum of the Residuals were ZERO, then the Line would Fit Perfectly  Thus J, after finding m & b, is an Indication of the Goodness of Fit

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 11 Bruce Mayer, PE Chabot College Mathematics Goodness of Fit cont  Now J is an indication of Fit, but we Might want to SCALE it relative to the MAGNITUDE of the Data For example consider –DataSet1 with x&y values in the MILLIONS –DataSet2 with x&y values in the single digits In this case we would expect J1 >> J2  To remove the affect of Absolute Magnitude, Scale J against the Data Set mean; e.g mean1 = mean2 = 4.91

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 12 Bruce Mayer, PE Chabot College Mathematics Goodness of Fit cont  The Mean-Scaling Quantity is the Actual-Data Relative to the Actual-Mean  Finally the Scaled Fit-Metric, “r-squared’  As before the Squaring Ensures that all Terms in the sum are POSITIVE

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 13 Bruce Mayer, PE Chabot College Mathematics r 2 = Coeff of Determination  The r 2 Value is Also Called the COEFFICIENT OF DETERMINATION J  Sum of Residual (errors) –May be Zero or Positive S  Data-to-Mean Scaling Factor –Always Positive if >1 Data-Pt and data not “perfectly Horizontal”  If J = 0, then there is NO Distance Between the calculated Line and Data  Thus if J = 0, then r 2 = 1; so r 2 = 1 (or 100%) indicates a PERFECT FIT

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 14 Bruce Mayer, PE Chabot College Mathematics Meaning of r 2  The COEFFICIENT OF DETERMINATION  Has This Meaning The coefficient of determination tells you what proportion of the variation between the data points is explained or accounted for by the best line fitted to the points. It indicates how close the points are to the line.

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 15 Bruce Mayer, PE Chabot College Mathematics WhiteBoard Derivation Linear Regress Express MTH16_Lec-07a_sec_7-4_Linear-Regression_Least-Squares_Tutorial.pptx

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 16 Bruce Mayer, PE Chabot College Mathematics Example  Least Squares C p  The following data was recorded in an experiment which measured the variation of the specific heat of a chemical with temperature.  It is expected that the specific heat (C p ) should depend linearly on the temperature, T T (°C) C p (J/mol-°C)

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 17 Bruce Mayer, PE Chabot College Mathematics Example  Least Squares C p  For this situation Plot the data on a scatter Graph Fit a straight line to the data by eye; find the slope and intercept of this line; write an equation for this line. Perform a linear regression analysis on the C p data. Write an equation for this line Use the Regression Line Equation to Estimate the specific heat of this chemical when the temperature is 75 & 115 °C.

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 18 Bruce Mayer, PE Chabot College Mathematics Example  Least Squares C p  SOLUTION:  The scatter diagram shows each datum plotted with C p on the Y-axis, the Temperature plotted on the X-Axis  Now employ software (MATLAB or Excel), or a calculation by hand, to compute the CoEfficients of the Least- Squares Regression Line.

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 19 Bruce Mayer, PE Chabot College Mathematics C p Scatter Plot

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 20 Bruce Mayer, PE Chabot College Mathematics C p EyeBall & Regression Plots By Regression

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 21 Bruce Mayer, PE Chabot College Mathematics C p Interp & Extrap by Regression  Using the Regression Equation  Interpolate WithIn the Known Data At 75 °C find C p ≈ J/(mol°C)  Extrapolate OutSide the Known Data At 115 °C find C p ≈ J/(mol°C)  Note that Interpolation is generally much more reliable than Extrapolation

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 22 Bruce Mayer, PE Chabot College Mathematics Data Scaling - Normalization  The Significance of ANY Data Set Can be Improved by Normalizing  Normalize  Scale Data such that the Values run: 0 →1 0% → 100%  Steps to Normalization 1.Find the MAX & MIN values in the Data Set; e.g., z max & z min 2.Calculate the Data Range, R D R D = (z max – z min ) 3.Calc the Individual Data Differences Relative to the MIN Δz k = z k - z min

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 23 Bruce Mayer, PE Chabot College Mathematics Data Scaling – Normailzation cont 4.Finally, Scale the Δz k relative to R D Ψ k = Δz k /R D 5.Scale the corresponding “y” values in the Same Manner to produce say, Φ k 6.Plot Φ k vs Ψ k on x & y scales that Run from 0→1  Example – Do Frogs Croak More on WARM Nites? Temperature (ºF) Croaks/Hr

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 24 Bruce Mayer, PE Chabot College Mathematics Normalization Example  Normalize T → Θ CPH → Ω  Now Compare Plots CPH vs T Ω vs Θ

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 25 Bruce Mayer, PE Chabot College Mathematics Plots Compared  T-CPH Plot  Ω-Θ Plot The Θ-Ω Plot Fully Utilizes Both Axes

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 26 Bruce Mayer, PE Chabot College Mathematics Basic Fitting  Use MATLAB’s AutoMatic Fitting Utility to Find The Best Line for the the Frog Croaking Data SEE: Demo_Frog_Croak_BasicFit_1110.m

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 27 Bruce Mayer, PE Chabot College Mathematics WhiteBoard Work  No Problems From §7.4 Did Regression Derivation Instead

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 28 Bruce Mayer, PE Chabot College Mathematics All Done for Today m 0 =0 b 0 = y avg

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 29 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical Engineer Chabot Mathematics Appendix –

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 30 Bruce Mayer, PE Chabot College Mathematics P Skin Surface Area  Skin Area Formula based on easy to perform Measurements Where –S ≡ Surface Area in sq-meters –W ≡ Person’s mass in kg –H ≡ Height in CentiMeters (cm)  Make Contour Plot S(W,H), and find Height for W=18.37kg & S=0.048m2

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 31 Bruce Mayer, PE Chabot College Mathematics S(15.8kg,87.11cm)  By MuPad S := *(W^0.425)*(H^0.725) Sa = subs(S,W=15.83,H=87.11) –In Sq-Meters

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 32 Bruce Mayer, PE Chabot College Mathematics

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 33 Bruce Mayer, PE Chabot College Mathematics

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 34 Bruce Mayer, PE Chabot College Mathematics

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 35 Bruce Mayer, PE Chabot College Mathematics Basal Metabolism  The Harris-Benedict Power Eqns for Energy per Day in kgCalories Human Males Human Females –h ≡ hgt in cm, A ≡ in yrs, w ≡ weight in kg

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 36 Bruce Mayer, PE Chabot College Mathematics Basal Metabolism a)Find Ba := subs(Bm, w=90,h=190,A=22 b)Find Bb := subs(Bf, w=61,h=170,A=27)d

MTH16_Lec-01_sec_6-1_Integration_by_Parts.pptx 37 Bruce Mayer, PE Chabot College Mathematics Basal Metabolism c)Find Ac := subs(Am, wm=85, hm=193, Bmm=2108) d)Find Ad := subs(Af, wf=67, hf=173, Bff=1504)