CIVE2602 - Engineering Mathematics 2.2 (20 credits) Statistics and Probability Lecture 12- Linear regression review Transforming data -Coursework questions?

Slides:



Advertisements
Similar presentations
Correlation and regression
Advertisements

Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily quiz will be given at the.
STAT E-100 Section 2—Monday, September 23, :30-6:30PM, SC113.
Regression Analysis Once a linear relationship is defined, the independent variable can be used to forecast the dependent variable. Y ^ = bo + bX bo is.
Design of Experiments and Data Analysis. Let’s Work an Example Data obtained from MS Thesis Studied the “bioavailability” of metals in sediment cores.
LINEAR REGRESSION: Evaluating Regression Models Overview Assumptions for Linear Regression Evaluating a Regression Model.
LINEAR REGRESSION: Evaluating Regression Models. Overview Assumptions for Linear Regression Evaluating a Regression Model.
Statistics for the Social Sciences Psychology 340 Spring 2005 Prediction cont.
Lecture 23: Tues., Dec. 2 Today: Thursday:
Lecture 6: Multiple Regression
Stat 112: Lecture 8 Notes Homework 2: Due on Thursday Assessing Quality of Prediction (Chapter 3.5.3) Comparing Two Regression Models (Chapter 4.4) Prediction.
Lecture 24: Thurs. Dec. 4 Extra sum of squares F-tests (10.3) R-squared statistic (10.4.1) Residual plots (11.2) Influential observations (11.3,
1 4. Multiple Regression I ECON 251 Research Methods.
Regression Diagnostics Checking Assumptions and Data.
Business Statistics - QBM117 Statistical inference for regression.
Regression Model Building Setting: Possibly a large set of predictor variables (including interactions). Goal: Fit a parsimonious model that explains variation.
Assumption of Homoscedasticity
Week 14 Chapter 16 – Partial Correlation and Multiple Regression and Correlation.
Slide 1 Testing Multivariate Assumptions The multivariate statistical techniques which we will cover in this class require one or more the following assumptions.
Linear Regression/Correlation
Review for Final Exam Some important themes from Chapters 9-11 Final exam covers these chapters, but implicitly tests the entire course, because we use.
Multiple Linear Regression Response Variable: Y Explanatory Variables: X 1,...,X k Model (Extension of Simple Regression): E(Y) =  +  1 X 1 +  +  k.
Example of Simple and Multiple Regression
Statistics for the Social Sciences Psychology 340 Fall 2013 Tuesday, November 19 Chi-Squared Test of Independence.
Please CLOSE YOUR LAPTOPS, and turn off and put away your cell phones, and get out your note-taking materials. Today’s daily quiz will be given at the.
Inference for regression - Simple linear regression
Chapter 13: Inference in Regression
Correlation and Linear Regression
Statistical Analysis Topic – Math skills requirements.
Soc 3306a Lecture 9: Multivariate 2 More on Multiple Regression: Building a Model and Interpreting Coefficients.
Statistics: Unlocking the Power of Data Lock 5 STAT 101 Dr. Kari Lock Morgan Multiple Regression SECTIONS 9.2, 10.1, 10.2 Multiple explanatory variables.
Chapter 11 Linear Regression Straight Lines, Least-Squares and More Chapter 11A Can you pick out the straight lines and find the least-square?
Go to Table of Content Single Variable Regression Farrokh Alemi, Ph.D. Kashif Haqqi M.D.
Lecture 8 Simple Linear Regression (cont.). Section Objectives: Statistical model for linear regression Data for simple linear regression Estimation.
Multiple Regression Petter Mostad Review: Simple linear regression We define a model where are independent (normally distributed) with equal.
Regression Chapter 16. Regression >Builds on Correlation >The difference is a question of prediction versus relation Regression predicts, correlation.
STATISTICS 12.0 Correlation and Linear Regression “Correlation and Linear Regression -”Causal Forecasting Method.
11/23/2015Slide 1 Using a combination of tables and plots from SPSS plus spreadsheets from Excel, we will show the linkage between correlation and linear.
Chapter 22: Building Multiple Regression Models Generalization of univariate linear regression models. One unit of data with a value of dependent variable.
Multiple Logistic Regression STAT E-150 Statistical Methods.
Statistics: Unlocking the Power of Data Lock 5 STAT 101 Dr. Kari Lock Morgan 11/20/12 Multiple Regression SECTIONS 9.2, 10.1, 10.2 Multiple explanatory.
Introduction to Multiple Regression Lecture 11. The Multiple Regression Model Idea: Examine the linear relationship between 1 dependent (Y) & 2 or more.
Experimental Statistics - week 9
Using SPSS Note: The use of another statistical package such as Minitab is similar to using SPSS.
26134 Business Statistics Week 4 Tutorial Simple Linear Regression Key concepts in this tutorial are listed below 1. Detecting.
Assumptions of Multiple Regression 1. Form of Relationship: –linear vs nonlinear –Main effects vs interaction effects 2. All relevant variables present.
Week of March 23 Partial correlations Semipartial correlations
CIVE Engineering Mathematics 2.2 (20 credits) Statistics and Probability Lecture 4 Probability distributions -Poisson (discrete events) -Binomial.
CIVE1620- Engineering Mathematics 1.1 Lecturer: Dr Duncan Borman Differentiation –complex functions - Product Rule - Quotient Rule 2 nd Derivatives Lecture.
CIVE Engineering Mathematics 2.2 (20 credits) Statistics and Probability Lecture 10 Correlation (r-values) Linear Regression - Dependent and independent.
Statistics 10 Re-Expressing Data Get it Straight.
CIVE Engineering Mathematics 2.2 (20 credits) Statistics and Probability Lecture 6 Confidence intervals Confidence intervals for the sample mean.
LOGISTIC REGRESSION. Purpose  Logistical regression is regularly used when there are only two categories of the dependent variable and there is a mixture.
CIVE Engineering Mathematics 2.2 (20 credits) Statistics and Probability Lecture 11 Dr Duncan Borman Linear Regression -Techniques to assess how.
26134 Business Statistics Week 4 Tutorial Simple Linear Regression Key concepts in this tutorial are listed below 1. Detecting.
Stats Methods at IC Lecture 3: Regression.
Correlation, Bivariate Regression, and Multiple Regression
Data Analysis Module: Correlation and Regression
Statistics for the Social Sciences
How regression works The Right Questions about Statistics:
Tutorial 8: Probability Distribution
Regression Analysis Simple Linear Regression
Week 14 Chapter 16 – Partial Correlation and Multiple Regression and Correlation.
(Residuals and
Inferential Statistics
Statistical Methods For Engineers
CHAPTER 26: Inference for Regression
Lecture Notes The Relation between Two Variables Q Q
Hypothesis testing and Estimation
Simple Linear Regression
Presentation transcript:

CIVE Engineering Mathematics 2.2 (20 credits) Statistics and Probability Lecture 12- Linear regression review Transforming data -Coursework questions? ©Claudio Nunez 2010, sourced from _Building_destroyed_in_Concepci%C3%B3n.jpg?uselang=en-gb Available under creative commons license

Regression analysis Aim: To predict y from x (‘regressing y on x’) y x ~N(0,σ 2 )

Dependant variable (y) Independent or Control variable (x) What’s the “best fit” line? “minimises squared residuals” Find values for a and b (cover this in examples class)

How good is the regression? 3 techniques to be aware of – 1) Coefficient of Determination (R 2 ) 2) Examine the residuals (plot and evaluate) 3) Significance tests (find p-values for α and β ) (value between 0 and 1 (i.e %) Coursework Question 2- When considering indicators of goodness of fit. These approaches would need to evaluated to get a full picture of how well the model fits the data. Discuss your model assumptions Indicators of goodness of fit.

Some data… Amplitude of vibrations measured on a bridge support vs number of cars driving across at any one time Graphs>interactive>scatter> Number of cars Amplitude of vibration (mm) ©Terraplanner 2007, sourced from Available under creative commons license

Assumptions of regression Try a scatterplot (again!) or plot residuals… Residuals OKBAD The independent (x) variable is measured without error (!) ‘Errors’ in dependent (y) variable are normally distributed Variance in dependent variable is constant Relationship between variables is linear

If we suspect that relation between the x and y is NOT linear we can try to apply transforms to x and/or y to see if we can find a relationship

Testing the assumptions Variance: not OK Linearity: OK So let’s log transform y variable… Number of cars Amplitude of vibration (mm) R 2 =0.74

What happens… R 2 =0.54 Residuals: Not OK Variance: OK Linearity: not OK Number of cars Vibrations (mm) ln(y) log transform y variable applied

Transformation affects linearity…. Log (x) Log (y) Log(x), Log(y) BeforeAfter There are lots of other transforms you can try e.g. squaring or cubing x or y or both etc

May need to transform x variable as well… R 2 =0.79 Residuals: OK Variance: OK Linearity: OK Number of cars (ln(x)) Vibrations (mm) (ln(y)) ln(y) = ln(1.88)+1.47ln(x) ln(y) = ln(1.88)+ln(x 1.47 ) ln(y) = ln(1.88x 1.47 ) y= 1.88x 1.47

R 2 =0.82 Residuals: OK Variance: OK Linearity: OK Sample diameter(ln(x)) Failure strength (KN) (ln(y)) ln(y) = ln(2)+1.5ln(x) ln(y) = ln(2)+ln(x 1.5 ) ln(y) = ln(2x 1.5 ) y= 2x 1.5 Another log log graph What is the equation for y in terms of x?

R 2 =0.75 Residuals: OK Variance: OK Linearity: OK Curing time (weeks) Crushing strength (KN) (ln(y)) A different log(y), x graph What is the equation for y in terms of x? ln(y) = 3 + 5x

We perform another regression on our transformed data and see if we get a better regression

More than 1 independent (‘predictor’) variable: Multiple Regression e.g. bridge vibrations (z) as a function of number of cars (x) and wind speed (y) Z (vibrations) No. of cars Wind speed

Multiple Regression Fit best Plane (x,y) to explain z - minimise (residual)² just as in linear Conceptually identical to linear model Can similarly use any number of predictor variables - fitting hyperplanes in multidimensional space… z (amplitude of vibrations) x (no. of cars) Model : z = a + b 1 x + b 2 y Note: effects of x & y are both linear, and are additive y (wind speed)

In this week examples class... You will undertake a regression using Excel Download the data from the VLE and open in Excel Work through the work sheet and it will take you through a regression and evaluating it. Make the best use of the time and ask in the class if you don’t understand. Course work hand in extend to 28 th March

CIVE Engineering Mathematics 2.2 feedback TURN ON 1)Enter Character in <> brackets seen on yellow bar (if it asks for a user ID put a “0” – this make you anonymous) 2)When asked a question you can enter a letter or number and press enter (green button) Use the scale below for A-E to answer the TEST question ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree

