Anda di halaman 1dari 5

STAT 166: STATISTICS FOR SOCIAL SCIENCES Exercise: Measures of Association

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

foof 38,774 44,548 53,159 95,629 33,141

totex 52,637 71,668 106,475 301,205 54,472

foof 152,606 62,783 16,408 41,131 96,671

totex 219,630 145,072 29,500 91,567 243,813

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

STAT 166: STATISTICS FOR SOCIAL SCIENCES Exercise: Measures of Association

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 =

1.11948E + 11 10 * 63485.00 *131603.9 10 1

n 1 = 3155445241

=r =

s XY sx sy

3155445241 = 0.837 40538.27564*92929.14506


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

STAT 166: STATISTICS FOR SOCIAL SCIENCES Exercise: Measures of Association

2. Spearmans rank-order correlation coefficient


foof 38,774 (3) 44,548 (5) 53,159 (6) 95,629 (8) 33,141 (2) 152,606 (10) 62,783 (7) 16,408 (1) 41,131 (4) 96,671 (9) totex 52,637 (2) 71,668 (4) 106,475 (6) 301,205 (10) 54,472 (3) 219,630 (8) 145,072 (7) 29,500 (1) 91,567 (5) 243,813 (9)

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

STAT 166: STATISTICS FOR SOCIAL SCIENCES Exercise: Measures of Association

3. Kendall Tau rank-order correlation coefficient


a. Observe the ranks of X and Y.

Household 1 foof (X) 3 totex (Y) 2


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

b. Arrange the ranks of X in ascending order while ranks of Y follow Xs arrangement.


Household 8 foof (X) 1 totex (Y) 1


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

STAT 166: STATISTICS FOR SOCIAL SCIENCES Exercise: Measures of Association

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

Anda mungkin juga menyukai