(Go: >> BACK << -|- >> HOME <<)

SlideShare a Scribd company logo
Simple Linear Regression and Correlation Teaching Assistant:  Zuo Xiaoyu Chapter  8
Outline   Discussion part Steps of performing correlation and regression The  Distinguish and connection  Between  Linear Correlation and Regression? Experiment part (incorporated in discussion part) Simple linear correlation Simple linear regression Exercise part
Discussion part
Case In a study of the relationship between plasma amphetamine levels and amphetamine-induced psychosis, 10 psychosis amphetamine abusers underwent psychiatric evaluation and were assigned a psychosis intensity score. At the same time, plasma amphetamine levels in these patients were determined. The results are shown in Table 8-1 Data file: discussion.sav
Table 8-1 psychosis intensity scores and plasma amphetamine levels for 10 chronic amphetamine abusers 475 55 10 350 40 9 200 15 8 425 50 7 400 35 6 450 45 5 150 15 4 250 20 3 300 30 2 150 10 1 Plasma amphetamine mg/ml (X) Psychosis intensity score (Y) patient
Question 1 Is there an intuitive relationship between plasma amphetamine levels and amphetamine-induced psychosis ? Scatter plot diagram Both variables are random
Procedure 8.1.2  Data File   Variable Name: x; Variable Label: Psychosis intensity scores Variable Name: y; Variable Label: Plasma amphetamine (mg/ml) 8.1.3  Procedure  (1)   scatter diagram   from the menus, choose: Analyze  Graphs  Scatter In scatter plot box, choose “simple”, click on  button. In simple Scatter plot box, move  y  to the box of “Y Axis” and move  x  to the box of “X Axis”, click on  button.
Procedure
Scatter  diagram
Different types of relation
Question 2 How to quantify the relationship between plasma amphetamine levels and amphetamine-induced psychosis ? Correlation coefficient
Procedure (2) From the menus, choose: Analyze  Correlate  Bivariate, open “Bivariate Correlations” dialog box; move  y  and  x  to the “Variable” box; choose “Pearson” for Correlation Coefficients (default), or choose “spearman” if the variable are not normal distributed; click on  button.
 
Output and Interpretation Pearson  correlation Spearman  correlation
Correlation Coefficient Pearson correlation coefficient Spearman’s rank correlation coefficient Both  X  and  Y  are random X  and  Y  follow bivariate normal distribution
Spearman’s rank correlation coefficient It is useful to: ranked data   As well as  measurement data ----  not follow a normal distribution ;  or  not sure about the distribution;  or  not precisely measured or  X or Y are ordinal variables
    The  direction  of correlation?  -- positive or negative  The  strength  of correlation? high or not? -- Is the absolute value big enough?  Complete correlation :  +1 or -1,  Understanding the  r