CIVE Engineering Mathematics 2.2 Feedback on resources for the whole level 2 Engineering Maths Module (Stats and other maths) ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 1 In general I have found the range of online resources useful for this module useful. (e.g. VLE material, Mathlab, support, links to online resources etc)

CIVE Engineering Mathematics 2.2 Feedback on resources ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 2 I have found the Mathlab tasks have helped with my understanding of the module (Eng Math and Stats).

CIVE Engineering Mathematics 2.2 Feedback on resources ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 2b I have found the weekly Examples classes useful for the Statistics part of the module.

CIVE Engineering Mathematics 2.2 Feedback on resources ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 3 I have (or intend to) make use of the online lecture slides or lecture videos that are posted on the VLE (the ones of the lectures).

CIVE Engineering Mathematics 2.2 Feedback on resources ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 4 I have made use of some of the other online links to Maths resources that have been linked to from the VLE page.

CIVE Engineering Mathematics 2.2 Feedback on resources ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 5 I feel the approaches used in the Engineering Maths module (which include working through examples in lecture and using directed out of lecture tasks) has helped to improve my understanding of the maths material.

CIVE Engineering Mathematics 2.2 Module feedback ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 6 It is difficult to read/follow the text added to the slides using the Tablet

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 7 I find it easier to follow mathematical material when it is written during the lecture on the tablet

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 8 The use of the A, B, C, D cards during a lecture is helpful for feeding back understanding of lecture material

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 9 The use of the A, B, C, D cards and can be useful for helping me to engage with a lecture

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 10 The general interactive elements in the lectures help me to engage with the lecture material.

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 11 I feel I understand the majority of the material covered in this module.

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 12 I would have liked this module to have covered more Civil Engineering Maths Examples

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 13 I feel I am confident with my maths ability

