Bio 183 Statistics in Research. B. Cleaning up your data: getting rid of problems

Similar documents
Background to Statistics

HYPOTHESIS TESTING: THE CHI-SQUARE STATISTIC

Review of Statistics 101

The Chi-Square Distributions

9/2/2010. Wildlife Management is a very quantitative field of study. throughout this course and throughout your career.

Glossary. The ISI glossary of statistical terms provides definitions in a number of different languages:

LECTURE 5. Introduction to Econometrics. Hypothesis testing

Rigorous Science - Based on a probability value? The linkage between Popperian science and statistical analysis

Rigorous Science - Based on a probability value? The linkage between Popperian science and statistical analysis

Rigorous Science - Based on a probability value? The linkage between Popperian science and statistical analysis

Harvard University. Rigorous Research in Engineering Education

Testing Research and Statistical Hypotheses

Introduction and Descriptive Statistics p. 1 Introduction to Statistics p. 3 Statistics, Science, and Observations p. 5 Populations and Samples p.

Psych 230. Psychological Measurement and Statistics

hypothesis a claim about the value of some parameter (like p)

Business Statistics. Lecture 10: Course Review

Nonparametric Statistics

GROUPED DATA E.G. FOR SAMPLE OF RAW DATA (E.G. 4, 12, 7, 5, MEAN G x / n STANDARD DEVIATION MEDIAN AND QUARTILES STANDARD DEVIATION

AP Statistics Cumulative AP Exam Study Guide

Chi Square Analysis M&M Statistics. Name Period Date

Quantitative Analysis and Empirical Methods

7.2 One-Sample Correlation ( = a) Introduction. Correlation analysis measures the strength and direction of association between

Multiple Regression Analysis

The Chi-Square Distributions

6 Single Sample Methods for a Location Parameter

Transition Passage to Descriptive Statistics 28

PSY 305. Module 3. Page Title. Introduction to Hypothesis Testing Z-tests. Five steps in hypothesis testing

Hypothesis testing. Data to decisions

Section 10.1 (Part 2 of 2) Significance Tests: Power of a Test

Statistics: revision

STAT 135 Lab 5 Bootstrapping and Hypothesis Testing

Evaluation. Andrea Passerini Machine Learning. Evaluation

Statistics Primer. ORC Staff: Jayme Palka Peter Boedeker Marcus Fagan Trey Dejong

Lectures 5 & 6: Hypothesis Testing

Basics of Experimental Design. Review of Statistics. Basic Study. Experimental Design. When an Experiment is Not Possible. Studying Relations

Introduction to Statistics with GraphPad Prism 7

Introduction to hypothesis testing

Lecture 06. DSUR CH 05 Exploring Assumptions of parametric statistics Hypothesis Testing Power

Course Review. Kin 304W Week 14: April 9, 2013

L6: Regression II. JJ Chen. July 2, 2015

STATS 200: Introduction to Statistical Inference. Lecture 29: Course review

This gives us an upper and lower bound that capture our population mean.

z and t tests for the mean of a normal distribution Confidence intervals for the mean Binomial tests

Inferential statistics

Exam details. Final Review Session. Things to Review

An inferential procedure to use sample data to understand a population Procedures

Review of Statistics

LOOKING FOR RELATIONSHIPS

CHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)

Statistical Inference: Estimation and Confidence Intervals Hypothesis Testing

Glossary for the Triola Statistics Series

Ch. 7. One sample hypothesis tests for µ and σ

Nominal Data. Parametric Statistics. Nonparametric Statistics. Parametric vs Nonparametric Tests. Greg C Elvers

Introduction to Statistical Inference

The t-statistic. Student s t Test

Econ 325: Introduction to Empirical Economics

Evaluation requires to define performance measures to be optimized

Chapter 7 Comparison of two independent samples

Math 152. Rumbos Fall Solutions to Exam #2

Contents. Acknowledgments. xix

Wilcoxon Test and Calculating Sample Sizes

Hypothesis testing (cont d)

Test Yourself! Methodological and Statistical Requirements for M.Sc. Early Childhood Research

Analytical Graphing. lets start with the best graph ever made

Data Mining. CS57300 Purdue University. March 22, 2018

STA442/2101: Assignment 5

ME3620. Theory of Engineering Experimentation. Spring Chapter IV. Decision Making for a Single Sample. Chapter IV

DETAILED CONTENTS PART I INTRODUCTION AND DESCRIPTIVE STATISTICS. 1. Introduction to Statistics

