Canadian Bioinformatics Workshops www.bioinformatics.ca.

Slides:



Advertisements
Similar presentations
Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
Advertisements

Hypothesis Testing Steps in Hypothesis Testing:
PTP 560 Research Methods Week 9 Thomas Ruediger, PT.
Inferential Statistics
Is it statistically significant?
From the homework: Distribution of DNA fragments generated by Micrococcal nuclease digestion mean(nucs) = bp median(nucs) = 110 bp sd(nucs+ = 17.3.
PSY 307 – Statistics for the Behavioral Sciences Chapter 20 – Tests for Ranked Data, Choosing Statistical Tests.
AP Statistics – Chapter 9 Test Review
Significance Testing Chapter 13 Victor Katch Kinesiology.
Detecting Differentially Expressed Genes Pengyu Hong 09/13/2005.
MARE 250 Dr. Jason Turner Hypothesis Testing II To ASSUME is to make an… Four assumptions for t-test hypothesis testing: 1. Random Samples 2. Independent.
MARE 250 Dr. Jason Turner Hypothesis Testing II. To ASSUME is to make an… Four assumptions for t-test hypothesis testing:
10 Hypothesis Testing. 10 Hypothesis Testing Statistical hypothesis testing The expression level of a gene in a given condition is measured several.
Differentially expressed genes
Final Review Session.
Analysis of Differential Expression T-test ANOVA Non-parametric methods Correlation Regression.
Chapter 9 Hypothesis Testing.
PSY 307 – Statistics for the Behavioral Sciences Chapter 19 – Chi-Square Test for Qualitative Data Chapter 21 – Deciding Which Test to Use.
Today Concepts underlying inferential statistics
5-3 Inference on the Means of Two Populations, Variances Unknown
Copyright © 2005 Brooks/Cole, a division of Thomson Learning, Inc Chapter 11 Introduction to Hypothesis Testing.
Different Expression Multiple Hypothesis Testing STAT115 Spring 2012.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 8 Tests of Hypotheses Based on a Single Sample.
Chapter 12 Inferential Statistics Gay, Mills, and Airasian
Hypothesis Testing:.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Probability Distributions and Test of Hypothesis Ka-Lok Ng Dept. of Bioinformatics Asia University.
Overview of Statistical Hypothesis Testing: The z-Test
Multiple testing in high- throughput biology Petter Mostad.
1 STATISTICAL HYPOTHESES AND THEIR VERIFICATION Kazimieras Pukėnas.
Hypothesis testing – mean differences between populations
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
More About Significance Tests
NONPARAMETRIC STATISTICS
+ Chapter 9 Summary. + Section 9.1 Significance Tests: The Basics After this section, you should be able to… STATE correct hypotheses for a significance.
Essential Statistics in Biology: Getting the Numbers Right
1 CSI5388: Functional Elements of Statistics for Machine Learning Part I.
Non-parametric Tests. With histograms like these, there really isn’t a need to perform the Shapiro-Wilk tests!
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Biostat 200 Lecture 7 1. Hypothesis tests so far T-test of one mean: Null hypothesis µ=µ 0 Test of one proportion: Null hypothesis p=p 0 Paired t-test:
9 Mar 2007 EMBnet Course – Introduction to Statistics for Biologists Nonparametric tests, Bootstrapping
Educational Research: Competencies for Analysis and Application, 9 th edition. Gay, Mills, & Airasian © 2009 Pearson Education, Inc. All rights reserved.
10.2 Tests of Significance Use confidence intervals when the goal is to estimate the population parameter If the goal is to.
Biostatistics Class 6 Hypothesis Testing: One-Sample Inference 2/29/2000.
Bioinformatics Expression profiling and functional genomics Part II: Differential expression Ad 27/11/2006.
A A R H U S U N I V E R S I T E T Faculty of Agricultural Sciences Introduction to analysis of microarray data David Edwards.
Confidence intervals and hypothesis testing Petter Mostad
Back to basics – Probability, Conditional Probability and Independence Probability of an outcome in an experiment is the proportion of times that.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
Economics 173 Business Statistics Lecture 4 Fall, 2001 Professor J. Petry
Statistical Inference for the Mean Objectives: (Chapter 9, DeCoursey) -To understand the terms: Null Hypothesis, Rejection Region, and Type I and II errors.
Ch11: Comparing 2 Samples 11.1: INTRO: This chapter deals with analyzing continuous measurements. Later, some experimental design ideas will be introduced.
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Suppose we have T genes which we measured under two experimental conditions (Ctl and Nic) in n replicated experiments t i * and p i are the t-statistic.
Comp. Genomics Recitation 10 4/7/09 Differential expression detection.
DTC Quantitative Methods Bivariate Analysis: t-tests and Analysis of Variance (ANOVA) Thursday 14 th February 2013.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 6 –Multiple hypothesis testing Marshall University Genomics.
A Quantitative Overview to Gene Expression Profiling in Animal Genetics Armidale Animal Breeding Summer Course, UNE, Feb Analysis of (cDNA) Microarray.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
Hypothesis Tests u Structure of hypothesis tests 1. choose the appropriate test »based on: data characteristics, study objectives »parametric or nonparametric.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
Review Statistical inference and test of significance.
Statistical Decision Making. Almost all problems in statistics can be formulated as a problem of making a decision. That is given some data observed from.
Estimating the False Discovery Rate in Genome-wide Studies BMI/CS 576 Colin Dewey Fall 2008.
Differential Gene Expression
Hypothesis Testing and Confidence Intervals (Part 1): Using the Standard Normal Lecture 8 Justin Kern October 10 and 12, 2017.
Hypothesis Testing: Hypotheses
Chapter 9 Hypothesis Testing.
Presentation transcript:

Canadian Bioinformatics Workshops

2Module #: Title of Module

Module 5 Hypothesis testing D EPARTMENT OF B IOCHEMISTRY D EPARTMENT OF M OLECULAR G ENETICS Oedipus ponders the riddle of the Sphinx. Classical (~400 BCE) † † This workshop includes bits of material originally developed by Raphael Gottardo, FHCRC and by Sohrab Shah, UBC Boris Steipe Exploratory Data Analysis of Biological Data using R Toronto, May 21. and

Module 5: Hypothesis testing bioinformatics.ca Learning Objectives Understand the principal idea behind a statistical test; Know about the concepts true/false– positives/nergatives, p-value, and significance; Be able to apply simple parametric and non- parametric test to your data; Know how to interpret the results; Understand the problem behind multiple testing; Know what to do about it in the context of expression data analysis.

Module 5: Hypothesis testing bioinformatics.ca Hypothesis testing Once we have a statistical model that describes the distribution of our data, we can explore data points with reference to our model. In hypothesis testing we typically ask questions such as: Is a particular sample a part of the distribution, or is it an outlier? Can two sets of samples have been drawn from the same distribution, or did they come from different distributions?

Module 5: Hypothesis testing bioinformatics.ca Hypothesis testing Hypothesis testing is confirmatory data analysis, in contrast to exploratory data analysis. Null – and Alternative Hypothesis Region of acceptance / rejection and critical value Error types p - value Significance level Power of a test (1 - false negative) Concepts:

Module 5: Hypothesis testing bioinformatics.ca Null hypothesis / Alternative hypothesis The null hypothesis H 0 states that nothing of consequence is apparent in the data distribution. The data corresponds to our expectation. We learn nothing new. The alternative hypothesis H 1 states that some effect is apparent in the data distribution. The data is different from our expectation. We need to account for something new. Not in all cases will this result in a new model, but a new model always begins with the observation that the old model is inadequate.

Module 5: Hypothesis testing bioinformatics.ca Test types Just like the large variety of types of hypotheses, the number of test is large. The proper application of tests can be confusing and it is easy to make mistakes. A one-sample test compares a sample with a population. Common types of tests A two-sample test compares samples with each other. Paired sample tests compare matched pairs of observations with each other. Typically we ask whether their difference is significant....

Module 5: Hypothesis testing bioinformatics.ca Test types A Z–test compares a sample mean with a normal distribution.... common types of tests (as you would find them in a statistics textbook...) A t–test compares a sample mean with a t-distribution and thus relaxes the requirements on normality for the sample. Chi–squared tests analyze whether samples are drawn from the same distribution. F-tests analyze the variance of populations (ANOVA). Nonparametric tests can be applied if we have no reasonable model from which to derive a distribution for the null hypothesis....

Module 5: Hypothesis testing bioinformatics.ca The Hypothesis Test principle Think about what hypothesis testing really means. You have some observation; You have a model of the data; You ask about the probability that the model of your data would contain your observation....

Module 5: Hypothesis testing bioinformatics.ca Error types Decision Truth H0H0 H1H1 Accept H 0 Reject H 0   1 -  1 -  "False positive" "False negative" "Type I error" "Type II error"

Module 5: Hypothesis testing bioinformatics.ca Introduction One sample and two sample t-tests are used to test a hypothesis about the mean(s) of a distribution. Gene expression: Is the mean expression level under condition 1 different from the mean expression level under condition 2? Assume that the data are from a normal distribution.

Module 5: Hypothesis testing bioinformatics.ca one sample t-test t-tests apply to n observations that are independent and normally distributed with equal variance about a mean . The 1-sample t-statistic is defined as: i.e. t is the difference in sample mean and  0, divided by the Standard Error of the Mean, to penalize noisy samples. If the sample mean is indeed  0, t follows a t-distribution with n-1 degrees of freedom.

Module 5: Hypothesis testing bioinformatics.ca what is a p–value? a)A measure of how much evidence we have against the alternative hypothesis. b)The probability of making an error. c)Something that biologists want to be below d)The probability of observing a value as extreme or more extreme by chance alone. e) All of the above.

