The Statistics Tutor's Quick Guide to Commonly Used Statistical Tests

Total Page:16

File Type:pdf, Size:1020Kb

The Statistics Tutor's Quick Guide to Commonly Used Statistical Tests statstutor community project encouraging academics to share statistics support resources All stcp resources are released under a Creative Commons licence Stcp-marshallowen-7 The Statistics Tutor’s Quick Guide to Commonly Used Statistical Tests © Ellen Marshall, University of Sheffield Reviewer: Jean Russell University of Sheffield www.statstutor.ac.uk Contents CONTENTS ..................................................................................................................................................................................2 INTRODUCTION ............................................................................................................................................................................4 TIPS FOR TUTORING .......................................................................................................................................................................5 SECTION 1 GENERAL INFORMATION ............................................................................................................................................6 DATA TYPES .................................................................................................................................................................................7 SUMMARY STATISTICS ....................................................................................................................................................................7 Summary of descriptive and graphical statistics ..................................................................................................................8 DECIDING ON APPROPRIATE STATISTICAL METHODS FOR RESEARCH ...........................................................................................................9 ORDINAL DATA .............................................................................................................................................................................9 WHICH TEST SHOULD I USE? ..........................................................................................................................................................10 Common Single Comparison Tests ....................................................................................................................................10 Tests of association ...........................................................................................................................................................10 One scale dependent and several independent variables ..................................................................................................11 ASSUMPTION OF NORMALITY .........................................................................................................................................................12 Statistical tests for normality ............................................................................................................................................12 Non-parametric tests ........................................................................................................................................................13 OTHER COMMON ASSUMPTIONS ....................................................................................................................................................14 For independent t-tests and ANOVA .................................................................................................................................14 For repeated measures ANOVA .........................................................................................................................................14 Independent observations .................................................................................................................................................14 CONFIDENCE INTERVALS ...............................................................................................................................................................15 HYPOTHESIS TESTING ...................................................................................................................................................................17 MULTIPLE TESTING ......................................................................................................................................................................18 SAMPLE SIZE AND HYPOTHESIS TESTS ...............................................................................................................................................19 EFFECT SIZE ...............................................................................................................................................................................19 SECTION 2 THE MOST COMMON STATISTICAL TECHNIQUES USED ............................................................................................20 INDEPENDENT T-TEST ...................................................................................................................................................................21 MANN-WHITNEY TEST .................................................................................................................................................................22 PAIRED T-TEST ...........................................................................................................................................................................23 WILCOXON SIGNED RANK TEST ......................................................................................................................................................24 ONE-WAY ANOVA .....................................................................................................................................................................25 KRUSKAL-WALLIS TEST .................................................................................................................................................................26 ONE-WAY ANOVA WITH REPEATED MEASURES (WITHIN SUBJECTS) .......................................................................................................27 FRIEDMAN TEST ..........................................................................................................................................................................28 TWO-WAY ANOVA ....................................................................................................................................................................29 CHI-SQUARED TEST......................................................................................................................................................................30 ODDS AND RELATIVE RISK .............................................................................................................................................................31 Odds .................................................................................................................................................................................31 Odds Ratio ........................................................................................................................................................................31 Relative Risk (RR) ..............................................................................................................................................................31 CORRELATION ............................................................................................................................................................................32 PEARSON’S CORRELATION COEFFICIENT ............................................................................................................................................32 RANKED CORRELATION COEFFICIENTS ...............................................................................................................................................33 Spearman’s Rank Correlation Coefficient ..........................................................................................................................33 Kendall’s Tau Rank Correlation Coefficient ........................................................................................................................33 PARTIAL CORRELATION .................................................................................................................................................................33 REGRESSION ..............................................................................................................................................................................34 LINEAR REGRESSION ....................................................................................................................................................................34 LOGISTIC REGRESSION ..................................................................................................................................................................36 SECTION 3 OTHER STATISTICAL TESTS AND TECHNIQUES ...........................................................................................................37 PROPORTIONS TEST (Z-TEST)..........................................................................................................................................................38 RELIABILITY ...............................................................................................................................................................................39
Recommended publications
  • Hypothesis Testing and Likelihood Ratio Tests
    Hypottthesiiis tttestttiiing and llliiikellliiihood ratttiiio tttesttts Y We will adopt the following model for observed data. The distribution of Y = (Y1, ..., Yn) is parameter considered known except for some paramett er ç, which may be a vector ç = (ç1, ..., çk); ç“Ç, the paramettter space. The parameter space will usually be an open set. If Y is a continuous random variable, its probabiiillliiittty densiiittty functttiiion (pdf) will de denoted f(yy;ç) . If Y is y probability mass function y Y y discrete then f(yy;ç) represents the probabii ll ii tt y mass functt ii on (pmf); f(yy;ç) = Pç(YY=yy). A stttatttiiistttiiicalll hypottthesiiis is a statement about the value of ç. We are interested in testing the null hypothesis H0: ç“Ç0 versus the alternative hypothesis H1: ç“Ç1. Where Ç0 and Ç1 ¶ Ç. hypothesis test Naturally Ç0 § Ç1 = ∅, but we need not have Ç0 ∞ Ç1 = Ç. A hypott hesii s tt estt is a procedure critical region for deciding between H0 and H1 based on the sample data. It is equivalent to a crii tt ii call regii on: a critical region is a set C ¶ Rn y such that if y = (y1, ..., yn) “ C, H0 is rejected. Typically C is expressed in terms of the value of some tttesttt stttatttiiistttiiic, a function of the sample data. For µ example, we might have C = {(y , ..., y ): y – 0 ≥ 3.324}. The number 3.324 here is called a 1 n s/ n µ criiitttiiicalll valllue of the test statistic Y – 0 . S/ n If y“C but ç“Ç 0, we have committed a Type I error.
    [Show full text]
  • 14. Non-Parametric Tests You Know the Story. You've Tried for Hours To
    14. Non-Parametric Tests You know the story. You’ve tried for hours to normalise your data. But you can’t. And even if you can, your variances turn out to be unequal anyway. But do not dismay. There are statistical tests that you can run with non-normal, heteroscedastic data. All of the tests that we have seen so far (e.g. t-tests, ANOVA, etc.) rely on comparisons with some probability distribution such as a t-distribution or f-distribution. These are known as “parametric statistics” as they make inferences about population parameters. However, there are other statistical tests that do not have to meet the same assumptions, known as “non-parametric tests.” Many of these tests are based on ranks and/or are comparisons of sample medians rather than means (as means of non-normal data are not meaningful). Non-parametric tests are often not as powerful as parametric tests, so you may find that your p-values are slightly larger. However, if your data is highly non-normal, non-parametric test may detect an effect that is missed in the equivalent parametric test due to falsely large variances caused by the skew of the data. There is, of course, no problem in analyzing normally distributed data with non-parametric statistics also. Non-parametric tests are equally valid (i.e. equally defendable) and most have been around as long as their parametric counterparts. So, if your data does not meet the assumption of normality or homoscedasticity and if it is impossible (or inappropriate) to transform it, you can use non-parametric tests.
    [Show full text]
  • Descriptive Statistics (Part 2): Interpreting Study Results
    Statistical Notes II Descriptive statistics (Part 2): Interpreting study results A Cook and A Sheikh he previous paper in this series looked at ‘baseline’. Investigations of treatment effects can be descriptive statistics, showing how to use and made in similar fashion by comparisons of disease T interpret fundamental measures such as the probability in treated and untreated patients. mean and standard deviation. Here we continue with descriptive statistics, looking at measures more The relative risk (RR), also sometimes known as specific to medical research. We start by defining the risk ratio, compares the risk of exposed and risk and odds, the two basic measures of disease unexposed subjects, while the odds ratio (OR) probability. Then we show how the effect of a disease compares odds. A relative risk or odds ratio greater risk factor, or a treatment, can be measured using the than one indicates an exposure to be harmful, while relative risk or the odds ratio. Finally we discuss the a value less than one indicates a protective effect. ‘number needed to treat’, a measure derived from the RR = 1.2 means exposed people are 20% more likely relative risk, which has gained popularity because of to be diseased, RR = 1.4 means 40% more likely. its clinical usefulness. Examples from the literature OR = 1.2 means that the odds of disease is 20% higher are used to illustrate important concepts. in exposed people. RISK AND ODDS Among workers at factory two (‘exposed’ workers) The probability of an individual becoming diseased the risk is 13 / 116 = 0.11, compared to an ‘unexposed’ is the risk.
    [Show full text]
  • The Locally Gaussian Partial Correlation Håkon Otneim∗ Dag Tjøstheim†
    The Locally Gaussian Partial Correlation Håkon Otneim∗ Dag Tjøstheim† Abstract It is well known that the dependence structure for jointly Gaussian variables can be fully captured using correlations, and that the conditional dependence structure in the same way can be described using partial correlations. The partial correlation does not, however, characterize conditional dependence in many non-Gaussian populations. This paper introduces the local Gaussian partial correlation (LGPC), a new measure of conditional dependence. It is a local version of the partial correlation coefficient that characterizes conditional dependence in a large class of populations. It has some useful and novel properties besides: The LGPC reduces to the ordinary partial correlation for jointly normal variables, and it distinguishes between positive and negative conditional dependence. Furthermore, the LGPC can be used to study departures from conditional independence in specific parts of the distribution. We provide several examples of this, both simulated and real, and derive estimation theory under a local likelihood framework. Finally, we indicate how the LGPC can be used to construct a powerful test for conditional independence, which, again, can be used to detect Granger causality in time series. 1 Introduction Estimation of conditional dependence and testing for conditional independence are extremely important topics in classical as well as modern statistics. In the last two decades, for instance, there has been a very intense development using conditional dependence in probabilistic network theory. This comes in addition to conditional multivariate time series analysis and copula analysis. For jointly Gaussian variables, conditional dependence is measured by the partial correlation coefficient. Given three jointly Gaussian stochastic variables X1, X2 and X3, X1 and X2 are conditionally independent given X3 if and only if the partial correlation between X1 and X2 given X3 is equal to zero.
    [Show full text]
  • Limitations of the Odds Ratio in Gauging the Performance of a Diagnostic, Prognostic, Or Screening Marker
    American Journal of Epidemiology Vol. 159, No. 9 Copyright © 2004 by the Johns Hopkins Bloomberg School of Public Health Printed in U.S.A. All rights reserved DOI: 10.1093/aje/kwh101 Limitations of the Odds Ratio in Gauging the Performance of a Diagnostic, Prognostic, or Screening Marker Margaret Sullivan Pepe1,2, Holly Janes2, Gary Longton1, Wendy Leisenring1,2,3, and Polly Newcomb1 1 Division of Public Health Sciences, Fred Hutchinson Cancer Research Center, Seattle, WA. 2 Department of Biostatistics, University of Washington, Seattle, WA. 3 Division of Clinical Research, Fred Hutchinson Cancer Research Center, Seattle, WA. Downloaded from Received for publication June 24, 2003; accepted for publication October 28, 2003. A marker strongly associated with outcome (or disease) is often assumed to be effective for classifying persons http://aje.oxfordjournals.org/ according to their current or future outcome. However, for this assumption to be true, the associated odds ratio must be of a magnitude rarely seen in epidemiologic studies. In this paper, an illustration of the relation between odds ratios and receiver operating characteristic curves shows, for example, that a marker with an odds ratio of as high as 3 is in fact a very poor classification tool. If a marker identifies 10% of controls as positive (false positives) and has an odds ratio of 3, then it will correctly identify only 25% of cases as positive (true positives). The authors illustrate that a single measure of association such as an odds ratio does not meaningfully describe a marker’s ability to classify subjects. Appropriate statistical methods for assessing and reporting the classification power of a marker are described.
    [Show full text]
  • Summarize — Summary Statistics
    Title stata.com summarize — Summary statistics Description Quick start Menu Syntax Options Remarks and examples Stored results Methods and formulas References Also see Description summarize calculates and displays a variety of univariate summary statistics. If no varlist is specified, summary statistics are calculated for all the variables in the dataset. Quick start Basic summary statistics for continuous variable v1 summarize v1 Same as above, and include v2 and v3 summarize v1-v3 Same as above, and provide additional detail about the distribution summarize v1-v3, detail Summary statistics reported separately for each level of catvar by catvar: summarize v1 With frequency weight wvar summarize v1 [fweight=wvar] Menu Statistics > Summaries, tables, and tests > Summary and descriptive statistics > Summary statistics 1 2 summarize — Summary statistics Syntax summarize varlist if in weight , options options Description Main detail display additional statistics meanonly suppress the display; calculate only the mean; programmer’s option format use variable’s display format separator(#) draw separator line after every # variables; default is separator(5) display options control spacing, line width, and base and empty cells varlist may contain factor variables; see [U] 11.4.3 Factor variables. varlist may contain time-series operators; see [U] 11.4.4 Time-series varlists. by, collect, rolling, and statsby are allowed; see [U] 11.1.10 Prefix commands. aweights, fweights, and iweights are allowed. However, iweights may not be used with the detail option; see [U] 11.1.6 weight. Options Main £ £detail produces additional statistics, including skewness, kurtosis, the four smallest and four largest values, and various percentiles. meanonly, which is allowed only when detail is not specified, suppresses the display of results and calculation of the variance.
    [Show full text]
  • Synthpop: Bespoke Creation of Synthetic Data in R
    synthpop: Bespoke Creation of Synthetic Data in R Beata Nowok Gillian M Raab Chris Dibben University of Edinburgh University of Edinburgh University of Edinburgh Abstract In many contexts, confidentiality constraints severely restrict access to unique and valuable microdata. Synthetic data which mimic the original observed data and preserve the relationships between variables but do not contain any disclosive records are one possible solution to this problem. The synthpop package for R, introduced in this paper, provides routines to generate synthetic versions of original data sets. We describe the methodology and its consequences for the data characteristics. We illustrate the package features using a survey data example. Keywords: synthetic data, disclosure control, CART, R, UK Longitudinal Studies. This introduction to the R package synthpop is a slightly amended version of Nowok B, Raab GM, Dibben C (2016). synthpop: Bespoke Creation of Synthetic Data in R. Journal of Statistical Software, 74(11), 1-26. doi:10.18637/jss.v074.i11. URL https://www.jstatsoft. org/article/view/v074i11. 1. Introduction and background 1.1. Synthetic data for disclosure control National statistical agencies and other institutions gather large amounts of information about individuals and organisations. Such data can be used to understand population processes so as to inform policy and planning. The cost of such data can be considerable, both for the collectors and the subjects who provide their data. Because of confidentiality constraints and guarantees issued to data subjects the full access to such data is often restricted to the staff of the collection agencies. Traditionally, data collectors have used anonymisation along with simple perturbation methods such as aggregation, recoding, record-swapping, suppression of sensitive values or adding random noise to prevent the identification of data subjects.
    [Show full text]
  • Demand STAR Ranking Methodology
    Demand STAR Ranking Methodology The methodology used to assess demand in this tool is based upon a process used by the State of Louisiana’s “Star Rating” system. Data regarding current openings, short term and long term hiring outlooks along with wages are combined into a single five-point ranking metric. Long Term Occupational Projections 2014-2014 The steps to derive a rank for long term hiring outlook (DUA Occupational Projections) are as follows: 1.) Eliminate occupations with a SOC code ending in “9” in order to remove catch-all occupational titles containing “All Other” in the description. 2.) Compile occupations by six digit Standard Occupational Classification (SOC) codes. 3.) Calculate decile ranking for each occupation based on: a. Total Projected Employment 2024 b. Projected Change number from 2014-2024 4.) For each metric, assign 1-10 points for each occupation based on the decile ranking 5.) Average the points for Project Employment and Change from 2014-2024 Short Term Occupational Projection 2015-2017 The steps to derive occupational ranks for the short-term hiring outlook are same use for the Long Term Hiring Outlook, but using the Short Term Occupational Projections 2015-2017 data set. Current Job Openings Current job openings rankings are assigned based on actual jobs posted on-line for each region for a 12 month period. 12 month average posting volume for each occupation by six digit SOC codes was captured using The Conference Board’s Help Wanted On-Line analytics tool. The process for ranking is as follows: 1) Eliminate occupations with a SOC ending in “9” in order to remove catch-all occupational titles containing “All Other” in the description 2) Compile occupations by six digit Standard Occupational Classification (SOC) codes 3) Determine decile ranking for the average number of on-line postings by occupation 4) Assign 1-10 points for each occupation based on the decile ranking Wages In an effort to prioritize occupations with higher wages, wages are weighted more heavily than the current, short-term and long-term hiring outlook rankings.
    [Show full text]
  • Bootstrapping Regression Models
    Bootstrapping Regression Models Appendix to An R and S-PLUS Companion to Applied Regression John Fox January 2002 1 Basic Ideas Bootstrapping is a general approach to statistical inference based on building a sampling distribution for a statistic by resampling from the data at hand. The term ‘bootstrapping,’ due to Efron (1979), is an allusion to the expression ‘pulling oneself up by one’s bootstraps’ – in this case, using the sample data as a population from which repeated samples are drawn. At first blush, the approach seems circular, but has been shown to be sound. Two S libraries for bootstrapping are associated with extensive treatments of the subject: Efron and Tibshirani’s (1993) bootstrap library, and Davison and Hinkley’s (1997) boot library. Of the two, boot, programmed by A. J. Canty, is somewhat more capable, and will be used for the examples in this appendix. There are several forms of the bootstrap, and, additionally, several other resampling methods that are related to it, such as jackknifing, cross-validation, randomization tests,andpermutation tests. I will stress the nonparametric bootstrap. Suppose that we draw a sample S = {X1,X2, ..., Xn} from a population P = {x1,x2, ..., xN };imagine further, at least for the time being, that N is very much larger than n,andthatS is either a simple random sample or an independent random sample from P;1 I will briefly consider other sampling schemes at the end of the appendix. It will also help initially to think of the elements of the population (and, hence, of the sample) as scalar values, but they could just as easily be vectors (i.e., multivariate).
    [Show full text]
  • Ranking of Genes, Snvs, and Sequence Regions Ranking Elements Within Various Types of Biosets for Metaanalysis of Genetic Data
    Technical Note: Informatics Ranking of Genes, SNVs, and Sequence Regions Ranking elements within various types of biosets for metaanalysis of genetic data. Introduction In summary, biosets may contain many of the following columns: • Identifier of an entity such as a gene, SNV, or sequence One of the primary applications of the BaseSpace® Correlation Engine region (required) is to allow researchers to perform metaanalyses that harness large amounts of genomic, epigenetic, proteomic, and assay data. Such • Other identifiers of the entity—eg, chromosome, position analyses look for potentially novel and interesting results that cannot • Summary statistics—eg, p-value, fold change, score, rank, necessarily be seen by looking at a single existing experiment. These odds ratio results may be interesting in themselves (eg, associations between different treatment factors, or between a treatment and an existing Ranking of Elements within a Bioset known pathway or protein family), or they may be used to guide further Most biosets generated at Illumina include elements that are changing research and experimentation. relative to a reference genome (mutations) or due to a treatment (or some other test factor) along with a corresponding rank and The primary entity in these analyses is the bioset. It is a ranked list directionality. Typically, the rank will be based on the magnitude of of elements (genes, probes, proteins, compounds, single-nucleotide change (eg, fold change); however, other values, including p-values, variants [SNVs], sequence regions, etc.) that corresponds to a given can be used for this ranking. Directionality is determined from the sign treatment or condition in an experiment, an assay, or a single patient of the statistic: eg, up (+) or down(-) regulation or copy-number gain sample (eg, mutations).
    [Show full text]
  • U3 Introduction to Summary Statistics
    Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Statistics • The collection, evaluation, and interpretation of data Introduction to Summary Statistics • Statistical analysis of measurements can help verify the quality of a design or process Summary Statistics Mean Central Tendency Central Tendency • The mean is the sum of the values of a set • “Center” of a distribution of data divided by the number of values in – Mean, median, mode that data set. Variation • Spread of values around the center – Range, standard deviation, interquartile range x μ = i Distribution N • Summary of the frequency of values – Frequency tables, histograms, normal distribution Project Lead The Way, Inc. Copyright 2010 1 Presentation Name Course Name Unit # – Lesson #.# – Lesson Name Mean Central Tendency Mean Central Tendency x • Data Set μ = i 3 7 12 17 21 21 23 27 32 36 44 N • Sum of the values = 243 • Number of values = 11 μ = mean value x 243 x = individual data value Mean = μ = i = = 22.09 i N 11 xi = summation of all data values N = # of data values in the data set A Note about Rounding in Statistics Mean – Rounding • General Rule: Don’t round until the final • Data Set answer 3 7 12 17 21 21 23 27 32 36 44 – If you are writing intermediate results you may • Sum of the values = 243 round values, but keep unrounded number in memory • Number of values = 11 • Mean – round to one more decimal place xi 243 Mean = μ = = = 22.09 than the original data N 11 • Standard Deviation: Round to one more decimal place than the original data • Reported: Mean = 22.1 Project Lead The Way, Inc.
    [Show full text]
  • The Statistical Significance of Randomized Controlled Trial Results Is Frequently Fragile: a Case for a Fragility Index
    The statistical significance of randomized controlled trial results is frequently fragile: A case for a Fragility Index Walsh, M., Srinathan, S. K., McAuley, D. F., Mrkobrada, M., Levine, O., Ribic, C., Molnar, A. O., Dattani, N. D., Burke, A., Guyatt, G., Thabane, L., Walter, S. D., Pogue, J., & Devereaux, P. J. (2014). The statistical significance of randomized controlled trial results is frequently fragile: A case for a Fragility Index. Journal of Clinical Epidemiology, 67(6), 622-628. https://doi.org/10.1016/j.jclinepi.2013.10.019 Published in: Journal of Clinical Epidemiology Document Version: Publisher's PDF, also known as Version of record Queen's University Belfast - Research Portal: Link to publication record in Queen's University Belfast Research Portal Publisher rights 2014 The Authors. Published by Elsevier Inc. This is an open access article published under a Creative Commons Attribution-NonCommercial-NoDerivs License (https://creativecommons.org/licenses/by-nc-nd/3.0/), which permits distribution and reproduction for non-commercial purposes, provided the author and source are cited. General rights Copyright for the publications made accessible via the Queen's University Belfast Research Portal is retained by the author(s) and / or other copyright owners and it is a condition of accessing these publications that users recognise and abide by the legal requirements associated with these rights. Take down policy The Research Portal is Queen's institutional repository that provides access to Queen's research output. Every effort has been made to ensure that content in the Research Portal does not infringe any person's rights, or applicable UK laws.
    [Show full text]