exp{ (x i) 2 i=1 n i=1 (x i a) 2 (x i ) 2 = exp{ i=1 n i=1 n 2ax i a 2 i=1

Performance Evaluation and Comparison

STA 101 Final Review

The goodness-of-fit test Having discussed how to make comparisons between two proportions, we now consider comparisons of multiple proportions.

UCLA STAT 251. Statistical Methods for the Life and Health Sciences. Hypothesis Testing. Instructor: Ivo Dinov,

BIOS 6222: Biostatistics II. Outline. Course Presentation. Course Presentation. Review of Basic Concepts. Why Nonparametrics.

Stat 135, Fall 2006 A. Adhikari HOMEWORK 10 SOLUTIONS

Advanced Experimental Design

Black White Total Observed Expected χ 2 = (f observed f expected ) 2 f expected (83 126) 2 ( )2 126

CIVL /8904 T R A F F I C F L O W T H E O R Y L E C T U R E - 8

Teaching S1/S2 statistics using graphing technology

" M A #M B. Standard deviation of the population (Greek lowercase letter sigma) σ 2

Purposes of Data Analysis. Variables and Samples. Parameters and Statistics. Part 1: Probability Distributions

BIO5312 Biostatistics Lecture 6: Statistical hypothesis testings

Parameter Estimation, Sampling Distributions & Hypothesis Testing

Review: what is a linear model. Y = β 0 + β 1 X 1 + β 2 X 2 + A model of the following form:

Testing Independence

Chapter 2 Descriptive Statistics

Statistics for IT Managers

(right tailed) or minus Z α. (left-tailed). For a two-tailed test the critical Z value is going to be.

Linear Regression with 1 Regressor. Introduction to Econometrics Spring 2012 Ken Simons

Statistics Introductory Correlation

Experimental Design, Data, and Data Summary

Two Correlated Proportions Non- Inferiority, Superiority, and Equivalence Tests

Medical statistics part I, autumn 2010: One sample test of hypothesis

Sociology 6Z03 Review II

Chapter 26: Comparing Counts (Chi Square)

EC212: Introduction to Econometrics Review Materials (Wooldridge, Appendix)

Basics on t-tests Independent Sample t-tests Single-Sample t-tests Summary of t-tests Multiple Tests, Effect Size Proportions. Statistiek I.

Normal distribution We have a random sample from N(m, υ). The sample mean is Ȳ and the corrected sum of squares is S yy. After some simplification,

Data are sometimes not compatible with the assumptions of parametric statistical tests (i.e. t-test, regression, ANOVA)

Mathematical Notation Math Introduction to Applied Statistics

Transcription:

Bio 183 Statistics in Research A. Research designs B. Cleaning up your data: getting rid of problems C. Basic descriptive statistics D. What test should you use?

What is science?: Science is a way of knowing.(anon.?) Propositions/ideas/hypotheses that can t be rejected are not falsifiable and are not scientific. Science is a way of trying not to fool yourself -Richard Feynman

Note: Not every project has a clear hypothesis so is that project science? It Depends: Many projects are part of research program. - some components may be purely descriptive and not test a hypothesis. - that s OK because hypotheses often need background info before they can be framed well ( natural history the field, lab (molecular sequences) Otherwise: just isolated facts.

Philosophy of science: the scientific method (review) Philosophy How we understand the world Science A method for achieving this goal Develop theory Formulate hypotheses - predictions Test predictions Design & Analysis Statistics How we test predictions of hypotheses Tool for quantitative tests

A. Research designs (why do this before stats?) 1. Basic principles 2. Basic designs B. Cleaning up your data: getting rid of problems C. Basic descriptive statistics D. What test should you use?

A. Research designs 1. Basic Principles: a) Contrasts (manipulative or not) explicit (groups, treatments, areas, etc.) implicit (H A vs a value of H o that is known from another study or assumed) Controls? Why? What is a control? Effects are due to the comparisons you study: All else being equal. Do we always need controls? What are the controls if you compare 2 treatments (e.g. light, concentrations of X)?

More design concerns: c) Removing bias in treatments, plots, observations randomize: individuals, areas, location (in field, lab, greenhouse ) d) Replicates why? - variability how many? - that depends!! - on average effect size, variation, what s affordable (money, time)

2. Basic, Simple Designs to compare effects Powerful designs (& some examples) - compare imposed changes (manipulation) - compare unmanipulated areas, individuals or objects ( natural experiment ) [But ] - before and after (same plot/area, same individual )

Statistics in Research A. Research designs B. Cleaning your data: getting rid of problems 1. Problem data points 2. Normal or not? What to do? C. Basic descriptive statistics D. What test should you use?