CIVE Engineering Mathematics 2.2 Feedback on resources ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 4 I have found the weekly Examples classes useful for the Statistics part of the module.

CIVE Engineering Mathematics 2.2 Feedback on resources ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 5 For the Limits and series section of the module I found the Problem Sheets useful for developing my understanding of the material.

CIVE Engineering Mathematics 2.2 Module feedback ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 6 Having material hand written using the Tablet computer was difficult to read.

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 7 I find it easier to follow maths material when it is written during the lecture on the tablet

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 8 I can see the value of using the A, B, C, D cards during the lecture.

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 9 Interactive elements in lectures have helped me to engage with the material

CIVE Engineering Mathematics 2.2 ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 10 I can see the relevance of the mathematical content of this module to my degree course.

CIVE Engineering Mathematics 2.2 Feedback on resources ABCDE Strongly agree AgreeNeither agree or disagree DisagreeStrongly disagree Question 11 I feel I understand the majority of the material covered in this module.

Coursework Due in on Tuesday 16 th March 12 sides maximum Need to submit online (VLE) and hardcopy by 4pm (late penalties apply until both submitted) Major coursework rules apply. Please take care not to plagiarise! –It will be taken very seriously, group work on this major coursework would constitute plagiarism (plagiarism software is a now used as normal practice on all submissions) Final lecture tomorrow is in Computer cluster 504. If you have any questions regarding coursework etc- I will make time to answer them) (examples class continue into next week)

More than one answer is allowed!

Definition of a mutually exclusive event If event A happens, then event B cannot, or vice-versa. The two events "it rained on Tuesday" and "it did not rain on Tuesday" are mutually exclusive events. Independent events The outcome of event A, has no effect on the outcome of event B. Such as "It rained on Tuesday" and "My chair broke at work".

Where S x is the larger

Is F 20,20 < F calculated if no, then NO significant difference

z or t