Question 3 Can we draw a conclusion that plasma amphetamine levels are correlated with amphetamine-induced psychosis in population? What is the actual situation in population? Hypothesis testing on  r Interval estimate of  ρ
Hypothesis testing and interval estimation t   test   (Assume normal distribution)     H 0 :  ρ =0,  H 1 :  ρ ≠0 Interval estimation Inverse  of  hyperbolic tangent
Short summary Scatter plot diagram   Compute correlation index (descriptive) Is the index  statistically significant? -----hypothesis testing  (inference) Interpretation of correlation coefficient (application)
Question 4 Could we predict the psychosis intensity score from the plasma amphetamine levels ? EX: Could we estimate and predict the psychosis intensity score when the plasma amphetamine levels is 440 and 460? Linear regression
Procedure  From the menus, choose: Analyze  Regression  Linear, open “Linear Regression” dialog box; move  y  to “Dependent” box and move  x  to “Independent” box; click on  button.
Y X
Output and Interpretation Intercept and slope
Question 5 Could this regression equation be established in the our studying population? Could we use this regression equation to predict the psychosis intensity score when the plasma amphetamine levels is 440 and 460, respectively?  Hypothesis testing on the total equation--ANOVA
Output and Interpretation ANOVA result
Question 6 What is the proportion of the psychosis intensity score could we explain from the plasma amphetamine levels ? Could we view the plasma amphetamine levels as the influence factor of the amphetamine-induced psychosis ? R square Hypothesis testing on regression coefficient--- t -test
Output and Interpretation R square Hypothesis testing on the regression coefficient
Short summary Scatter plot diagram   Compute the slope and intercept of sample (descriptive) Is the regression equation significant? -----ANOVA  (inference) Is the regression coefficient significant? -----one sample  t -test  (inference) Interpretation and application of the regression model. (application)
Basic assumptions    ----  LINE (1)  L inear  :  There exists a linear tendency between the dependent variable and the independent variable (2)  I ndependent  :  The individual observations are independent each other (3)   N ormal   :  Given the value of, the corresponding follows a normal distribution  (4)  E qual   variances  :  The variances of  for different values of are all equal, denoted with .
Pre-requisite for linear regression (1)  Linear  : There exists a linear tendency between the dependent variable and the independent variable (2)  Independent  : The individual observations are independent each other (3)  Normal  : Given the value of, the corresponding follows a normal distribution  (4)  Equal variances  : The variances of  for different values of are all equal, denoted with .
Summary of  discussion part
Two types of questions: Whether there is a linear relationship?  --  Linear correlation How to predict one variable by another variable? --  Linear regression
Summary  The  Distinguish and connection  Between Linear Correlation and Regression? Basic concepts Basic assumptions for data Correlation Coefficient and Regression Coefficient
Summary  Assumptions: Correlation: Both  X  and  Y  are random  Regression: (LINE) Y  must be random  X  could be random or not   random Correlation Coefficient (r)
Summary  Linear Regression Equation, Regression Coefficient (b) Try to estimate    and    , getting
Summary  Connection:  When both  X  and  Y  are random  1) Same sign for Correlation Coefficient  and Regression Coefficient  2)  t  tests are equivalent  t r  =  t b 3) Determination   Coefficient  R=SS regression /SS total R=r 2
3. For bivariate normal distributed variables, regression could be used to interpret correlation: The high determine coefficient indicates the X is closely correlated to Y.    2. The hypothesis testing for correlation coefficient and regression coefficient is equivalent. 1. The correlation coefficient has the same sign as regression coefficient. connection 1.investigate the quantitative dependency relationship between variables 2.prediction  3. variable selection   investigate the quantitative association   Application  Independent variable be a normally distributed random variable.   Bivariate normal distribution   Pre-requisite Investigate the dependency relationship between the independent and dependent variables.   Quantify the relationship between two or more variables.   Implication Regression  Correlation
Discussion——true or false? 1. Put any two variables together for correlation and regression ? ( ×  They must have some relation in subject matter) 2. Correlation and regression mean causality? ( ×  sometimes may be indirect relation or even no any real relation) 3.  A big value of  r  means a big regression coefficient  b ? ( × ) 4. To reject  means that the correlation is strong? (×  just only means  )
Discussion——true or false? 5. A regression equation is statistically significant means that one can well predict  Y   by  X  ? ( ×  well predict or not depends on coefficient of determination) 6. The regression equation is allowed to be applied beyond the range of the data set ? ( × )
To explore the correlation between  the heights of father and son, 20 graduate male  students were randomly selected from a name  list of graduates in a high school. The heights  (cm) of fathers and sons were measured.  (1) What is the relationship of the heights of father and son? (2) Can we predict the son’s height if a father with height 166 cm? Exercise
Heights (cm) of 20 pairs of father and son
About  Homework Test for  D ifference   —— treated as paired design Test for  A ssociation   —— treated as independent design McNemar
Assignment P 129  N. 5
Thank you!!!

More Related Content

What's hot

Regression analysis
Regression analysisRegression analysis
Regression analysis
Shameer P Hamsa
 
Estimating a Population Proportion
Estimating a Population Proportion  Estimating a Population Proportion
Estimating a Population Proportion
Long Beach City College
 
Measure of Central Tendency (Mean, Median, Mode and Quantiles)
Measure of Central Tendency (Mean, Median, Mode and Quantiles)Measure of Central Tendency (Mean, Median, Mode and Quantiles)
Measure of Central Tendency (Mean, Median, Mode and Quantiles)
Salman Khan
 
Measures of central tendency ppt
Measures of central tendency pptMeasures of central tendency ppt
Measures of central tendency ppt
NighatKanwal
 
Basics of Educational Statistics (Descriptive statistics)
Basics of Educational Statistics (Descriptive statistics)Basics of Educational Statistics (Descriptive statistics)
Basics of Educational Statistics (Descriptive statistics)
HennaAnsari
 
Introduction to Statistics
Introduction to StatisticsIntroduction to Statistics
Introduction to Statistics
Saurav Shrestha
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
ewhite00
 
Introduction To Statistics
Introduction To StatisticsIntroduction To Statistics
Introduction To Statistics
albertlaporte
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
cbt1213
 