B. Cleaning your data: common problems.. Data need to be examined before you do the statistics Goal: To eliminate problems that lead to inappropriate analyses and/or interpretation.

Cleaning up your data: 1. Problem data points: - Any very odd points (and esp if you know why they are odd)? - You can eliminate them sometimes!! - This does NOT mean selecting the data points that best fits your hypotheses.

2. If your data are NOT normal Normal = bell-shaped curve probably don t worry about this for your current projects

But for your information: i) Transformations: Some basic ones to try for continuous arithmetic data: log,, 1/x, x 2 Raw data Log transform: more normal

NEWX = SQRT(X) NEWX = LOG10(X) with 0: NEWX = LOG10(X+C) Frequency NEWX = 1/X with 0: NEWX = 1/(X+C) NEWX = SQRT(K-X) NEWX = LOG10(K-X) NEWX = 1/(K-X) X values C = constant added to each score so that the smallest score is 1 (for base 10) K = constant from which each score is subtracted so that the smallest score is 1; usually = largest score + 1. Logs: can use any base, but base 10 has bigger effect than natural logs.

Common graph in physiology Better comparison on log-log plot

ii. Proportions are constrained between 0 and 1: transform with: arcsin( x) Not a normal distribution A more normal distribution. Frequency ( x)

NOTE: If you can t get your data to look normal, even with a transform Non-parametric statistics median, mode, estimates of spread tests of hypotheses

A. Research designs B. Cleaning up your data: getting rid of problems C. Basic descriptive statistics: patterns D. What test should you use?

Different project designs different options Type of Data Basic Analyses Relationships 1. One dataset one time and/or place Descriptive stats = Data mining (mean, var) Graphs --- 2. One dataset compare to Ho One sample tests 3. Several datasets compare over time, or place If experiment compare treatments Descriptive stats by treatment, levels, etc. Graphs Compare distributions (mean, var) of diff treatments, variables Paired comparisons Multiple comparisons Compare groups

C. Basic analyses: Describe your data = Descriptive stats Not test an hypothesis - central tendency: mean, median - variation Assume: a normal bell shaped distribution parametric If not normal nonparametric X

Parametric descriptions: Estimate means X = Σx i n X Estimate the error (variation) associated with the mean: S = Σ (X i - X) 2 = Variance = σ 2 n Standard Deviation (sd) = S = σ

A. Research designs B. Cleaning up your data: getting rid of problems C. Basic descriptive statistics D. What test should you use? 1. Hypothesis testing 2. Basic tests 3. Binomial key to some widely used tests

D. Basic concepts of hypothesis testing Steps: 1) Assume the null hypothesis is true if we don t detect a difference, then null H o is true. 2) Test Compare measurements generally test the mean difference between two sample distributions (e.g. the numbers from the experiment or set of observations) or against an expected value ; summarized as a test statistic (t, F,..). 3) Determine the probability that the difference between the sample distributions is due to chance alone, rather than the hypothesized effect (translate test statistic to calculated p-value) 4) Compare calculated p-value with a critical p-value: (now done for you in stats packages) assign significance (i.e., whether accept or reject null hypothesis)

Need: probabilities What is the probability of rejecting/accepting an hypothesis? α = probability of rejecting Ho when it is true. The level of uncertainty that you are willing to accept that you reject Ho when it is true. Type-I error. By convention α = 0.05 (but not always). α = critical p-value

Example H A = More mussels settle inside adult distribution H o = No difference in mussel settlement inside vs outside adult distribution Calculated Critical Decision p-value p-value (α) 0.50 0.05 0.051 0.05 0.050 0.05 Do not reject H o Do not reject H o ** Reject H o, not H A 0.049 0.05 Reject H o, not H A α = probability the 2 samples are the same (i.e., H o is true) when they re not **This is hard to deal with. Can say it is suggestive. Some say.05 is too stringent in some cases.

Goals of testing: 1. Reject Ho when it is false and accept Ho when it is true 2. Avoiding errors: α = probability of rejecting Ho when it is true = Type-I error. ß = probability of accepting Ho when it is false = Type-II error. Decision Truth Accept H O Reject H O H O true no error (1-α) Type I error (α) H O false Type II error ( β ) no error (1- β) precautionary principle Power Power of Test = probability (1-ß) of rejecting Ho when it is false and not committing a Type II error. The more powerful the test, the more likely you are to correctly conclude than an effect exists when it really does.

How to control Type II error (distributions are different when they re not) This will maximize statistical power to detect real impacts Decision Decision Critical p Truth Accept HO 0 Reject HO 0 H O true H O false no error (1-α) Type II error (ß) Type I error (α) no error (1- ß ) X 0 X A Type II error (ß) xc Type I error (α)