Module 5: Hypothesis testing bioinformatics.ca two–sample t–test Test if the means of two distributions are the same. The datasets y i 1,..., y i n are independent and normally distributed with mean μ i and variance σ 2, N (μ i,σ 2 ), where i=1,2. In addition, we assume that the data in the two groups are independent and that the variance is the same.

Module 5: Hypothesis testing bioinformatics.ca two–sample t–test

Module 5: Hypothesis testing bioinformatics.ca t–test assumptions Normality: The data need to be Normal. If not, one can use a transformation or a non-parametric test. If the sample size is large enough (n>30), the t-test will work just fine (CLT). Independence: Usually satisfied. If not independent, more complex modeling is required. Independence between groups: In the two sample t- test, the groups need to be independent. If not, one can use a paired t- test. Equal variances: If the variances are not equal in the two groups, use Welch's t-test (default in R).

Module 5: Hypothesis testing bioinformatics.ca non–parametric tests Non-parametric tests constitute a flexible alternative to t-tests if you don't have a model of the distribution. In cases where a parametric test would be appropriate, non-parametric tests have less power. Several non parametric alternatives exist e.g. the Wilcoxon and Mann-Whitney tests.

Module 5: Hypothesis testing bioinformatics.ca Wilcoxon test principle o <- order(M[,1]) plot(M[o,1], col=M[o,2]) For each observation in a, count the number of observations in b that have a smaller rank. The sum of these counts is the test statistic. wilcox.test(M[1:n,1], M[(1:n)+n,1])