Statistical inference
Statistical inferenceStatistical inference
Statistical inference
Jags Jagdish
 
Point Estimation
Point Estimation Point Estimation
Confidence Intervals
Confidence IntervalsConfidence Intervals
Confidence Intervals
mandalina landy
 
Analysis of variance (ANOVA) everything you need to know
Analysis of variance (ANOVA) everything you need to knowAnalysis of variance (ANOVA) everything you need to know
Analysis of variance (ANOVA) everything you need to know
Stat Analytica
 
Correlation IN STATISTICS
Correlation IN STATISTICSCorrelation IN STATISTICS
Correlation IN STATISTICS
Kriace Ward
 
Descriptive and Inferential Statistics
Descriptive and Inferential StatisticsDescriptive and Inferential Statistics
Descriptive and Inferential Statistics
Danica Antiquina
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
Muhammadasif909
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
saba khan
 
Meaning and Importance of Statistics
Meaning and Importance of StatisticsMeaning and Importance of Statistics
Meaning and Importance of Statistics
Flipped Channel
 
Hypothesis testing Part1
Hypothesis testing Part1Hypothesis testing Part1
Hypothesis testing Part1
Akhila Prabhakaran
 
F test and ANOVA
F test and ANOVAF test and ANOVA
F test and ANOVA
Parag Shah
 

What's hot (20)

Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Estimating a Population Proportion
Estimating a Population Proportion  Estimating a Population Proportion
Estimating a Population Proportion
 
Measure of Central Tendency (Mean, Median, Mode and Quantiles)
Measure of Central Tendency (Mean, Median, Mode and Quantiles)Measure of Central Tendency (Mean, Median, Mode and Quantiles)
Measure of Central Tendency (Mean, Median, Mode and Quantiles)
 
Measures of central tendency ppt
Measures of central tendency pptMeasures of central tendency ppt
Measures of central tendency ppt
 
Basics of Educational Statistics (Descriptive statistics)
Basics of Educational Statistics (Descriptive statistics)Basics of Educational Statistics (Descriptive statistics)
Basics of Educational Statistics (Descriptive statistics)
 
Introduction to Statistics
Introduction to StatisticsIntroduction to Statistics
Introduction to Statistics
 
Inferential Statistics
Inferential StatisticsInferential Statistics
Inferential Statistics
 
Introduction To Statistics
Introduction To StatisticsIntroduction To Statistics
Introduction To Statistics
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
Statistical inference
Statistical inferenceStatistical inference
Statistical inference
 
Point Estimation
Point Estimation Point Estimation
Point Estimation
 
Confidence Intervals
Confidence IntervalsConfidence Intervals
Confidence Intervals
 
Analysis of variance (ANOVA) everything you need to know
Analysis of variance (ANOVA) everything you need to knowAnalysis of variance (ANOVA) everything you need to know
Analysis of variance (ANOVA) everything you need to know
 
Correlation IN STATISTICS
Correlation IN STATISTICSCorrelation IN STATISTICS
Correlation IN STATISTICS
 
Descriptive and Inferential Statistics
Descriptive and Inferential StatisticsDescriptive and Inferential Statistics
Descriptive and Inferential Statistics
 
Hypothesis testing
Hypothesis testingHypothesis testing
Hypothesis testing
 
Regression analysis
Regression analysisRegression analysis
Regression analysis
 
Meaning and Importance of Statistics
Meaning and Importance of StatisticsMeaning and Importance of Statistics
Meaning and Importance of Statistics
 
Hypothesis testing Part1
Hypothesis testing Part1Hypothesis testing Part1
Hypothesis testing Part1
 
F test and ANOVA
F test and ANOVAF test and ANOVA
F test and ANOVA
 

Similar to Lesson 8 Linear Correlation And Regression

Chapter 08correlation
Chapter 08correlationChapter 08correlation
Chapter 08correlation
ghalan
 
Ch 7 correlation_and_linear_regression
Ch 7 correlation_and_linear_regressionCh 7 correlation_and_linear_regression
Ch 7 correlation_and_linear_regression
Omar (TUBBS 128) Ventura VII
 
2-20-04.ppt
2-20-04.ppt2-20-04.ppt
2-20-04.ppt
ayaan522797
 
Research Methodology Module-06
Research Methodology Module-06Research Methodology Module-06
Research Methodology Module-06
Kishor Ade
 
