Lesson 15 - 6

of 17 /17
Lesson 15 - 6 Inferences Between Two Variables

Embed Size (px)

description

Lesson 15 - 6. Inferences Between Two Variables. Objectives. Perform Spearman’s rank-correlation test. Vocabulary. Rank-correlation test -- nonparametric procedure used to test claims regarding association between two variables. - PowerPoint PPT Presentation

Transcript of Lesson 15 - 6

  • Lesson 15 - 6Inferences Between Two Variables

  • ObjectivesPerform Spearmans rank-correlation test

  • VocabularyRank-correlation test -- nonparametric procedure used to test claims regarding association between two variables.

    Spearmans rank-correlation 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 two-tailed, a left-tailed, or a right-tailed alternate hypothesisA two-tailed alternative hypothesis corresponds to a test of association

    A left-tailed alternative hypothesis corresponds to a test of negative association

    A right-tailed alternative hypothesis corresponds to a test of positive association

  • Test Statistic for Spearmans Rank-Correlation 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 rank-correlation coefficient, rs, is our test statistic

    z0 = rs n 1 Small Sample Case: (n 100)Large Sample Case: (n > 100)

  • Critical Value for Spearmans Rank-Correlation TestUsing as the level of significance, the critical value(s) is (are) obtained from Table XIII in Appendix A. For a two-tailed test, be sure to divide the level of significance, , by 2.Small Sample Case: (n 100)Large Sample Case: (n > 100)

    Left-TailedTwo-TailedRight-TailedSignificance/2Decision RuleReject if rs < -CVReject if rs < -CV or rs > CVReject if rs > CV

  • Hypothesis Tests Using Spearmans Rank-Correlation 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 X-values, and rank the Y-values. 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)

    Left-TailedTwo-TailedRight-TailedSignificance/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:

    SDS-RankD-Rankd = X - Yd1002572.511.52.251022645411103274660010126645-111052777.58-0.50.251002632.53-0.50.259925812-111052757.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 club-head speed and distance.

  • Example done in Excel

    Club-Head SpeedDistanceRank - XRank - Ydifferenced1002572.511.52.251022645411103274660010126645-111052777.58-0.50.251002632.53-0.50.259925812-111052757.570.50.25n = 8Club-Head SpeedDistance6sumClub-Head Speed1rs =0.928571Distance0.9386958381rc = 0.738

    Rank - XRank - YRank - X1Rank - Y0.9277781831

  • Summary and HomeworkSummaryThe Spearman rank-correlation 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.54-0.50.2592.65500n = 50.5sumRank - XRank - Yrs =0.975Rank - X1rc =1Rank - Y0.9746794341FTR

  • Homework Problem 6

    Problem 6

    XYRank - XRank - Ydifferenced200.811000.52.323-111.41.93.521.52.251.42.53.54-0.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.8307588800252994467-1126.429340752424.72937256-11n = 96sumrs =0.95Rank - XRank - Yrc = 0.6Rank - X1RejectRank - Y0.951

  • Homework Problem 10

    Problem 10

    StandingsYardsRank - XRank - Ydifferenced21248035324305215761174459321111513445-112497224-2429593667-11141341100n = 712sumrs =0.785714Rank - XRank - Yrc = 0.714Rank - X1RejectRank - Y0.7857142861