Which stats test
The Wilcoxon-Mann-Whitney test is a non-parametric analog to the independent samples t-test and can be used when you do not assume that the dependent variable is a normally distributed interval variable you only assume that the variable is at least ordinal.
We will use the same data file the hsb2 data file and the same variables in this example as we did in the independent t-test example above and will not assume that write , our dependent variable, is normally distributed. A chi-square test is used when you want to see if there is a relationship between two categorical variables.
In SPSS, the chisq option is used on the statistics subcommand of the crosstabs command to obtain the test statistic and its associated p-value. Remember that the chi-square test assumes that the expected value for each cell is five or higher. This assumption is easily met in the examples below. The point of this example is that one or both variables may have more than two levels, and that the variables do not have to have the same number of levels.
In this example, female has two levels male and female and ses has three levels low, medium and high. Please see the results from the chi squared example above. A one-way analysis of variance ANOVA is used when you have a categorical independent variable with two or more categories and a normally distributed interval dependent variable and you wish to test for differences in the means of the dependent variable broken down by the levels of the independent variable.
For example, using the hsb2 data file , say we wish to test whether the mean of write differs between the three program types prog. The command for this test would be:. The mean of the dependent variable differs significantly among the levels of program type. However, we do not know if the difference is between only two of the levels or all three of the levels.
The F test for the Model is the same as the F test for prog because prog was the only variable entered into the model. If other variables had also been entered, the F test for the Model would have been different from prog.
To see the mean of write for each level of program type,. From this we can see that the students in the academic program have the highest mean writing score, while students in the vocational program have the lowest.
The Kruskal Wallis test is used when you have one independent variable with two or more levels and an ordinal dependent variable. In other words, it is the non-parametric version of ANOVA and a generalized form of the Mann-Whitney test method since it permits two or more groups.
We will use the same data file as the one way ANOVA example above the hsb2 data file and the same variables as in the example above, but we will not assume that write is a normally distributed interval variable.
If some of the scores receive tied ranks, then a correction factor is used, yielding a slightly different value of chi-squared. With or without ties, the results indicate that there is a statistically significant difference among the three type of programs.
A paired samples t-test is used when you have two related observations i. For example, using the hsb2 data file we will test whether the mean of read is equal to the mean of write.
The Wilcoxon signed rank sum test is the non-parametric version of a paired samples t-test. You use the Wilcoxon signed rank sum test when you do not wish to assume that the difference between the two variables is interval and normally distributed but you do assume the difference is ordinal. We will use the same example as above, but we will not assume that the difference between read and write is interval and normally distributed.
The results suggest that there is not a statistically significant difference between read and write. If you believe the differences between read and write were not ordinal but could merely be classified as positive and negative, then you may want to consider a sign test in lieu of sign rank test.
Again, we will use the same variables in this example and assume that this difference is not ordinal. These binary outcomes may be the same outcome variable on matched pairs like a case-control study or two outcome variables from a single group.
Continuing with the hsb2 dataset used in several above examples, let us create two binary outcomes in our dataset: himath and hiread. These outcomes can be considered in a two-way contingency table.
The null hypothesis is that the proportion of students in the himath group is the same as the proportion of students in hiread group i. You would perform a one-way repeated measures analysis of variance if you had one categorical independent variable and a normally distributed interval dependent variable that was repeated at least twice for each subject. This is the equivalent of the paired samples t-test, but allows for two or more levels of the categorical variable.
This tests whether the mean of the dependent variable differs by the categorical variable. In this data set, y is the dependent variable, a is the repeated measure and s is the variable that indicates the subject number. You will notice that this output gives four different p-values. No matter which p-value you use, our results indicate that we have a statistically significant effect of a at the.
If you have a binary outcome measured repeatedly for each subject and you wish to run a logistic regression that accounts for the effect of multiple measures from single subjects, you can perform a repeated measures logistic regression.
The exercise data file contains 3 pulse measurements from each of 30 people assigned to 2 different diet regiments and 3 different exercise regiments. A factorial ANOVA has two or more categorical independent variables either with or without the interactions and a single normally distributed interval dependent variable.
For example, using the hsb2 data file we will look at writing scores write as the dependent variable and gender female and socio-economic status ses as independent variables, and we will include an interaction of female by ses. Note that in SPSS, you do not need to have the interaction term s in your data set. You perform a Friedman test when you have one within-subjects independent variable with two or more levels and a dependent variable that is not interval and normally distributed but at least ordinal.
We will use this test to determine if there is a difference in the reading, writing and math scores. The null hypothesis in this test is that the distribution of the ranks of each type of score i. To conduct a Friedman test, the data need to be in a long format. SPSS handles this for you, but in other statistical packages you will have to reshape the data before you can conduct this test.
Hence, there is no evidence that the distributions of the three types of scores are different. Ordered logistic regression is used when the dependent variable is ordered, but not continuous. For example, using the hsb2 data file we will create an ordered variable called write3. This variable will have the values 1, 2 and 3, indicating a low, medium or high writing score.
We do not generally recommend categorizing a continuous variable in this way; we are simply creating a variable to use for this example. We will use gender female , reading score read and social studies score socst as predictor variables in this model. We will use a logit link and on the print subcommand we have requested the parameter estimates, the model summary statistics and the test of the parallel lines assumption.
There are two thresholds for this model because there are three levels of the outcome variable. One of the assumptions underlying ordinal logistic and ordinal probit regression is that the relationship between each pair of outcome groups is the same. In other words, ordinal logistic regression assumes that the coefficients that describe the relationship between, say, the lowest versus all higher categories of the response variable are the same as those that describe the relationship between the next lowest category and all higher categories, etc.
This is called the proportional odds assumption or the parallel regression assumption. Because the relationship between all pairs of groups is the same, there is only one set of coefficients only one model. If this was not the case, we would need different models such as a generalized ordered logit model to describe the relationship between each pair of outcome groups.
A factorial logistic regression is used when you have two or more categorical independent variables but a dichotomous dependent variable. For example, using the hsb2 data file we will use female as our dependent variable, because it is the only dichotomous variable in our data set; certainly not because it common practice to use gender as an outcome variable. Table of contents What does a statistical test do?
When to perform a statistical test Choosing a parametric test: regression, comparison, or correlation Choosing a nonparametric test Flowchart: choosing a statistical test Frequently asked questions about statistical tests. Statistical tests work by calculating a test statistic — a number that describes how much the relationship between variables in your test differs from the null hypothesis of no relationship. It then calculates a p -value probability value. The p -value estimates how likely it is that you would see the difference described by the test statistic if the null hypothesis of no relationship were true.
If the value of the test statistic is more extreme than the statistic calculated from the null hypothesis, then you can infer a statistically significant relationship between the predictor and outcome variables. If the value of the test statistic is less extreme than the one calculated from the null hypothesis, then you can infer no statistically significant relationship between the predictor and outcome variables.
You can perform statistical tests on data that have been collected in a statistically valid manner — either through an experiment , or through observations made using probability sampling methods.
For a statistical test to be valid , your sample size needs to be large enough to approximate the true distribution of the population being studied. If your data do not meet the assumptions of normality or homogeneity of variance, you may be able to perform a nonparametric statistical test , which allows you to make comparisons without any assumptions about the data distribution.
If your data do not meet the assumption of independence of observations, you may be able to use a test that accounts for structure in your data repeated-measures tests or tests that include blocking variables.
The types of variables you have usually determine what type of statistical test you can use. Quantitative variables represent amounts of things e. Types of quantitative variables include:. Categorical variables represent groupings of things e. Types of categorical variables include:.
Choose the test that fits the types of predictor and outcome variables you have collected if you are doing an experiment , these are the independent and dependent variables. Consult the tables below to see which test best matches your variables. Scribbr editors not only correct grammar and spelling mistakes, but also strengthen your writing by making sure your paper is free of vague language, redundant words and awkward phrasing.
See editing example. Parametric tests usually have stricter requirements than nonparametric tests, and are able to make stronger inferences from the data. They can only be conducted with data that adheres to the common assumptions of statistical tests. The most common types of parametric test include regression tests, comparison tests, and correlation tests.
Regression tests look for cause-and-effect relationships. They can be used to estimate the effect of one or more continuous variables on another variable. Comparison tests look for differences among group means. They can be used to test the effect of a categorical variable on the mean value of some other characteristic.
T-tests are used when comparing the means of precisely two groups e. Correlation tests check whether variables are related without hypothesizing a cause-and-effect relationship. Fisher's test chi-square for large samples. Compare two paired groups. Paired t test. McNemar's test. Compare three or more unmatched groups. Kruskal-Wallis test. Chi-square test.
Compare three or more matched groups. Friedman test. Quantify association between two variables. Pearson correlation. Spearman correlation. Predict value from another measured variable. Simple linear regression or Nonlinear regression. Predict value from several measured or binomial variables. Cox proportional hazard. Exact test for goodness-of-fit. Chi-square test of goodness-of-fit. G —test of goodness-of-fit. Repeated G —tests of goodness-of-fit.
Chi-square test of independence. G —test of independence. Cochran-Mantel-Haenszel test. Standard error of the mean. One-sample t —test.
Two-sample t —test. One-way anova. Tukey-Kramer test. Maine, Nova Scotia vs. Massachusetts, Maine vs. Massachusetts, etc. Bartlett's test. Paired t —test. Wilcoxon signed-rank test. Analysis of covariance ancova.
0コメント