Fundamental of Statistics and Types of Correlations
Fundamental of Statistics and Types of CorrelationsFundamental of Statistics and Types of Correlations
Fundamental of Statistics and Types of Correlations
Rajesh Verma
 
Ch8 Regression Revby Rao
Ch8 Regression Revby RaoCh8 Regression Revby Rao
Ch8 Regression Revby Rao
Sumit Prajapati
 
Applied statistics part 4
Applied statistics part  4Applied statistics part  4
Quantitative Data analysis
Quantitative Data analysisQuantitative Data analysis
Quantitative Data analysis
Muhammad Musawar Ali
 
Measure of Association
Measure of AssociationMeasure of Association
Measure of Association
Kalahandi University
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
Antony Raj
 
5 regressionand correlation
5 regressionand correlation5 regressionand correlation
5 regressionand correlation
Lama K Banna
 
Assessment 2 ContextIn many data analyses, it is desirable.docx
Assessment 2 ContextIn many data analyses, it is desirable.docxAssessment 2 ContextIn many data analyses, it is desirable.docx
Assessment 2 ContextIn many data analyses, it is desirable.docx
festockton
 
Assessment 2 ContextIn many data analyses, it is desirable.docx
Assessment 2 ContextIn many data analyses, it is desirable.docxAssessment 2 ContextIn many data analyses, it is desirable.docx
Assessment 2 ContextIn many data analyses, it is desirable.docx
galerussel59292
 
Chapter 9 Regression
Chapter 9 RegressionChapter 9 Regression
Chapter 9 Regression
ghalan
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
Antony Raj
 
cannonicalpresentation-110505114327-phpapp01.pdf
cannonicalpresentation-110505114327-phpapp01.pdfcannonicalpresentation-110505114327-phpapp01.pdf
cannonicalpresentation-110505114327-phpapp01.pdf
JermaeDizon2
 
Correlation
CorrelationCorrelation
Multiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA IMultiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA I
James Neill
 
Correlation analysis
Correlation analysisCorrelation analysis
Correlation analysis
Awais Salman
 
Statistical testing.pptxstatisctics bachelors
Statistical testing.pptxstatisctics bachelorsStatistical testing.pptxstatisctics bachelors
Statistical testing.pptxstatisctics bachelors
AbdulHaseebKhattak
 

Similar to Lesson 8 Linear Correlation And Regression (20)

Chapter 08correlation
Chapter 08correlationChapter 08correlation
Chapter 08correlation
 
Ch 7 correlation_and_linear_regression
Ch 7 correlation_and_linear_regressionCh 7 correlation_and_linear_regression
Ch 7 correlation_and_linear_regression
 
2-20-04.ppt
2-20-04.ppt2-20-04.ppt
2-20-04.ppt
 
Research Methodology Module-06
Research Methodology Module-06Research Methodology Module-06
Research Methodology Module-06
 
Fundamental of Statistics and Types of Correlations
Fundamental of Statistics and Types of CorrelationsFundamental of Statistics and Types of Correlations
Fundamental of Statistics and Types of Correlations
 
Ch8 Regression Revby Rao
Ch8 Regression Revby RaoCh8 Regression Revby Rao
Ch8 Regression Revby Rao
 
Applied statistics part 4
Applied statistics part  4Applied statistics part  4
Applied statistics part 4
 
Quantitative Data analysis
Quantitative Data analysisQuantitative Data analysis
Quantitative Data analysis
 
Measure of Association
Measure of AssociationMeasure of Association
Measure of Association
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
5 regressionand correlation
5 regressionand correlation5 regressionand correlation
5 regressionand correlation
 
Assessment 2 ContextIn many data analyses, it is desirable.docx
Assessment 2 ContextIn many data analyses, it is desirable.docxAssessment 2 ContextIn many data analyses, it is desirable.docx
Assessment 2 ContextIn many data analyses, it is desirable.docx
 
Assessment 2 ContextIn many data analyses, it is desirable.docx
Assessment 2 ContextIn many data analyses, it is desirable.docxAssessment 2 ContextIn many data analyses, it is desirable.docx
Assessment 2 ContextIn many data analyses, it is desirable.docx
 
Chapter 9 Regression
Chapter 9 RegressionChapter 9 Regression
Chapter 9 Regression
 
Correlation and regression
Correlation and regressionCorrelation and regression
Correlation and regression
 
cannonicalpresentation-110505114327-phpapp01.pdf
cannonicalpresentation-110505114327-phpapp01.pdfcannonicalpresentation-110505114327-phpapp01.pdf
cannonicalpresentation-110505114327-phpapp01.pdf
 