Module 5: Hypothesis testing bioinformatics.ca permutation test A p-value characterizes where an observation lies with reference to the distribution of our statistics under the null hypothesis. How can we estimate the null distribution? In the two sample case, to simulate the null distribution, one could simply randomly permute the group labels and recompute the statistics. Repeat this for a (sufficienty large) number of permutations and compute the number of times you randomly observed a value as extreme or more extreme than the observation of interest.

Module 5: Hypothesis testing bioinformatics.ca permutation test Select a statistic (e.g. mean difference, t statistic) Compute the statistic for the observation of interest t. For a number of permutations Randomly permute the labels and compute the associated statistic Count how often the statistic exceeds the observation For data that has multiple "categories" associated with each observation:

Module 5: Hypothesis testing bioinformatics.ca the Bootstrap The basic idea is to resample the data we have observed and compute a new value of the statistic/estimator for each resampled data set. Then one can assess the estimator by looking at the empirical distribution across the resampled data sets. set.seed(100) x <- rnorm(15) muHat <- mean(x) sigmaHat <- sd(x) Nrep <- 100 muHatNew <- rep(0, Nrep) for(i in 1:Nrep) { xNew <- sample(x, replace=TRUE) muHatNew[i] <- median(xNew) } se <- sd(muHatNew) muHat se

