Overview of Non-Parametric Statistics LISA Short Course Series Mark Seiss, Dept. of Statistics April 7, 2009
Presentation Outline 1. Homework 2. Review of Parametric Statistics 3. Overview Non-Parametric Statistics 4. Correlation 5. Differences in Independent Samples 6. Differences in Dependent Samples
Homework 1. Explain in your own words: - Power (as it relates to statistics) - Correlation - Differences between independent samples and dependent samples 2. Assumptions of ANOVA
Homework 1. Explain in your own words: - Power probability of rejecting the null hypothesis (significant p-value) given the null hypothesis false - Correlation measure of association between two variables. - Differences between independent samples and dependent samples Independent samples subjects in treatment groups have no relation to subjects in other treatment groups Dependent samples subjects in treatment groups are related to one or more subjects in other treatment groups
Homework 2. Assumptions of ANOVA 1. Normality of the Data 2. Homogeneity of Variance 3. Independent Observations
Reference Material Handbook of Parametric and Nonparametric Statistical Procedures David J. Sheskin Applied Nonparametric Statistics Wayne W. Daniel Distribution-Free Tests Neave and Worthington Presentation and Data from Examples http://www.lisa.stat.vt.edu/short_courses.php
Parametric Statistics Parametric statistics require a basic knowledge of the underlying distribution of a variable ANOVA (1920 s and 30 s), Multiple Regression (1800 s), T-tests (1900 s), Pearson Correlation (1880 s) are parametric statistical methods Also known as classical statistics Many of the techniques were developed such that computations can be made by hand
Parametric Statistics General Assumptions of Parametric Statistical Tests 1. The sample of n subjects is randomly selected from the population. 2. The variables are continuous and from the normal distribution. Are most variables normally distributed? We are not sure for most variables Some we know are not normally distributed Ex) income, number of cars in an accident, etc. For small sample sizes, there is no way test the assumption of normality
Parametric Statistics General Assumptions of Parametric Statistical Tests 3. The measurement of each variable is based on interval or ratio data. Throughout the scale of measurements equal differences between measurements correspond to equal differences in what is measured Example of data that pass this assumption - IQ The difference in intelligence between a person with 101 IQ and a person with 100 IQ is the same as the difference between a person with 141 IQ and a person with 140 IQ
Parametric Statistics General Assumptions of Parametric Statistical Tests cont. Example of data that does not pass this assumption Grades The difference between an A and a B is not equal to the difference between a D and a F.
Non-parametric Statistics Non-parametric statistics are sometimes called distribution free statistics Do not require data to be normally distributed Developed to be used when a researcher knows nothing about the distribution of the variable of interest. Spearman s Rho (1904), Kendall s Tau (1938), Kruskal-Wallis (1950 s), Wilcoxon Signed-Ranks Matched Pairs (1940 s)
Non-parametric Statistics Can be used when there is no reliable underlying scale for the data Not interval/ratio data and no obvious way to measure differences In general, a less powerful test than the analogous parametric test No normality assumption Uses less information
Non-parametric Statistics Can be used when there is no reliable underlying scale for the data Not interval ratio data and no obvious way to measure differences In general, a less powerful test than the analogous parametric test No normality assumption Uses less information Questions/Comments
Correlation Parametric Statistic Pearson Correlation Coefficient Descriptive statistical measure that represents the degree of association between two variables. Interpretation Proportion of the variability in Y accounted for by X
Correlation Parametric Statistic Pearson Correlation Coefficient Values range from -1 to 1-1 indicates a perfect linear negative relationship as one variable increases, the other decreases 0 indicates no association between the variables 1 indicates a perfect linear positive relationship as one variable increases, the other increases The closer the values are to 1 or -1 the stronger the linear relationship The closer the values are to 0, the weaker the linear relationship
Correlation Pearson Correlation Coefficient cont. Positive Correlation Example: Height and Weight As height increases, generally weight increases.
Correlation Pearson Correlation Coefficient cont. Negative Correlation Example: TV Viewing and Grades People who watch more TV tend to have lower grades than those that watch less TV
Correlation Pearson Correlation Coefficient cont.
Correlation Pearson Correlation Coefficient cont. Important Note: Correlation does not imply causation Example) In England, there is a positive correlation between the presence of storks and the number of children born during a given year. Measures the strength of the linear relationship between two variables Does not determine what the relationship is (slope of the line), only strength and direction Does not extend to curvilinear relationships quadratic, cubic, exponential, etc. To determine if a curvilinear relationship is a possibility, construct a scatter plot of the data
Correlation Pearson Correlation Coefficient cont. Formula Hypothesis Test Null Hypothesis (H o ): ρ = 0 Alternative Hypothesis (H A ): ρ not equal 0 or ρ > 0 or ρ < 0
Correlation Pearson Correlation Coefficient cont. Hypothesis Test cont. Significance (p-value) 2 options Option 1 - Table of Critical Values for Pearson Correlation df = n-2 Option 2 -
Correlation Pearson Correlation Coefficient cont. Assumptions 1. The sample of n subjects (each combination of X and Y) is randomly selected from the population. 2. The variables are continuous and from the bivariate normal distribution. 3. The measurement of each variable is based on interval or ratio data.
Correlation Non-parametric Statistic - Spearman s Rank Order Correlation Bivariate measure of association between two variables using rankorder data. Measure of a monotonic relationship between two variables. Same interpretation as the Pearson correlation coefficient. Same calculation as the Pearson correlation except the observed value is replace with its rank. Example of rank-order (X,Y)={(1.5,2.3), (10.0,4.1), (5.5,6.9), (9.7,3.1), (2.2,7.6)} (Rank(X),Rank(Y))={(1,1), (5,3), (3,4), (4,2), (2,5)}
Correlation Spearman s Rank Order Correlation cont. 3 situations where the Spearman s Rho is used: Both variables are in rank order format Ex) Math Grades and English Grades (rank(a)=1, rank(b)=2 ) One variable is in rank-order format and one variable is in interval/ratio format Ex) Age of respondent and Degree of Agreement (1=strongly disagree, 2=disagree, 3=indifferent, 4=agree, 5=strongly agree) Both variables are interval/ratio format Used when the researcher believes one or more of the assumptions of the Pearson correlation coefficient is violated.
Correlation Spearman Rank-Order Correlation cont. Formula Hypothesis Test Null Hypothesis (H o ): ρ s = 0 Alternative Hypothesis (H A ): ρ s not equal 0 or ρ s > 0 or ρ s < 0
Correlation Spearman Rank-Order Correlation cont. Hypothesis Test cont. Significance (p-value) 2 options Option 1 - Table of Critical Values for Spearman s Rho Option 2 - Only used when n>10
Correlation Spearman Rank-Order Correlation cont. Advantages Does not require the assumption of normality. Can be used with data that is not of interval/ratio format. Disadvantages Not as powerful of a test as Pearson s Correlation Coefficient Uses less information and fewer assumptions
Correlation Non-parametric Statistic - Kendall s Tau Correlation Bivariate measure of association between two variables using rank-order data. Measure of a monotonic relationship between two variables. Interpretation difference in probabilities Probability that the observed data of the two variables is in the same order minus the probability that the two variables are in different orders Commonly used to evaluate the degree of agreement between the rankings of 2 judges.
Correlation Kendall s Tau Correlation cont. Formula Where: n C is the number of concordant pairs of ranks n D is the number of discordant pairs of ranks [n(n-1)]/2 is the total number of possible pairs of ranks
Correlation Kendall s Tau Correlation cont. Simple Calculation of Discordant Pairs (n D ) n D = 9
Correlation Kendall s Tau Correlation cont. Hypothesis Test Null Hypothesis (H o ): τ = 0 Alternative Hypothesis (H A ): τ not equal 0 or τ > 0 or τ < 0
Correlation Kendall s Tau Correlation cont. Hypothesis Test Significance (p-value): 2 Options Option 1 Table of Critical Values for Kendall s Tau Option 2 -» Excellent approximation when n>10
Correlation Kendall s Tau Correlation cont. Advantages Does not require the assumption of normality. Can be used with data that is not of interval/ratio format. Disadvantages Not as powerful of a test as Pearson s Correlation Coefficient Uses less information and fewer assumptions Large number of operations to calculate when n is large
Correlation Comparison of Kendall s Tau and Spearman s Rho After careful comparison, most researchers conclude there is little basis to choose one over the other. In general, the magnitude (absolute value) of Kendall s Tau is less than the value of Spearman s Rho Kendall s Tau and Spearman s Rho use the same amount of information (ranks of the data) Equally likely to detect significant correlations (similar p- values)
Correlation Comparison of Kendall s Tau and Spearman s Rho cont. When the data has a bivariate normal distribution, Spearman s Rho provides a good estimate of Pearson s Correlation Coefficient, Kendall s Tau does not. When the normal approximation is used for both statistics, Kendall s Tau approaches normality faster than Spearman s Rho. Kendall s Tau is preferable for intermediate sample sizes for this situation.
Correlation Example Data Set Numeric Data Business that specializes in selling copy machines 15 salesman are employed at a branch of the company Records include number of on site demonstrations and the number of sales for each salesman Managing director would like to know if there is a correlation between the number of demonstrations and sales.
Correlation Example Data Set Numeric Data Null Hypothesis: There is no correlation between number of demonstrations and sales Alternative Hypothesis: There is a correlation between number of demonstrations and sales.
Correlation Example Data Set Numeric Data
Correlation JMP Procedure Analyze Multivariate Methods Multivariate Input two or more variables of interest Under the Multivariate Tab Pearson Correlation Coefficient: Pairwise Correlations Spearman s Rho Coefficient: Nonparametric Correlations Spearman s ρ Kendall s Tau Coefficient: Nonparametric Correlations Kendall s τ
Correlation Example Data Set Ranked Data List of attributes and ranks given by two girls, Fiona and Kathryn A Father would like to know whether his two daughters have the same preferences in men. Null Hypothesis: There is no correlation between the two girls attitudes toward men. Alternative Hypothesis: There is a positive correlation between the girls attitudes toward men.
Correlation Example Data Set Rank Data
Correlation Example Data Set Ranked Data Analysis JMP provides the significance values only for the two sided test. Use either the tables or asymptotic distributions to find significance of one sided test Spearman s ρ = 0.8303 Alpha=.05 critical value 0.5636 Alpha=.01 critical value 0.7455 Kendall s τ = 0.6444 Alpha=.05 critical value 0.4667 Alpha=.01 critical value 0.6000
Correlation Example Data Set Ranked Data Analysis JMP provides the significance values only for the two sided test. Use either the tables or asymptotic distributions to find significance of one sided test Spearman s ρ = 0.8303 Alpha=.05 critical value 0.5636 Alpha=.01 critical value 0.7455 Kendall s τ = 0.6444 Alpha=.05 critical value 0.4667 Alpha=.01 critical value 0.6000 Questions/Comments
Differences in Independent Groups Parametric Statistic Analysis of Variance (ANOVA) Determines if there is a significant difference between the sample means of K independent groups. Compares the variability between the groups (variance of the treatment means) to the variability within the groups (average of the k within group variances) Test statistic is the ratio of the between groups variability and within groups variability Test statistic has an F distribution with k-1 and n-k degrees of freedom. Equivalent to the t-test for independent samples when there are two independent groups
Differences in Independent Groups Analysis of Variance (ANOVA) cont. Null hypothesis: The K independent groups have the same sample mean. Alternative Hypothesis: At least one of the K independent groups has a different sample mean. Reject null hypothesis for large values of the test statistic Test statistic is large when between groups variability larger than within groups variability
Differences in Independent Groups Analysis of Variance (ANOVA) cont. Assumptions 1) Each subject independently sampled at random from the population 2) Data is normally distributed Q-Q Plot, Shapiro-Wilkes Test 3) Variance within each of the k treatment groups is constant Plot data by group, Brown Forsythe Test, Breusch Pagan Test
Differences in Independent Groups Non-parametric Statistic Kruskal-Wallis/Wilcoxon Signed Rank Test Determines if there is a significant difference between the sample medians of K independent groups. Can be used on ordinal data (example Likert Scale data) Equivalent to the Mann-Whitney U test when k=2.
Differences in Independent Groups Kruskal-Wallis/Wilcoxon Signed Rank Test cont. Used in 2 situations Data is in rank order format Data has been transformed from interval/ratio format to rank order format Researcher believes that one or more of the assumptions for ANOVA have been violated Reluctantly done Transforming data into ranks decreases the amount of information used.
Differences in Independent Groups Kruskal-Wallis/Wilcoxon Signed Rank Test cont. Null hypothesis: The K independent groups have the same sample median. Alternative Hypothesis: At least one of the K independent groups has a different sample median.
Differences in Independent Groups Kruskal-Wallis/Wilcoxon Signed Rank Test cont. Test statistic Exact tables used to calculate the p-value Distribution of H is also approximately Chi-Square as N and k get large Reject Null Hypothesis for large values of H
Differences in Independent Groups Kruskal-Wallis/Wilcoxon Signed Rank Test cont. Assumptions Data randomly sampled from the population K samples independent of one another Homogeneity of Variance within the K groups Violation does not affect the test statistic as much as the ANOVA test statistic.
Differences in Independent Groups Kruskal-Wallis/Wilcoxon Signed Rank Test cont. Advantages Not as affected by violation of Variance Homogeneity assumption Research shows it is considerably more powerful of a hypothesis test than ANOVA when normality assumption violated Reduces or eliminates the effect of outliers Disadvantages Less information and fewer assumptions less powerful of a test in most situations
Differences in Independent Groups Example Dataset Independent Groups A psychologist would like to determine whether the presence of noise inhibits learning. Each subject is given 20 minutes to memorize 10 syllables and tested the next day on the number of syllables they remember. 3 treatment groups No noise in room Moderate noise classical music Extreme noise rock music
Differences in Independent Groups Example Dataset Independent Groups No Music Classical Music Rock Music Syllables Rank Syllables Rank Syllables Rank 8 9.5 7 6 4 1 10 14.5 8 9.5 8 9.5 9 12.5 5 3 7 6 10 14.5 8 9.5 5 3 9 12.5 5 3 7 6
Differences in Independent Groups Example Dataset Independent Groups Null Hypothesis: There is no difference in the performance of the subjects among the 3 treatment groups. Alternative Hypothesis: There is a difference in the performance of the subjects in at least two of the treatment groups
Differences in Independent Groups JMP Procedure Analyze Fit Y by X Syllables Y, Response Group X, Factor One Way Analysis of Syllables by Group Tab ANOVA: Means/Anova Kruskal-Wallis/Wilcoxon Signed Rank Test: Nonparametric Wilcoxon Test
Differences in Independent Groups JMP Procedure Analyze Fit Y by X Syllables Y, Response Group X, Factor One Way Analysis of Syllables by Group Tab ANOVA: Means/Anova Kruskal-Wallis/Wilcoxon Signed Rank Test: Nonparametric Wilcoxon Test Questions/Comments
Differences in Dependent Groups Parametric Statistic Matched Pairs t-test In dependent samples designs, each subject serves in all k experimental conditions. For simplicity, only the case with 2 experimental conditions will be considered. Each subject is applied both treatments Means of the two groups are compared.
Differences in Dependent Groups Matched Pairs T-test cont. More powerful of a hypothesis test than a t-test on independent samples Reduces between subject variability Should not be treated as two independent samples since the two readings for a subject are correlated. Test statistic has a Student s t Distribution with n-1 degrees of freedom
Differences in Dependent Groups Matched Pairs T-test cont. Null hypothesis: The 2 dependent groups have the same sample mean. Alternative Hypothesis: The 2 dependent groups have different sample means. Reject null hypothesis for large values of the test statistic When the difference in the means of the two groups is large
Differences in Dependent Groups Matched Pairs T-test cont. Assumptions 1) Each subject independently sampled at random from the population 2) Data is normally distributed 3) Variances within each of the 2 treatment groups are equal
Differences in Dependent Groups Non-parametric Statistic Wilcoxon Matched Pairs Signed-Ranks Test If more than 3 groups, Freidman Two-Way Analysis of Variance by Ranks. In dependent samples designs, each subject serves in both conditions. May be preferred when one or more of the assumption of the matched pairs t-test are violated Does not rank the data, ranks differences in the interval/ratio scores of the subjects.
Differences in Dependent Groups Wilcoxon Matched Pairs Signed-Ranks Test cont. Null hypothesis: The 2 dependent groups have the same sample median. Alternative Hypothesis: The 2 dependent groups have different sample medians. Reject null hypothesis when the difference in the medians of the two groups is large
Differences in Dependent Groups Wilcoxon Matched Pairs Signed-Ranks Test cont. Test Statistic Calculate the difference of scores for each subject X 1 -X 2 Rank the absolute values of the difference Rank ( X 1 -X 2 ) Subjects where X 1 =X 2 are not ranked Sum ranks of all subjects with a negative difference Sum(R-) Sum ranks of all subjects with a positive difference Sum(R+) In JMP Wilcoxon T Statistic = T = [Sum(R+)-Sum(R-)]/2 Tables Wilcoxon T Statistic = T = min(sum(r+),sum(r-))
Differences in Dependent Groups Wilcoxon Matched Pairs Signed-Ranks Test cont. Significance determined by Table of Critical T Values for Wilcoxon s Match Pairs Signed-Ranks Test Significant when sum(r-)>>sum(r+) or sum(r+)>>sum(r-)
Differences in Dependent Groups Wilcoxon Matched Pairs Signed-Ranks Test cont. Assumptions 1) Each subject independently sampled at random from the population 2) Data is in interval/ratio format 3) Variances within each of the 2 treatment groups are equal
Differences in Dependent Groups Wilcoxon Matched Pairs Signed-Ranks Test cont. Advantages When the normality assumption is violated, Wilcoxon matched pairs signed-ranks test is more powerful of a hypothesis test than the matched pairs t-test. Reduces or eliminates the effect of outliers Disadvantages Less information used and fewer assumptions thus less powerful of a test in most situations.
Differences in Dependent Groups Example Data Set Dependent Groups Regional Water Authority would like to determine if some new pollution control measures are effective. Measure the level of pollution at 12 sites in a river. Two measures are take for each site Before the pollution control measures are put in effect 4 years after pollution control measures are put in effect
Differences in Dependent Groups Example Data Set Dependent Groups Null Hypothesis: There is no difference in the pollution levels before and after implementation of the control measures. Alternative Hypothesis: There is a decrease in the pollution levels after the implementation of the control measures.
Differences in Dependent Groups Example Data Set Dependent Groups
Differences in Dependent Groups Analysis Matched Pairs T-test Analyze Matched Pairs Y, Paired Response After Controls Pollution Y, Paired Response Before Controls Pollution Wilcoxon Signed-Ranks Test Perform Matched Pairs T-test Matched Pairs Tab Wilcoxon Signed-Ranks Test
Differences in Dependent Groups Analysis Matched Pairs T-test Analyze Matched Pairs Y, Paired Response After Controls Pollution Y, Paired Response Before Controls Pollution Wilcoxon Signed-Ranks Test Perform Matched Pairs T-test Matched Pairs Tab Wilcoxon Signed-Ranks Test Questions/Comments