You are on page 1of 24

PM299.

1:Quan,ta,ve Methods in Public


Policy and Program Administra,on

MEASURES OF ASSOCIATION &


SIMPLE LINEAR REGRESSION
Merlyne M. Paunlagui
Faculty-in-Charge
15 November 2020
PEARSON PRODUCT
MOMENT CORRELATION
TESTING THE RELATIONSHIP BETWEEN TWO
INTERVAL SCALE VARIABLES
Effect of TV spot advertising POPCOM sponsors
and the number of persons visiting the family
clinic
1.  Hypothesis
Null Hypothesis R=0
(There is no rela8onship between TV spot adver8sing and number of
persons visi8ng the family clinic)
Alterna8ve Hypothesis R>0
2. Sta8s8cal Model: Pearson Product Moment Correla8on

Effect of TV spot advertising POPCOM sponsors and the number
of persons visiting the family clinic
3.  Criteria for making decision
R values will always fall between -1 an 1. That is,
-1 ≤ R ≤ 1
The absolute value of R will always lie within 0 and 1. That is,
0 ≤ lRl ≤ 1
lRl = 0 means absolutely no rela8onship
lRl = 1 means perfect rela8onship
Criteria for making decision (in the example):
At α=0.05, df=15, reject Ho if the absolute value of computed R greater
than the Table R (lRcl >Rt)

N ∑ XY − ∑ X ∑ Y
R=
4. 2
N ∑ X − (∑ X )
2
N ∑Y 2
(∑Y )
2

Analysis
Is there a
rela8onship
between tv spot
adver8sing (X)
and number of
people visi8ng
Conclusion:
the family clinic Computed R (Rc)
(Y)? =.973 is greater
than the Table
value Rt = 0.426

Conclusion:
Reject the null
hypothesis
Below is the link for a very clear explana8on and
example of Pearson Product Moment Correla8on

https://www2.palomar.edu/users/rmorrissette/
lectures/stats/correlation/correlation.htm
With the value of R known, the number of people
to visit the clinic for each TV advertisement can
be projected
REGRESSION ANALYSIS Regression Line

The rela8onship
between two
variables can be
summarized by a line

Equa8on for a straight line


Y = a + bx
Regression
Analysis
∑ Y − b∑ X
a=
N

(16 )( 3960 ) − ( 96 )(559 )


b= ( 559 ) − (5.76 )(96 )
16 676
( )( ) ( ) − 96
2
a=
16
9216 = 0.4
=
1600
= 5.76
Using Excel:
Summary Output
In simple regression, this number is the absolute value of Pearson’s coefficient of correla8on.
Regression Statistics
Its sign will be the same as that of the b1 coefficient.
Multiple R 0.972499
R Square 0.945755
Adjusted R Square 0.941582 Coefficient of Determina,on
Standard Error 3.796237 This number is the coefficient of determina8on r2. It expresses the propor8on of the varia8on
Observations 15 in y which is explained by varia8on in x.

ANOVA
df SS MS F Significance F
Regression 1 3266.3853266.385226.6526 1.32E-09
Residual 13 187.348414.41141
Total 14 3453.733

CoefficientsStandard Error t Stat P-value Lower 95% Upper 95%Lower 95.0%Upper 95.0%
Intercept 0.373989 2.4675740.151562 0.88186 -4.95688 5.704857 -4.95688 5.704857
7 5.745957 0.38166515.05499 1.32E-09 4.921421 6.570493 4.921421 6.570493

b0 or the intercept This is the p-value