Correlation
CorrelationCorrelation
Correlation
 
Multiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA IMultiple Linear Regression II and ANOVA I
Multiple Linear Regression II and ANOVA I
 
Correlation analysis
Correlation analysisCorrelation analysis
Correlation analysis
 
Statistical testing.pptxstatisctics bachelors
Statistical testing.pptxstatisctics bachelorsStatistical testing.pptxstatisctics bachelors
Statistical testing.pptxstatisctics bachelors
 

More from Sumit Prajapati

Pericardial abnormal findings
Pericardial abnormal findingsPericardial abnormal findings
Pericardial abnormal findings
Sumit Prajapati
 
Diagnostic radiology of cardiovascular 2009
Diagnostic radiology of cardiovascular 2009Diagnostic radiology of cardiovascular 2009
Diagnostic radiology of cardiovascular 2009
Sumit Prajapati
 
20100603 acute glomerulonephritis
20100603 acute glomerulonephritis20100603 acute glomerulonephritis
20100603 acute glomerulonephritis
Sumit Prajapati
 
05 diagnostic tests cwq
05 diagnostic tests cwq05 diagnostic tests cwq
05 diagnostic tests cwq
Sumit Prajapati
 
3 cross sectional study
3 cross sectional study3 cross sectional study
3 cross sectional study
Sumit Prajapati
 
3 cross sectional study
3 cross sectional study3 cross sectional study
3 cross sectional study
Sumit Prajapati
 
2.epidemilogic measures
2.epidemilogic measures2.epidemilogic measures
2.epidemilogic measures
Sumit Prajapati
 
1 introduction of epidmiology
1 introduction of epidmiology1 introduction of epidmiology
1 introduction of epidmiology
Sumit Prajapati
 
Anesthesia outside the operating room
Anesthesia outside the operating roomAnesthesia outside the operating room
Anesthesia outside the operating room
Sumit Prajapati
 
Neonatal septicemia
Neonatal septicemiaNeonatal septicemia
Neonatal septicemia
Sumit Prajapati
 
Neonatal cold injury syndrome
Neonatal cold injury syndromeNeonatal cold injury syndrome
Neonatal cold injury syndrome
Sumit Prajapati
 
C:\Documents And Settings\Administrator\桌面\13 Uri
C:\Documents And Settings\Administrator\桌面\13 UriC:\Documents And Settings\Administrator\桌面\13 Uri
C:\Documents And Settings\Administrator\桌面\13 Uri
Sumit Prajapati
 
C:\documents and settings\administrator\桌面\11 fluid therapy
C:\documents and settings\administrator\桌面\11 fluid therapyC:\documents and settings\administrator\桌面\11 fluid therapy
C:\documents and settings\administrator\桌面\11 fluid therapy
Sumit Prajapati
 
08 pain lishangrong 2
08 pain lishangrong 208 pain lishangrong 2
08 pain lishangrong 2
Sumit Prajapati
 
Administration of general anesthesia
Administration of general anesthesiaAdministration of general anesthesia
Administration of general anesthesia
Sumit Prajapati
 
5 regional anesthesia
5 regional anesthesia5 regional anesthesia
5 regional anesthesia
Sumit Prajapati
 
3 general anethesia
3 general anethesia3 general anethesia
3 general anethesia
Sumit Prajapati
 
2 safety in anesthesia
2 safety in anesthesia2 safety in anesthesia
2 safety in anesthesia
Sumit Prajapati
 
1 evaluating the patient before the anesthesia(2009.2.23 27)
1 evaluating the patient before the anesthesia(2009.2.23 27)1 evaluating the patient before the anesthesia(2009.2.23 27)
1 evaluating the patient before the anesthesia(2009.2.23 27)
Sumit Prajapati
 
9 tuberculosis tanweiping
9 tuberculosis tanweiping9 tuberculosis tanweiping
9 tuberculosis tanweiping
Sumit Prajapati
 

More from Sumit Prajapati (20)

Pericardial abnormal findings
Pericardial abnormal findingsPericardial abnormal findings
Pericardial abnormal findings
 
Diagnostic radiology of cardiovascular 2009
Diagnostic radiology of cardiovascular 2009Diagnostic radiology of cardiovascular 2009
Diagnostic radiology of cardiovascular 2009
 
20100603 acute glomerulonephritis
20100603 acute glomerulonephritis20100603 acute glomerulonephritis
20100603 acute glomerulonephritis
 
