You are on page 1of 33

Lecture # 10

Week#

Quantitative Tools and Techniques


Instructor: Jibran Hussain

5Dec 2017
Net Worth:$480Million Net Worth:$180Million

Married Man Live Rich and happy

Net Worth:$600Million Net Worth:$200Million


Learning Objectives
5

At the end of this session, you will be able to

¡ Understand the meaning and limitations of Pearson’s coefficient


of correlation (r)

¡ Describe what is meant by the coefficient of determination (R2)


and how it relates to (r) for a simple linear regression model

¡ Derive the value of R2 using results of an analysis of variance.


Descriptive Statistics: Correlation

Finding the relationship between two quantitative variables without


being able to infer causal relationships

Correlation is a statistical technique used to determine the degree and


direction to which two variables are related

◆Describes the relationship between two or more variables.

¡Describes the strength of the relationship in terms of a number


from -1 to +1

¡Describes the direction of the relationship as positive or


negative.
Types of Correlations

¡ Variable X increases

¡ Variable Y increases

Positive Correlation

Value ranging from .00 to 1.00

Example: the more you eat, the more


weight you will gain
Types of Correlations

¡ Variable X decreases

¡ Variable Y decreases

Positive Correlation

Value ranging from .00 to 1.00

Example: the less you study, the lower your test score will be
Types of Correlations

¡ Variable X increases

¡ Variable Y decreases

Negative Correlation

Value ranging from -1.00 to .00

Example: the older you are, the less flexible your body is
Types of Correlations

¡ Variable X decreases

¡ Variable Y increases

Negative Correlation

Value ranging from -1.00 to .00

Example: the less time you study, the more errors you will make
The value of r ranges between ( -1) and ( +1), The value of r denotes the strength of the
association as illustrated by the following diagram.

strong intermediate weak weak intermediate strong

-1 -0.75 -0.25 0 0.25 0.75 1


indirect Direct
perfect perfect
correlation correlation
no relation
Positive or Negative?

¡ IQ and reading achievement

¡ Anxiety and test scores

¡ Amount of calories consumed and weight gain.

¡ Amount of exercise and weight gain

¡ Reading achievement and math achievement

¡ Foot size and math ability


Caution!
¡Correlation does not indicate causation.

¡Correlation only establishes that a relationship exists; it


reflects the amount of variability that is shared between
two variables and what they have in common.

Examples:

¡SAT scores and GPA in college.


Correlation: IQ and GPA

¡ IQ GPA

¡ 110 2.5
140
¡ 140 4.0
130

¡ 80 1.0 120

110
¡ 100 2.0
IQ
100

¡ 130 3.5 90

80
¡ 90 1.5
70
¡ 120 3.0 0 1 2 3 4

GPA
¡ 70 .5
Correlation: IQ and Errors

¡ IQ Errors
¡ 80 14
140
¡ 120 6
130

¡ 100 10 120

110
¡ 90 12
IQ
100

¡ 130 4 90

80
¡ 110 8 70

¡ 140 2 0 5 10 15

Errors
¡ 70 16
Correlation: IQ and Weight
¡ IQ Weight

¡ 120 170
140
¡ 100 160
130

¡ 70 120 120

110
¡ 140 130

IQ
100

¡ 90 200 90

80

¡ 130 110 70

110 120 130 140 150 160 170 180 190 200
¡ 80 150 Weight

¡ 110 140
Caution

¡Do not interpret the coefficient of correlation as a


percentage!

¡If you want to know the percentage of variance in


one variable that is accounted for by the variance in
the other variable, compute the coefficient of
determination
Linear Correlation (r) 18

For two quantitative variables X and Y, for which n pairs of


measurements (xi, yi) are available, Pearson’s correlation
coefficient (r) gives a measure of the linear association
between X and Y.

The formula is given below for reference.


Possible values for r 19
Factors Influencing Correlation

¡ When interpreting the correlation coefficient, always consider the


nature of the population in which the two variables were observed.