b1 or slope of the the t sta8s8c is
(es8mated average b1 ÷ sb1. It has of the hypothesis
number of visitors regression line test H0: β1 = 0
n-2 degrees of
when there are no (the average freedom
TV adver8sements number of visitors
yet) increases by 5.74,
on average, for
each addi8onal
•  The equa8on of the line is
Y= 0.4 + 5.76 X

•  If X= 5, our predicted value for Y will be
Y= .4+ 5.76 (5) = 29.2

•  If X=7, our predicted value for Y will be
Y= .4+ 5.76 (7)= 40.7

•  Interpreta8on:
An increase of one in the number of TV ad runs will generate a 5.76 increase in
the number of people visi8ng the family planning clinic. So the family planning
officer can now proceed with evalua8ng the cost effec8veness of the program
ads.

Spearman’s Rank Order
Correlation
TWO ORDINAL SCALE VARIABLES
Spearman’s rank-order correlation coefficient, rs

§  Also called Spearman’s rho (denoted by rs)


§  Used to find the degree of association between ordinal data
§  One of the accepted measures of association for ordinal (and
rank-transformed) variables (the other is Kendall tau)
§  Both X & Y must be ranked or ordered
§  Computed using deviations of the ranks of the observations on
variables X &Y
Spearman’s rank-order correlation coefficient, rs

v Where d is the difference between the rank on variables X and on


variable Y
v “6” is a constant
v Value ranges from -1 to +1
v Interpretation is similar to Pearson
Spearman’s rank-order correlation coefficient, rs
Example 1: Compute rs between students’ political attitude and
involvement in political activities. Shown are ranked data.
Student Attitude Involvement
(X) (Y) d d 2
A 4 6 -2 4
B 5 3 2 4
C 6 5 1 1 6*20
D 7 9 -2 4 =1-
10*(102 – 1)
E 1 1 0 0
F 10 8 2 4
G 9 10
120
-1 1 =1-
990
H 2 2 0 0
I 8 7 1 1 rs=0.878
J 3 4 -1 1 Pearson r=0.878

=20
Spearman’s rank-order correlation coefficient, rs
Example 2: Compute rs between student’s class standing and midterm exam score.
Student Standing Score Score Rank
In case of a tie(s),
Initial Final d d2
rank the students in
A 1 93 1 1.5 the conventional
0.5 0.25 way. Get the
B 2 93 2 1.5
-0.5 0.25 average of the rank
C 3 77 4 4 of the tied students.
1 1 Assign this average
D 4 88 3 3
-1 1 rank to each tied
E 5 73 5 6 student and use it in
1 1 computing rs.
F 6 73 6 6
0 0 rs=0.8515
G 7 67 9 9
2 4
H 8 69 8 8 Pearson r
0 0 =0.849
I 9 60 10 10
1 1
J 10 73 7 6
-4 16
Chi-square Test of
Independence
TWO NOMINAL SCALE VARIABLES
CHI-SQUARE (Χ2)TEST of
INDEPENDENCE
Example: Result of the first driving test
Table 1. Actual Counts

c1 c2 Row
GENDER SUCCESS FAILURE Total
r1 Male 70 28 (98)
r2 Female 50 52 (102)
Column Total (120) (80) (200) Grand total

Χ2 = (Observed count of r,c – Expected count of r,c) 2


Σ Expected Count of r,c

Expected Count r1,c1= Row r1 Total x Column c1 Total


Grand Total
Example: Result of the first driving test
Table 1. Actual Counts
c1 c2
Expected r1,c1 = (98*120)/200 = 58.8
GENDER SUCCESS FAILURE Expected r1,c2 = (98*80)/200 = 39.2
r1 Male 70 28 (98)
Expected r2,c1 = (102*120)/200=61.2
r2 Female 50 52 (102)
(120) (80) (200) Expected r2,c2 = (102*80)/200 = 40.8
Grand total Table 2. Expected Counts
c1 c2
GENDER SUCCESS FAILURE
r1 Male 58.8 39.2
r2 Female 61.2 40.8
Example: Result of the first driving test

Table 1. Actual Counts Table 2. Expected Counts


GENDER SUCCESS FAILURE GENDER SUCCESS FAILURE

Male 70 28 Male 58.8 39.2


Female 50 52 Female 61.2 40.8

Χ2 = Σ (Observed count of r,c – Expected count of r,c) 2

Expected Count of r,c

r1,c1= (70-58.8)2 / 58.8 = 2.13


r1,c2= (28-39.2)2 / 39.2 = 3.20
r2,c1= (50-61.2)2 / 61.2 = 2.05
r2,c2= (52-58.8)2 / 40.8 = 3.07
X2 = 10.46
Example: Result of the first driving test
à  This is a test statistic for the chi square test
X2 = 10.46 à  We will use this to test for independence of the two
variables (i.e. whether there is NO relationship)
à  We can follow the steps in hypothesis testing.

1. State null and alternative hypotheses (in words and in


mathematical notation)
Ho: The two variables are independent (no relationship)
Ha: The two variables are dependent (has a relationship)

2. Select appropriate statistical test (including the type/


direction)
Chi-square test of independence

3. Determine the cri,cal value.


Using the χ2 distribution table, the critical value has significance
level α and degrees of freedom [(r-1)*(c-1)] where r and c is the
number of rows and columns of the contigency table, respectively.

In our example, if α = 0.05 (5%), df=(2-1)*(2-1) = 1


Use this information to lookup the CV in the chi square table
4. State the decision rule (set the criteria for
rejecting the null hypothesis)

Reject Ho is X2 > CV,

5. Calculate test statistic

X2 = 10.46 à remember we computed this


already

6. Make decision and conclusion

Since X2=10.46 > CV= 3.841 , we reject Ho that


the two variables are independent (no
relationship)

Using X2 test at 5% level of significance, there is


sufficient evidence to say that there is relationship
between gender and result of first driving test.
Measures of Association Between Different Variable Types

Variable Y
Interval/ Nominal Ordinal
Ra8o

Interval/ Ra8o Pearson Point-biserial Spearman*

Variable X Nominal Chi-square


-Phi
-Con8ngency C
-Cramer’s V
Ordinal Spearman
Kendall
Final Examination

• Online
• Schedule
• December 12 (8me will be announced later)

You might also like