An
economist
is
interested
to
determine
whether
there
is
a
linear
relationship
between
the
total
food
expenditures
(foof)
and
total
family
expenditures
(totex).
A
random
sample
of
ten
households
were
observed
and
the
following
data
were
recorded:
Correlation Analysis
1. Assuming
that
the
data
follows
bivariate
normal
distribution,
compute
and
interpret
the
Pearsons
correlation
coefficient.
2. Suppose
the
data
do
not
follow
the
Normal
distribution,
compute
for
the
Spearmans
rank-order
correlation
coefficient.
Also,
compute
for
the
Kendall
Tau
rank- order
correlation
coefficient.
3. Test
whether
there
is
an
association
between
the
total
food
expenditures
(foof)
and
total
family
expenditures
(totex)
STAT
166
Statistics
for
Social
Sciences
First
Semester
2012-2013
JCYnion
1
1. Estimated
Pearsons
correlation
coefficient
foof
totex
n
10
10
n mean
63,485.00
131,603.90
X iY i = 1.11948E + 11
stddev
40538.27564
92929.14506
i =1
s xy = s xy
X Y
i =1 i
nXY =
n 1 = 3155445241
=r =
s XY sx sy
using STATA: . pwcorr foof totex, sig | foof totex -------------+-----------------foof | 1.0000 | | totex | 0.8376 1.0000 | 0.0025
STAT 166 Statistics for Social Sciences First Semester 2012-2013 JCYnion
d i d i2 1 1 1 1 0 0 -2 4 -1 1 2 4 0 0 0 0 -1 1 0 0
rs = 1
6 d i2
n n
i =1 3
=1
6 *12 10 10
3
= 1 0.07273 = 0.9273
using
STATA:
. spearman foof totex Number of obs = Spearman's rho = 10 0.9273
Test of Ho: foof and totex are independent Prob > |t| = 0.0001
STAT
166
Statistics
for
Social
Sciences
First
Semester
2012-2013
JCYnion
3
2 5 4
3 4 6 8 6 10
5 6 2 10 3 8
7 7 7
8 1 1
9 10 4 9 5 6
5 2 3
1 3 2
9 4 5
2 5 4
3 6 6
7 4 10 6 7 8 9 10 7 10 6 8
c. Observed
the
natural
order
of
the
ranks
of
Y.
Household
8
5
1
9
2
3
foof
(X)
1
2
3
4
5
6
totex
(Y)
1
3
2
5
4
6
1
+
+
+
+
+
3
-
+
+
+
2
+
+
+
5
-
+
4
+
6
7
Number
of
positive
signs
=
40
10
Number
of
negative
signs
=
5
6
S
=
40
5
=35
7
7
7
+
+
+
+
+
+
4
8
10
+
+
+
+
+
+
+
10
9
6
+
+
+
+
+
+
+
-
6
10
8
+
+
+
+
+
+
+
-
-
4
STAT 166 Statistics for Social Sciences First Semester 2012-2013 JCYnion
xy = T xy =
S
! $ n & # " 2 %
2S 2 * 35 = = 0.7778
n (n 1) 10(10 1)
. ktau foof totex Number of obs Kendall's tau-a Kendall's tau-b Kendall's score SE of score = = = = = 10 0.7778 0.7778 35 11.180
Test of Ho: foof and totex are independent Prob > |z| = 0.0024 (continuity corrected)
Pearson
Spearman
Kendall-Tau
Ho:
=
0
s
=
0
xy
=
0
Ha:
0
s
0
xy
0
Test
Proc:
t-test
Spearman
Kendall-Tau
Test
Statistic:
r
rs
s
Decision
Reject
Ho
if
p-value
<
alpha,
Rule:
Otherwise,
fail
to
reject
Ho
Computation:
0.0025
0.0001
0.0024
Decision:
since
p-value
<
alpha,
we
reject
Ho
At
alpha
=
5%,
we
have
sufficient
Conclusion:
evidence
to
say
that
there
is
an
association
between
foof
and
totex.
STAT
166
Statistics
for
Social
Sciences
First
Semester
2012-2013
JCYnion
5