05 diagnostic tests cwq
05 diagnostic tests cwq05 diagnostic tests cwq
05 diagnostic tests cwq
 
3 cross sectional study
3 cross sectional study3 cross sectional study
3 cross sectional study
 
3 cross sectional study
3 cross sectional study3 cross sectional study
3 cross sectional study
 
2.epidemilogic measures
2.epidemilogic measures2.epidemilogic measures
2.epidemilogic measures
 
1 introduction of epidmiology
1 introduction of epidmiology1 introduction of epidmiology
1 introduction of epidmiology
 
Anesthesia outside the operating room
Anesthesia outside the operating roomAnesthesia outside the operating room
Anesthesia outside the operating room
 
Neonatal septicemia
Neonatal septicemiaNeonatal septicemia
Neonatal septicemia
 
Neonatal cold injury syndrome
Neonatal cold injury syndromeNeonatal cold injury syndrome
Neonatal cold injury syndrome
 
C:\Documents And Settings\Administrator\桌面\13 Uri
C:\Documents And Settings\Administrator\桌面\13 UriC:\Documents And Settings\Administrator\桌面\13 Uri
C:\Documents And Settings\Administrator\桌面\13 Uri
 
C:\documents and settings\administrator\桌面\11 fluid therapy
C:\documents and settings\administrator\桌面\11 fluid therapyC:\documents and settings\administrator\桌面\11 fluid therapy
C:\documents and settings\administrator\桌面\11 fluid therapy
 
08 pain lishangrong 2
08 pain lishangrong 208 pain lishangrong 2
08 pain lishangrong 2
 
Administration of general anesthesia
Administration of general anesthesiaAdministration of general anesthesia
Administration of general anesthesia
 
5 regional anesthesia
5 regional anesthesia5 regional anesthesia
5 regional anesthesia
 
3 general anethesia
3 general anethesia3 general anethesia
3 general anethesia
 
2 safety in anesthesia
2 safety in anesthesia2 safety in anesthesia
2 safety in anesthesia
 
1 evaluating the patient before the anesthesia(2009.2.23 27)
1 evaluating the patient before the anesthesia(2009.2.23 27)1 evaluating the patient before the anesthesia(2009.2.23 27)
1 evaluating the patient before the anesthesia(2009.2.23 27)
 
9 tuberculosis tanweiping
9 tuberculosis tanweiping9 tuberculosis tanweiping
9 tuberculosis tanweiping
 

Recently uploaded

Blockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre timesBlockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre times
anupriti
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum ThreatsNavigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
anupriti
 
Performance Budgets for the Real World by Tammy Everts
Performance Budgets for the Real World by Tammy EvertsPerformance Budgets for the Real World by Tammy Everts
Performance Budgets for the Real World by Tammy Everts
ScyllaDB
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
this resume for sadika shaikh bca student
this resume for sadika shaikh bca studentthis resume for sadika shaikh bca student
this resume for sadika shaikh bca student
SadikaShaikh7
 
K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024
The Digital Insurer
 
AI_dev Europe 2024 - From OpenAI to Opensource AI
AI_dev Europe 2024 - From OpenAI to Opensource AIAI_dev Europe 2024 - From OpenAI to Opensource AI
AI_dev Europe 2024 - From OpenAI to Opensource AI
Raphaël Semeteys
 
HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)
Alpen-Adria-Universität
 
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design ApproachesKnowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Earley Information Science
 
Lessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien RiouxLessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien Rioux
crioux1
 
Running a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU ImpactsRunning a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU Impacts
ScyllaDB
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
Matthew Sinclair
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
Data Protection in a Connected World: Sovereignty and Cyber Security
Data Protection in a Connected World: Sovereignty and Cyber SecurityData Protection in a Connected World: Sovereignty and Cyber Security
Data Protection in a Connected World: Sovereignty and Cyber Security
anupriti
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 

Recently uploaded (20)

Blockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre timesBlockchain and Cyber Defense Strategies in new genre times
Blockchain and Cyber Defense Strategies in new genre times
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum ThreatsNavigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
Navigating Post-Quantum Blockchain: Resilient Cryptography in Quantum Threats
 
Performance Budgets for the Real World by Tammy Everts
Performance Budgets for the Real World by Tammy EvertsPerformance Budgets for the Real World by Tammy Everts
Performance Budgets for the Real World by Tammy Everts
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
this resume for sadika shaikh bca student
this resume for sadika shaikh bca studentthis resume for sadika shaikh bca student
this resume for sadika shaikh bca student
 