Module 5: Hypothesis testing bioinformatics.ca statistical "power" The power of a statistical test is the probability that the test will reject the null hypothesis when the null hypothesis is false (i.e. that it will not make a Type II error, or a false negative decision). As the power increases, the chances of a Type II error occurring decrease. The probability of a Type II error occurring is referred to as the false negative rate (β). Therefore power is equal to 1 − β, which is also known as the sensitivity. Power analysis can be used to calculate the minimum sample size required so that one can be reasonably likely to detect an effect of a given size. Power analysis can also be used to calculate the minimum effect size that is likely to be detected in a study using a given sample size. In addition, the concept of power is used to make comparisons between different statistical testing procedures: for example, between a parametric and a nonparametric test of the same hypothesis. From Wikipedia – Statistical_Power

Module 5: Hypothesis testing bioinformatics.ca One sample t-test – power calculation 1 sample t-test: If the mean is μ 0, t follows a t-distribution with n-1 degrees of freedom. If the mean is not μ 0, t follows a non central t-distribution with n-1 degrees of freedom and noncentrality parameter (μ 1 -μ 0 ) x (s/√n).

Module 5: Hypothesis testing bioinformatics.ca Power, error rates and decision > power.t.test(n = 5, delta = 1, sd=2, alternative="two.sided", type="one.sample") One-sample t test power calculation n = 5 delta = 1 sd = 2 sig.level = 0.05 power = alternative = two.sided Power calculation in R: Other tests are available – see ??power.

Module 5: Hypothesis testing bioinformatics.ca Power, error rates and decision PR(False Positive) PR(Type I error) μ0μ0 μ1μ1 PR(False Negative) PR(Type II error)

Module 5: Hypothesis testing bioinformatics.ca Power, error rates and decision

Module 5: Hypothesis testing bioinformatics.ca multiple testing Fix the False Positive error rate (eg. α = 0.05). Minimize the False Negative (maximize sensitivity) Single hypothesis testing This is what traditional testing does. What if we perform many tests at once? Does this affect our False Positive rate?

Module 5: Hypothesis testing bioinformatics.ca multiple testing With high-throughput methods, we usually look at a very large number of decisions for each experiment. For example, we ask for every gene on an array whether it is significantly up- or downregulated. This creates a multiple testing paradox. The more data we collect, the harder it is for every observation to appear significant. Therefore: We need ways to assess error probability in multiple testing situations correctly; We need approaches that address the paradox.

Module 5: Hypothesis testing bioinformatics.ca FWER Example: Bonferroni multiple adjustment. The FamilyWise Error Rate is the probability of having at least one False Positive (making at least one type I error) in a "family" of observations. This is simple and conservative, but there are many other (more powerful) FWER procedures. p̃ g = N x p g If p̃ g ≤ α then FWER ≤ α

Module 5: Hypothesis testing bioinformatics.ca False Discovery Rate (FDR) The FDR is the proportion of False Positives among the genes called differentially expressed (DE). FDR: Benjamini and Hochberg (1995) p (i ) ≤ i / N x α p (1) ≤... ≤ p (i ) ≤... ≤ p (N) Let k be the largest i such that... then the FDR for genes 1... k is controlled at α. Hypotheses need to be independent! Order the p-values for each of N observations:

Module 5: Hypothesis testing bioinformatics.ca SAM SAM (Significance Analysis of Microarrays) is a statistical technique to find significant expression changes of genes in microaray experiments. The input is an expression profile. SAM measures the strength of the association of the expression value and the conditions of the expression profile. SAM employs a modified t-statistic that is more stable if the number of conditions is small. False Discovery Rates are estimated through permutations. library(samr) ?samr ?SAM

Module 5: Hypothesis testing bioinformatics.ca summary Multiple testing: If hypotheses are independent or weakly dependent use an FDR correction, otherwise use Bonferroni's FWER. For more complex hypotheses, try an ANOVA (p=1) or limma (p>1). Number of tests Sample size n < 30 p = 1 p > 1 n ≥ 30 non-parametric t-test/F- test t-test, F- test regularized t-test/F-test ( e.g. SAM, limma) + multiple testing t-test, F- test + multiple testing

Module 5: Hypothesis testing bioinformatics.ca Get a book. (e.g. Peter Dalgaard, Introductory Statistics with R is available online through UofT library) Simulate your data. (Don't just use the packaged functions.) Have fun. From here...

Module 5: Hypothesis testing bioinformatics.ca