Introduction to Statistical Modelling Example: Body and heart weights of cats. The R data frame cats, and the variables therein, are made available by.

Slides:



Advertisements
Similar presentations
AP Statistics.  Least Squares regression is a way of finding a line that summarizes the relationship between two variables.
Advertisements

Probabilistic & Statistical Techniques Eng. Tamer Eshtawi First Semester Eng. Tamer Eshtawi First Semester
Simple Regression. Major Questions Given an economic model involving a relationship between two economic variables, how do we go about specifying the.
Statistics 350 Lecture 16. Today Last Day: Introduction to Multiple Linear Regression Model Today: More Chapter 6.
Fall 2006 – Fundamentals of Business Statistics 1 Chapter 13 Introduction to Linear Regression and Correlation Analysis.
Chapter Topics Types of Regression Models
Linear Regression and Correlation Analysis
1 1 Slide Simple Linear Regression Chapter 14 BA 303 – Spring 2011.
Linear Regression Analysis
Chapters 8, 9, 10 Least Squares Regression Line Fitting a Line to Bivariate Data.
Inference for regression - Simple linear regression
Correlation Correlation measures the strength of the LINEAR relationship between 2 quantitative variables. Labeled as r Takes on the values -1 < r < 1.
OPIM 303-Lecture #8 Jose M. Cruz Assistant Professor.
1 1 Slide © 2007 Thomson South-Western. All Rights Reserved OPIM 303-Lecture #9 Jose M. Cruz Assistant Professor.
1 1 Slide © 2007 Thomson South-Western. All Rights Reserved Chapter 13 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 1 Slide Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple Coefficient of Determination n Model Assumptions n Testing.
Chapter 14 Multiple Regression Models. 2  A general additive multiple regression model, which relates a dependent variable y to k predictor variables.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 15 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
Non-Linear Regression. The data frame trees is made available in R with >data(trees) These record the girth in inches, height in feet and volume of timber.
Statistical Methods Statistical Methods Descriptive Inferential
3.2 Least Squares Regression Line. Regression Line Describes how a response variable changes as an explanatory variable changes Formula sheet: Calculator.
Simple Linear Regression. Deterministic Relationship If the value of y (dependent) is completely determined by the value of x (Independent variable) (Like.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 12: Analyzing the Association Between Quantitative Variables: Regression Analysis Section.
Regression Regression relationship = trend + scatter
1 Multiple Regression A single numerical response variable, Y. Multiple numerical explanatory variables, X 1, X 2,…, X k.
Introduction to Regression Analysis. Dependent variable (response variable) Measures an outcome of a study  Income  GRE scores Dependent variable =
3.2 - Least- Squares Regression. Where else have we seen “residuals?” Sx = data point - mean (observed - predicted) z-scores = observed - expected * note.
Worked Example Using R. > plot(y~x) >plot(epsilon1~x) This is a plot of residuals against the exploratory variable, x.
CHAPTER 5 Regression BPS - 5TH ED.CHAPTER 5 1. PREDICTION VIA REGRESSION LINE NUMBER OF NEW BIRDS AND PERCENT RETURNING BPS - 5TH ED.CHAPTER 5 2.
1 Association  Variables –Response – an outcome variable whose values exhibit variability. –Explanatory – a variable that we use to try to explain the.
28. Multiple regression The Practice of Statistics in the Life Sciences Second Edition.
Copyright © Cengage Learning. All rights reserved. 1 STRAIGHT LINES AND LINEAR FUNCTIONS.
Chapter 2 Examining Relationships.  Response variable measures outcome of a study (dependent variable)  Explanatory variable explains or influences.
SWBAT: Calculate and interpret the residual plot for a line of regression Do Now: Do heavier cars really use more gasoline? In the following data set,
Chapter 8: Simple Linear Regression Yang Zhenlin.
Residuals Recall that the vertical distances from the points to the least-squares regression line are as small as possible.  Because those vertical distances.
Non-Linear Regression. The data frame trees is made available in R with >data(trees) These record the girth in inches, height in feet and volume of timber.
Curve Fitting Pertemuan 10 Matakuliah: S0262-Analisis Numerik Tahun: 2010.
© 2001 Prentice-Hall, Inc.Chap 13-1 BA 201 Lecture 18 Introduction to Simple Linear Regression (Data)Data.
Example x y We wish to check for a non zero correlation.
Individual observations need to be checked to see if they are: –outliers; or –influential observations Outliers are defined as observations that differ.
Chapter 5 Lesson 5.2 Summarizing Bivariate Data 5.2: LSRL.
Chapter 14 Introduction to Regression Analysis. Objectives Regression Analysis Uses of Regression Analysis Method of Least Squares Difference between.
A little VOCAB.  Causation is the "causal relationship between conduct and result". That is to say that causation provides a means of connecting conduct.
BUSINESS MATHEMATICS & STATISTICS. Module 6 Correlation ( Lecture 28-29) Line Fitting ( Lectures 30-31) Time Series and Exponential Smoothing ( Lectures.
Statistics 350 Lecture 2. Today Last Day: Section Today: Section 1.6 Homework #1: Chapter 1 Problems (page 33-38): 2, 5, 6, 7, 22, 26, 33, 34,
STA302/1001 week 11 Regression Models - Introduction In regression models, two types of variables that are studied:  A dependent variable, Y, also called.
The simple linear regression model and parameter estimation
CHAPTER 3 Describing Relationships
Simple Linear Regression
CHAPTER 3 Describing Relationships
LEAST – SQUARES REGRESSION
CHAPTER 3 Describing Relationships
Correlation – Regression
Ch12.1 Simple Linear Regression
Simple Linear Regression - Introduction
CHAPTER 29: Multiple Regression*
Regression Models - Introduction
No notecard for this quiz!!
Least-Squares Regression
CHAPTER 3 Describing Relationships
Chapter 2 Looking at Data— Relationships
M248: Analyzing data Block D UNIT D2 Regression.
Least-Squares Regression
Homework: pg. 180 #6, 7 6.) A. B. The scatterplot shows a negative, linear, fairly weak relationship. C. long-lived territorial species.
Algebra Review The equation of a straight line y = mx + b
A medical researcher wishes to determine how the dosage (in mg) of a drug affects the heart rate of the patient. Find the correlation coefficient & interpret.
Introduction to Regression
Regression Models - Introduction
Presentation transcript:

Introduction to Statistical Modelling Example: Body and heart weights of cats. The R data frame cats, and the variables therein, are made available by typing > library(MASS) > data(cats) > attach(cats)

The data frame records the heart weights (Hwt), body weights (Bwt) and gender (Sex) of 47 female and 97 male adult cats. We regard heart weight as the response variable, and seek to model its conditional distribution, given (the values of) the explanatory variables body weight and gender. In other words, how does heart weight depend on body weight or gender?

Exploratory analysis The R code >boxplot(Hwt~Sex, xlab='gender', ylab='heart weight') produces a plot that clearly shows that heart weight depends on gender.

Similarly, the R code > plot(Hwt~Bwt, xlab='body weight (kg)', ylab='heart weight (g)', type='n') > points(Hwt[Sex=='M']~Bwt[Sex=='M']) > points(Hwt[Sex=='F']~Bwt[Sex=='F'], pch=3) produces the following plot of heart weight against body weight for male cats (denoted by o) and female cats (denoted by +).

Conclusion: It is clear that there is some dependence of heart weight on each of the two explanatory variables considered separately. Thus we might initially try further analysis for male cats alone.

Modelling the dependence of heart weight on body weight for male cats. Let y denote the response variable “heart weight”, and let x denote the explanatory variable “body weight”.

We now seek to fit a relationship of the form y = f(x) + є, where, for each x, the fit f(x) describes the average of the conditional distribution of y given x. The quantity є can then be thought of as a residual random variable describing the typical deviation of y from its average value.

Observation of the graph leads us to guess that there may be a linear dependence here. Thus the relationship is approximately y=a+bx+є, for some constants a and b These constants are chosen by the method of least squares regression so as to minimise the sum of squares of the є. They can be found using R

> lm(Hwt~Bwt) Gives the equation y = x є