K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024K2G - Insurtech Innovation EMEA Award 2024
K2G - Insurtech Innovation EMEA Award 2024
 
AI_dev Europe 2024 - From OpenAI to Opensource AI
AI_dev Europe 2024 - From OpenAI to Opensource AIAI_dev Europe 2024 - From OpenAI to Opensource AI
AI_dev Europe 2024 - From OpenAI to Opensource AI
 
HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)HTTP Adaptive Streaming – Quo Vadis (2024)
HTTP Adaptive Streaming – Quo Vadis (2024)
 
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design ApproachesKnowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
Knowledge and Prompt Engineering Part 2 Focus on Prompt Design Approaches
 
Lessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien RiouxLessons Of Binary Analysis - Christien Rioux
Lessons Of Binary Analysis - Christien Rioux
 
Running a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU ImpactsRunning a Go App in Kubernetes: CPU Impacts
Running a Go App in Kubernetes: CPU Impacts
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
20240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 202420240702 QFM021 Machine Intelligence Reading List June 2024
20240702 QFM021 Machine Intelligence Reading List June 2024
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
Data Protection in a Connected World: Sovereignty and Cyber Security
Data Protection in a Connected World: Sovereignty and Cyber SecurityData Protection in a Connected World: Sovereignty and Cyber Security
Data Protection in a Connected World: Sovereignty and Cyber Security
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 