Type I and Type II Errors are controlled by: Nature: Intrinsic variation Differences between means Scientist: Inadvertent measurement/sampling errors Vary critical P-values** Know α and ß are inversely related for a given N Problem: how to minimize both α and ß? Increase replication** variation around the mean declines as number of observations increase **Reflect design considerations**

Effect of number of observations on estimate of Mean Frequency distributions of sample means 16 16 0.3 Count 12 8 4 Count 12 8 4 0 0.0 15 20 25 30 35 Estimate of Mean 0.2 0.1 Proportion per Bar 0 15 20 25 30 35 Estimate of Mean Mean based on X observations 5 10 20 50 99 The estimated mean approaches true mean with larger sample size! ( Central Limit Theorem ) Notice how variation around estimated mean increases with lower sample size!

2. Basic Stats Testing: a) Only one sample: Ex 1. Settlement distribution of mussels in the intertidal. Is this significant from?? Frequency # of settlers/area A one-sample test: X sample comparison mean SEM Comparison mean can be any reasonable value. Commonly: a. 0 b. Previous sample mean This formula generates a test statistic : t = Find P (t) = Compare to P (critical)

b) > 1 sample: Associations/Relationships among the variables? i. Correlations between two variables how much association?? Correlation is just a pattern and does not indicate cause and effect If both variables are normally distributed -- standard correlation (Pearson s)

Correlation coefficient = r (what is the range of possible values?) Independent Variable 2 r = r = Independent Variable 1 r =

ii. Regression between two variables: predicting Y from X X = independent variable: not usually normal (often uniform distribution) Y = dependent variable: normal Dependent Variable What statistics? relationship (slope, coefficient) t-statistic (or F-statistic) goodness of fit: r 2 Independent Variable Y= ax +b

t = a r 2 = t = - a r 2 = t = Same as above r 2 = different t = r 2 = same

iii. Some basic tests of differences between categories/treatments Example 2: two samples General/working hypothesis larval settlement determines adult distribution Specific hypothesis more mussel larvae settle in areas inside the adult distribution than in areas outside it Observation 1: Number outside Number inside Observation 2: Number outside Number inside 0 10 3 10 0 15 5 7 0 18 2 9 0 12 8 12 0 13 7 8 Mean 0 13 Mean 5 9.2 What counts as a difference? How different do samples need to be to be considered statistically different? Are in/out for Obs 1 different? For Obs 2?

Statistical tests: Are these different?? We sample mussel settlement and produce two frequency distributions: Frequency of Observations X1 X2 outside inside 1 7 Number of settlers

Comparing two samples: Are they different??? How do you compare distributions? Xoutside Xinside a) Are both distributions normal? Or at least the same distribution? b) Compare means, taking into account the confidence you have in your estimate of the means (variation).

Calculate a standardized difference between the means of the two distributions (again, taking into account their error): X inside X outside 2 s 2 / n = X inside X outside SEM This generates a test statistic (e.g., t, F). Then ask is the value of the statistic due to random chance or to a real difference?? Probability that the estimated difference is not due to random chance 1.Calculate the probably (P) of getting the test value (table or stats package) 2.Compare to critical P-value

Comparing two samples: Are they different??? Outside Inside 3 10 5 7 2 9 8 12 7 8 2-sample t-test X inside X outside SEM Xoutside Means = 5.5 9 Xinside Is this significant? Depends on your specific H A t c One-tail 1.943 H A = sample 1 > sample 2 t-value -2.049 P(t < t c ) One-tail p= 0.043 H A = sample 1 < sample 2 OR P(t < t c ) Two-tail p=0.086 H A = sample 1 is different from sample 2 t c Two-tail 2.447

Frequencies in discrete categories Not all data sets are based on measurements Data may be frequencies in discrete categories of a sample. Example: Eye color in genetic crosses (flies) H o : no difference in frequency among groups H A : significant variation Color Red 30 Brown 50 Yellow 20 Frequency in sample* * Score 300 flies Reject or accept H o? How test?

Color Obs Freq. Obs Numbers Red 30 90 Expected (Ho)?? 100 flies Brown 50 150 Yellow 20 60 = 300 counted

Chi square test Color Obs Freq. Obs Numbers Expected (Ho) O-E (O-E) 2 E Red 30 90 100 10 1 Brown 50 150 100 50 25 Yellow 20 60 100 40 16 χ 2 test: Σ (Observed Expected) 2 Expected χ2 = 42 Compare P test and P critical P test < 0.0001 reject H o

Now it gets a bit more complicated..