Lesson 15  6

Author
nicholassherman 
Category
Documents

view
37 
download
3
Embed Size (px)
description
Transcript of Lesson 15  6

Lesson 15  6Inferences Between Two Variables

ObjectivesPerform Spearmans rankcorrelation test

VocabularyRankcorrelation test  nonparametric procedure used to test claims regarding association between two variables.
Spearmans rankcorrelation coefficient  test statistic, rs 6di rs = 1  n(n 1)

AssociationParametric test for correlation:Assumption of bivariate normal is difficult to verifyUsed regression instead to test whether the slope is significantly different from 0
Nonparametric case for association:Compare the relationship between two variables without assuming that they are bivariate normalPerform a nonparametric test of whether the association is 0

Tale of Two AssociationsSimilar to our previous hypothesis tests, we can have a twotailed, a lefttailed, or a righttailed alternate hypothesisA twotailed alternative hypothesis corresponds to a test of association
A lefttailed alternative hypothesis corresponds to a test of negative association
A righttailed alternative hypothesis corresponds to a test of positive association

Test Statistic for Spearmans RankCorrelation TestThe test statistic will depend on the size of the sample, n, and on the sum of the squared differences (di).
6di rs = 1  n(n 1)
where di = the difference in the ranks of the two observations (Yi Xi) in the ith ordered pair.
Spearmans rankcorrelation coefficient, rs, is our test statistic
z0 = rs n 1 Small Sample Case: (n 100)Large Sample Case: (n > 100)

Critical Value for Spearmans RankCorrelation TestUsing as the level of significance, the critical value(s) is (are) obtained from Table XIII in Appendix A. For a twotailed test, be sure to divide the level of significance, , by 2.Small Sample Case: (n 100)Large Sample Case: (n > 100)
LeftTailedTwoTailedRightTailedSignificance/2Decision RuleReject if rs < CVReject if rs < CV or rs > CVReject if rs > CV

Hypothesis Tests Using Spearmans RankCorrelation TestStep 0 Requirements: 1. The data are a random sample of n ordered pairs. 2. Each pair of observations is two measurements taken on the same individual
Step 1 Hypotheses: (claim is made regarding relationship between two variables, X and Y) H0: see below H1: see below
Step 2 Ranks: Rank the Xvalues, and rank the Yvalues. Compute the differences between ranks and then square these differences. Compute the sum of the squared differences.
Step 3 Level of Significance: (level of significance determines the critical value) Table XIII in Appendix A. (see below) Step 4 Compute Test Statistic:
Step 5 Critical Value Comparison: 6di rs = 1  n(n 1)
LeftTailedTwoTailedRightTailedSignificance/2H0not associatednot associatednot associatedH1negatively associatedassociatedpositively associatedDecision RuleReject if rs < CVReject if rs < CV or rs > CVReject if rs > CV

ExpectationsIf X and Y were positively associated, thenSmall ranks of X would tend to correspond to small ranks of YLarge ranks of X would tend to correspond to large ranks of YThe differences would tend to be small positive and small negative valuesThe squared differences would tend to be small numbers
If X and Y were negatively associated, thenSmall ranks of X would tend to correspond to large ranks of YLarge ranks of X would tend to correspond to small ranks of YThe differences would tend to be large positive and large negative valuesThe squared differences would tend to be large numbers

Example 1 from 15.6Calculations:
SDSRankDRankd = X  Yd1002572.511.52.251022645411103274660010126645111052777.580.50.251002632.530.50.259925812111052757.570.50.25
102267AveSum6

Example 1 ContinuedHypothesis: H0: X and Y are not associated Ha: X and Y are associated
Test Statistic: 6 di 6 (6) 36 rs = 1   = 1  = 1   = 0.929 n(n  1) 8(64  1) 8(63)
Critical Value: 0.738 (from table XIII)
Conclusion: Since rs > CV, we reject H0; therefore there is a relationship between clubhead speed and distance.

Example done in Excel
ClubHead SpeedDistanceRank  XRank  Ydifferenced1002572.511.52.251022645411103274660010126645111052777.580.50.251002632.530.50.259925812111052757.570.50.25n = 8ClubHead SpeedDistance6sumClubHead Speed1rs =0.928571Distance0.9386958381rc = 0.738
Rank  XRank  YRank  X1Rank  Y0.9277781831

Summary and HomeworkSummaryThe Spearman rankcorrelation test is a nonparametric test for testing the association of two variablesTest is a comparison of the ranks of the paired data valuesCritical values for small samples are given in tablesCritical values for large samples can be approximated by a calculation with the normal distribution
Homeworkproblems 3, 6, 7, 10 from the CD

Homework Problem 3
Problem 3
XYRank  XRank  Ydifferenced221.4110041.8220082.13.530.50.2582.33.540.50.2592.65500n = 50.5sumRank  XRank  Yrs =0.975Rank  X1rc =1Rank  Y0.9746794341FTR

Homework Problem 6
Problem 6
XYRank  XRank  Ydifferenced200.811000.52.323111.41.93.521.52.251.42.53.540.50.253.9555004.66.86600n = 63.5sumrs =0.9Rank  XRank  Yrc =0.886Rank  X1RejectRank  Y0.8986451051

Homework Problem 7
Problem 7
BS %IncomeRank  XRank  Ydifferenced217.424289110029.833749990024.629043440022.326100220023.728831330026.83075888002529944671126.429340752424.7293725611n = 96sumrs =0.95Rank  XRank  Yrc = 0.6Rank  X1RejectRank  Y0.951

Homework Problem 10
Problem 10
StandingsYardsRank  XRank  Ydifferenced21248035324305215761174459321111513445112497224242959366711141341100n = 712sumrs =0.785714Rank  XRank  Yrc = 0.714Rank  X1RejectRank  Y0.7857142861