¡ The correlation coefficient will vary from one population to another.

¡ The relationship of variables may differ from population to


population.

¡ Example: Physical prowess and age are correlated between the ages
of 10 and 16.

¡ Example: Physical prowess and age are not correlated between the
ages of 20 and 26.
Choosing Correlation Formulas
¡ X is ordinal data

¡ Y is ordinal or interval data (interval data must be


converted to ordinal)
¡ Correlation Formula: Spearman rank coefficient

¡ Example: Correlation between rank and GPA

Ordinal: A variable with values whose


order is significant, but on which no
meaningful arithmetic-like operations
can be performed.
How to compute the simple correlation
coefficient (r)

∑ x∑ y
∑ xy − n
r=
2 2
⎛ 2 (∑ x) ⎞ ⎛ 2 (∑ y) ⎞
⎜∑ x − ⎟.⎜ ∑ y − ⎟
⎜ n ⎟⎜ n ⎟
⎝ ⎠⎝ ⎠
Example:
A sample of 6 children was selected, data about their age in years and
weight in kilograms was recorded as shown in the following table . It is
required to find the correlation between age and weight.

serial Age Weight


No (years) (Kg)
1 7 12
2 6 8
3 8 12
4 5 10
5 6 11
6 9 13
Age Weight
Serial xy X2 Y2
(x) (y)
1
7 12 84 49 144

2
6 8 48 36 64

3
8 12 96 64 144

4
5 10 50 25 100

5
6 11 66 36 121

6
9 13 117 81 169

Total
∑x=41 ∑y=66 ∑xy= 461 ∑x2 = 291 ∑y2=742
41 × 66
461 −
r= 6
⎡ (41) 2 ⎤ ⎡ (66) 2 ⎤
⎢291 − ⎥.⎢742 − ⎥
⎣ 6 ⎦⎣ 6 ⎦

r = 0.759
strong direct correlation
Relationship between Anxiety and Test Scores

Anxiety Test score X2 Y2 XY


(X) (Y)

10 2 100 4 20
8 3 64 9 24
2 9 4 81 18
1 7 1 49 7
5 6 25 36 30
6 5 36 25 30
∑X = 32 ∑Y = 32 ∑X2 = 230 ∑Y2 = 204 ∑XY=129
(6)(
Calculating 129) − (32)(
Correlation 32)
Coefficient 774 − 1024
r= = = −.94
( )( )
6(230) − 32 2 6(204) − 32 2 (356)(200)

r = - 0.94

Indirect strong correlation


Scatter plots

The pattern of data is indicative of the type of


relationship between your two variables:

Øpositive relationship

Ønegative relationship

Øno relationship
Positive relationship
Exercise 1: Predicting Mental Ability
Age Score
Is there a linear relationship between the age at 15 95
which a child first begins to speak and his or 26 71
her mental ability later on? To answer this 10 83
question a study was conducted in which the 9 91
age (in months) at which a child first spoke and 15 102
the child's score on an aptitude test as a 20 87
teenager were recorded: 18 93
11 100
8 104
20 94

There appears to be a
moderate negative
association between the
age at which a baby first
begins to speak and
mental ability later in
life.
Exercise 2: Speed and Gas Mileage

Is there a linear relationship between the speed Miles/Hour Miles/Gallon


at which a car is driven and the gas mileage? A 20 24
car was driven on a test track for one hour at 30 28
each of 5 speeds and the gas mileage 40 30
calculated. Here are the results: 50 28
c 60 24

The scatterplot does not


indicate a linear relationship
between mileage and speed. As
a matter of fact, the relationship
appears to be quadratic. The
points seem to lie on the same
parabola rather than the same
straight line. Since the
relationship does not appear to
be linear, there is no point in
calculating the correlation
coefficient. In fact, it would be
inappropriate to do so.
Quiz

1. Write down your project topic.


2. Identify your variables
3. Explain the nature of Association between/among your
variables.
4. What kind of association you see or expect it to be.
5. Can you draw a graph to show this association

You might also like