Lesson 8 Linear Correlation And Regression

  • 1. Simple Linear Regression and Correlation Teaching Assistant: Zuo Xiaoyu Chapter 8
  • 2. Outline Discussion part Steps of performing correlation and regression The Distinguish and connection Between Linear Correlation and Regression? Experiment part (incorporated in discussion part) Simple linear correlation Simple linear regression Exercise part
  • 4. Case In a study of the relationship between plasma amphetamine levels and amphetamine-induced psychosis, 10 psychosis amphetamine abusers underwent psychiatric evaluation and were assigned a psychosis intensity score. At the same time, plasma amphetamine levels in these patients were determined. The results are shown in Table 8-1 Data file: discussion.sav
  • 5. Table 8-1 psychosis intensity scores and plasma amphetamine levels for 10 chronic amphetamine abusers 475 55 10 350 40 9 200 15 8 425 50 7 400 35 6 450 45 5 150 15 4 250 20 3 300 30 2 150 10 1 Plasma amphetamine mg/ml (X) Psychosis intensity score (Y) patient
  • 6. Question 1 Is there an intuitive relationship between plasma amphetamine levels and amphetamine-induced psychosis ? Scatter plot diagram Both variables are random
  • 7. Procedure 8.1.2 Data File Variable Name: x; Variable Label: Psychosis intensity scores Variable Name: y; Variable Label: Plasma amphetamine (mg/ml) 8.1.3 Procedure (1) scatter diagram from the menus, choose: Analyze Graphs Scatter In scatter plot box, choose “simple”, click on button. In simple Scatter plot box, move y to the box of “Y Axis” and move x to the box of “X Axis”, click on button.
  • 10. Different types of relation
  • 11. Question 2 How to quantify the relationship between plasma amphetamine levels and amphetamine-induced psychosis ? Correlation coefficient
  • 12. Procedure (2) From the menus, choose: Analyze Correlate Bivariate, open “Bivariate Correlations” dialog box; move y and x to the “Variable” box; choose “Pearson” for Correlation Coefficients (default), or choose “spearman” if the variable are not normal distributed; click on button.
  • 13.  
  • 14. Output and Interpretation Pearson correlation Spearman correlation
  • 15. Correlation Coefficient Pearson correlation coefficient Spearman’s rank correlation coefficient Both X and Y are random X and Y follow bivariate normal distribution
  • 16. Spearman’s rank correlation coefficient It is useful to: ranked data As well as measurement data ---- not follow a normal distribution ; or not sure about the distribution; or not precisely measured or X or Y are ordinal variables
  • 17. The direction of correlation? -- positive or negative The strength of correlation? high or not? -- Is the absolute value big enough? Complete correlation : +1 or -1, Understanding the r
  • 18. Question 3 Can we draw a conclusion that plasma amphetamine levels are correlated with amphetamine-induced psychosis in population? What is the actual situation in population? Hypothesis testing on r Interval estimate of ρ
  • 19. Hypothesis testing and interval estimation t test (Assume normal distribution) H 0 : ρ =0, H 1 : ρ ≠0 Interval estimation Inverse  of hyperbolic tangent
  • 20. Short summary Scatter plot diagram Compute correlation index (descriptive) Is the index statistically significant? -----hypothesis testing (inference) Interpretation of correlation coefficient (application)
  • 21. Question 4 Could we predict the psychosis intensity score from the plasma amphetamine levels ? EX: Could we estimate and predict the psychosis intensity score when the plasma amphetamine levels is 440 and 460? Linear regression
  • 22. Procedure From the menus, choose: Analyze Regression Linear, open “Linear Regression” dialog box; move y to “Dependent” box and move x to “Independent” box; click on button.
  • 23. Y X
  • 24. Output and Interpretation Intercept and slope
  • 25. Question 5 Could this regression equation be established in the our studying population? Could we use this regression equation to predict the psychosis intensity score when the plasma amphetamine levels is 440 and 460, respectively? Hypothesis testing on the total equation--ANOVA
  • 27. Question 6 What is the proportion of the psychosis intensity score could we explain from the plasma amphetamine levels ? Could we view the plasma amphetamine levels as the influence factor of the amphetamine-induced psychosis ? R square Hypothesis testing on regression coefficient--- t -test
  • 28. Output and Interpretation R square Hypothesis testing on the regression coefficient
  • 29. Short summary Scatter plot diagram Compute the slope and intercept of sample (descriptive) Is the regression equation significant? -----ANOVA (inference) Is the regression coefficient significant? -----one sample t -test (inference) Interpretation and application of the regression model. (application)
  • 30. Basic assumptions ---- LINE (1) L inear : There exists a linear tendency between the dependent variable and the independent variable (2) I ndependent : The individual observations are independent each other (3) N ormal : Given the value of, the corresponding follows a normal distribution (4) E qual variances : The variances of for different values of are all equal, denoted with .
  • 31. Pre-requisite for linear regression (1) Linear : There exists a linear tendency between the dependent variable and the independent variable (2) Independent : The individual observations are independent each other (3) Normal : Given the value of, the corresponding follows a normal distribution (4) Equal variances : The variances of for different values of are all equal, denoted with .
  • 32. Summary of discussion part
  • 33. Two types of questions: Whether there is a linear relationship? -- Linear correlation How to predict one variable by another variable? -- Linear regression
  • 34. Summary The Distinguish and connection Between Linear Correlation and Regression? Basic concepts Basic assumptions for data Correlation Coefficient and Regression Coefficient
  • 35. Summary Assumptions: Correlation: Both X and Y are random Regression: (LINE) Y must be random X could be random or not random Correlation Coefficient (r)
  • 36. Summary Linear Regression Equation, Regression Coefficient (b) Try to estimate  and  , getting
  • 37. Summary Connection: When both X and Y are random 1) Same sign for Correlation Coefficient and Regression Coefficient 2) t tests are equivalent t r = t b 3) Determination Coefficient R=SS regression /SS total R=r 2
  • 38. 3. For bivariate normal distributed variables, regression could be used to interpret correlation: The high determine coefficient indicates the X is closely correlated to Y.   2. The hypothesis testing for correlation coefficient and regression coefficient is equivalent. 1. The correlation coefficient has the same sign as regression coefficient. connection 1.investigate the quantitative dependency relationship between variables 2.prediction 3. variable selection investigate the quantitative association Application Independent variable be a normally distributed random variable. Bivariate normal distribution Pre-requisite Investigate the dependency relationship between the independent and dependent variables. Quantify the relationship between two or more variables. Implication Regression Correlation
  • 39. Discussion——true or false? 1. Put any two variables together for correlation and regression ? ( × They must have some relation in subject matter) 2. Correlation and regression mean causality? ( × sometimes may be indirect relation or even no any real relation) 3. A big value of r means a big regression coefficient b ? ( × ) 4. To reject means that the correlation is strong? (× just only means )
  • 40. Discussion——true or false? 5. A regression equation is statistically significant means that one can well predict Y by X ? ( × well predict or not depends on coefficient of determination) 6. The regression equation is allowed to be applied beyond the range of the data set ? ( × )
  • 41. To explore the correlation between the heights of father and son, 20 graduate male students were randomly selected from a name list of graduates in a high school. The heights (cm) of fathers and sons were measured. (1) What is the relationship of the heights of father and son? (2) Can we predict the son’s height if a father with height 166 cm? Exercise
  • 42. Heights (cm) of 20 pairs of father and son
  • 43. About Homework Test for D ifference —— treated as paired design Test for A ssociation —— treated as independent design McNemar