Statistical Computing

Slides:



Advertisements
Similar presentations
Chapter 16 Inferential Statistics
Advertisements

Hypothesis testing and confidence intervals by resampling by J. Kárász.
Statistics for Business and Economics
Sampling Distributions (§ )
Today: Quizz 11: review. Last quizz! Wednesday: Guest lecture – Multivariate Analysis Friday: last lecture: review – Bring questions DEC 8 – 9am FINAL.
Biomedical Presentation Name: 牟汝振 Teach Professor: 蔡章仁.
Chapter 10: Hypothesis Testing
Resampling techniques Why resampling? Jacknife Cross-validation Bootstrap Examples of application of bootstrap.
Resampling techniques
Evaluating Hypotheses
2008 Chingchun 1 Bootstrap Chingchun Huang ( 黃敬群 ) Vision Lab, NCTU.
Bootstrapping LING 572 Fei Xia 1/31/06.
Lehrstuhl für Informatik 2 Gabriella Kókai: Maschine Learning 1 Evaluating Hypotheses.
CH7 Distribution Free Inference: Computer-Intensive Techniques 1.Random Sampling 2.Bootstrap sampling 3.Bootstrap Testing.
15-1 Introduction Most of the hypothesis-testing and confidence interval procedures discussed in previous chapters are based on the assumption that.
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 14: Non-parametric tests Marshall University Genomics.
Nonparametric and Resampling Statistics. Wilcoxon Rank-Sum Test To compare two independent samples Null is that the two populations are identical The.
Bootstrapping applied to t-tests
Bootstrap spatobotp ttaoospbr Hesterberger & Moore, chapter 16 1.
Standard Error of the Mean
Dennis Shasha From a book co-written with Manda Wilson
AM Recitation 2/10/11.
Review of Statistical Inference Prepared by Vera Tabakova, East Carolina University ECON 4550 Econometrics Memorial University of Newfoundland.
1 CSI5388 Error Estimation: Re-Sampling Approaches.
Education 793 Class Notes T-tests 29 October 2003.
Empirical Research Methods in Computer Science Lecture 2, Part 1 October 19, 2005 Noah Smith.
F OUNDATIONS OF S TATISTICAL I NFERENCE. D EFINITIONS Statistical inference is the process of reaching conclusions about characteristics of an entire.
1 CSI5388: Functional Elements of Statistics for Machine Learning Part I.
1 Introduction to Estimation Chapter Concepts of Estimation The objective of estimation is to determine the value of a population parameter on the.
Population All members of a set which have a given characteristic. Population Data Data associated with a certain population. Population Parameter A measure.
Bootstrapping (And other statistical trickery). Reminder Of What We Do In Statistics Null Hypothesis Statistical Test Logic – Assume that the “no effect”
PARAMETRIC STATISTICAL INFERENCE
1 Nonparametric Methods III Henry Horng-Shing Lu Institute of Statistics National Chiao Tung University
Comparing two sample means Dr David Field. Comparing two samples Researchers often begin with a hypothesis that two sample means will be different from.
Copyright © Cengage Learning. All rights reserved. 14 Elements of Nonparametric Statistics.
University of Ottawa - Bio 4118 – Applied Biostatistics © Antoine Morin and Scott Findlay 08/10/ :23 PM 1 Some basic statistical concepts, statistics.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Section Inference about Two Means: Independent Samples 11.3.
Nonparametric Tests IPS Chapter 15 © 2009 W.H. Freeman and Company.
Sampling Error.  When we take a sample, our results will not exactly equal the correct results for the whole population. That is, our results will be.
1 Henry Horng-Shing Lu Institute of Statistics National Chiao Tung University Nonparametric.
Resampling techniques
1 Nonparametric Statistical Techniques Chapter 17.
Section 10.1 Confidence Intervals
Confidence Intervals Lecture 3. Confidence Intervals for the Population Mean (or percentage) For studies with large samples, “approximately 95% of the.
BPS - 3rd Ed. Chapter 161 Inference about a Population Mean.
Limits to Statistical Theory Bootstrap analysis ESM April 2006.
Lecture 3: Statistics Review I Date: 9/3/02  Distributions  Likelihood  Hypothesis tests.
Fall 2002Biostat Statistical Inference - Confidence Intervals General (1 -  ) Confidence Intervals: a random interval that will include a fixed.
Lecture PowerPoint Slides Basic Practice of Statistics 7 th Edition.
Bootstrap Event Study Tests Peter Westfall ISQS Dept. Joint work with Scott Hein, Finance.
Comparing Two Means Chapter 9. Experiments Simple experiments – One IV that’s categorical (two levels!) – One DV that’s interval/ratio/continuous – For.
Case Selection and Resampling Lucila Ohno-Machado HST951.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Assumptions 1) Sample is large (n > 30) a) Central limit theorem applies b) Can.
Modern Approaches The Bootstrap with Inferential Example.
BIOL 582 Lecture Set 2 Inferential Statistics, Hypotheses, and Resampling.
The inference and accuracy We learned how to estimate the probability that the percentage of some subjects in the sample would be in a given interval by.
The accuracy of averages We learned how to make inference from the sample to the population: Counting the percentages. Here we begin to learn how to make.
Bootstrapping and Randomization Techniques Q560: Experimental Methods in Cognitive Science Lecture 15.
1 Estimation Chapter Introduction Statistical inference is the process by which we acquire information about populations from samples. There are.
Sampling and Sampling Distributions. Sampling Distribution Basics Sample statistics (the mean and standard deviation are examples) vary from sample to.
STA248 week 121 Bootstrap Test for Pairs of Means of a Non-Normal Population – small samples Suppose X 1, …, X n are iid from some distribution independent.
Estimating standard error using bootstrap
Bootstrap - Example Suppose we have an estimator of a parameter and we want to express its accuracy by its standard error but its sampling distribution.
BOOTSTRAPPING: LEARNING FROM THE SAMPLE
Ch13 Empirical Methods.
Sampling Distributions (§ )
Simulation Berlin Chen
Bootstrapping and Bootstrapping Regression Models
STATISTICS INFORMED DECISIONS USING DATA
Presentation transcript:

Statistical Computing Resampling methods Lecture 2: BioInfo course

What is resampling Permutation Bootstrap Jackknife Cross validation

Resampling Procedures Resampling procedures date back to 1930s, when permutation tests were introduced by R.A. Fisher and E.J.G. Pitman. They were not feasible until the computer era.

Fisher’s Tea Taster 8 cups of tea are prepared four with tea poured first four with milk poured first The cups are presented to her in random order.

Permutation solution Mark a strip of paper with eight guesses about the order of the "tea-first" and "milk-first" cups -- let's say T T T T M M M M. Make a deck of eight cards, four marked "T" and four marked "M.“ Deal out these eight cards successively in all possible orderings (permutations) Record how many of those permutations show >= 6 matches.  

Approximate Permutation Shuffle the deck and deal it out along the strip of paper with the marked guesses, record the number of matches. Repeat many times.

Extension to multiple samples Fisher went on to apply the same idea to agricultural experiments involving two or more samples. The question became: "How likely is it that random arrangements of the observed data would produce samples differing as much as the observed samples differ?"

Extension to samples from populations In the 1930's, Fisher and Pitman showed that the inference for a permutation test extended to cover not just random re-arrangements of a fixed set of finite elements, but also samples from larger populations.  

Formula-based analogs Fisher and Pitman showed that the t-distribution and chi-squared distribution are good approximations for sufficiently large and/or normally-distributed samples. However, when data is of un-known distribution or sample size is small, re-sampling tests are recommended.

Resampling Procedures The resampling method frees researchers from two limitations of conventional statistics: “the assumption that the data conform to a bell-shaped curve and the need to focus on statistical measures whose theoretical properties can be analyzed mathematically.” Diaconis, P., and B. Efron. (1983). Computer-intensive methods in statistics. Scientific American, May, 116-130.

Resampling Procedures The resampling method "addresses a key problem in statistics: how to infer the 'truth' from a sample of data that may be incomplete or drawn from an ill-defined population." Peterson, I. (July 27, 1991). Pick a sample. Science News, 140, 56-58.

Resampling Procedures Using resampling methods, “you're trying to get something for nothing. You use the same numbers over and over again until you get an answer that you can't get any other way. In order to do that, you have to assume something, and you may live to regret that hidden assumption later on” Statement by Stephen Feinberg, cited in: Peterson, I. (July 27, 1991). Pick a sample. Science News, 140, 56-58.

Sampling procedure used Resampling Method Application Sampling procedure used Bootstrap Standard deviation, confidence interval, hypothesis testing, bias Samples drawn at random, with replacement Jackknife Standard deviation, confidence interval, bias Samples consist of full data set with one observation left out Permutation Hypothesis testing Samples drawn at random, without replacement. Cross-validation Model validation Data is randomly divided into two or more subsets, with results validated across sub-samples.

Permutation Tests In classical hypothesis testing, we start with assumptions about the underlying distribution and then derive the sampling distribution of the test statistic under H0. In Permutation testing, the initial assumptions are not needed (except exchangeability), and the sampling distribution of the test statistic under H0 is computed by using permutations of the data.

Permutation Tests (example) The Permutation test is a technique that bases inference on “experiments” within the observed dataset. Consider the following example: In a medical experiment, rats are randomly assigned to a treatment (Tx) or control (C) group. The outcome Xi is measured in the ith rat.

Permutation Tests (example) Under H0, the outcome does not depend on whether a rat carries the label Tx or C. Under H1, the outcome tends to different, say larger for rats labeled Tx. A test statistic T measures the difference in observed outcomes for the two groups. T may be the difference in the two group means (or medians), denoted as t for the observed data.

Permutation Tests (example) Under H0, the individual labels of Tx and C are unimportant, since they have no impact on the outcome. Since they are unimportant, the label can be randomly shuffled among the rats without changing the joint null distribution of the data. Shuffling the data creates a “new” dataset. It has the same rats, but with the group labels changed so as to appear as there were different group assignments.

Permutation Tests (example) Let t be the value of the test statistic from the original dataset. Let t1 be the value of the test statistic computed from a one dataset with permuted labels. Consider all M possible permutations of the labels, obtaining the test statistics, t1, …, tM. Under H0, t1, …, tM are all generated from the same underlying distribution that generated t.

Permutation Tests (example) Thus, t can be compared to the permuted data test statistics, t1, …, tM , to test the hypothesis and obtain a p-value or to construct confidence limits for the statistic.

Permutation Tests (example) Survival times   Treated mice 94, 38, 23, 197, 99, 16, 141 Mean: 86.8 Untreated mice 52, 10, 40, 104, 51, 27, 146, 30, 46 Mean: 56.2 (Efron & Tibshirani)

Permutation Tests (example) Calculate the difference between the means of the two observed samples – it’s 30.6 days in favor of the treated mice. Consider the two samples combined (16 observations) as the relevant universe to resample from.

Permutation Tests (example) Draw 7 hypothetical observations and designate them "Treatment"; draw 9 hypothetical observations and designate them "Control". Compute and record the difference between the means of the two samples.

Permutation Tests (example) Repeat steps 3 and 4 perhaps 1000 times. Determine how often the resampled difference exceeds the observed difference of 30.6

Histogram of permuted differences

Permutation Tests (example) If the group means are truly equal, then shifting the group labels will not have a big impact the sum of the two groups (or mean with equal sample sizes). Some group sums will be larger than in the original data set and some will be smaller.

Permutation Test Example 1 16!/(16-7)!= 57657600 Dataset is too large to enumerate all permutations, a large number of random permutations are selected. When permutations are enumerated, this is an exact permutation test.

The bootstrap 1969 Simon publishes the bootstrap as an example in Basic Research Methods in Social Science (the earlier pigfood example) 1979 Efron names and publishes first paper on the bootstrap Coincides with advent of personal computer

Bootstrap (Nonparametric) Have a random sample from an unknown PDF, F. Want to estimate based on . We calculate the estimate based on . Want to know how accurate is .

Bootstrap (Nonparametric) Notation: Random sample: Empirical distribution , places mass of 1/n at each observed data value. Bootstrap sample: Random sample of size n, drawn from , denoted as Bootstrap replicate of :

Bootstrap (Nonparametric) Bootstrap steps: Select bootstrap sample consisting of n data values drawn with replacement from the original data set. Evaluate for the bootstrap sample Repeat steps 2 and 3 B times each. Estimate the standard error by the sample standard deviation of the B replications:

The Bootstrap A new pigfood ration is tested on twelve pigs, with six-week weight gains as follows:   496 544 464 416 512 560 608 544 480 466 512 496 Mean: 508 ounces (establish a confidence interval)

The Classic Bootstrap Draw simulated samples from a hypothetical universe that embodies all we know about the universe that this sample came from – our sample, replicated an infinite number of times

1. Put the observed weight gains in a hat 2. Sample 12 with replacement 3. Record the mean 4. Repeat steps 2-3, say, 1000 times 5. Record the 5th and 95th percentiles (for a 90% confidence interval)

Bootstrapped sample means

Parametric Bootstrap Resampling makes no assumptions about the population distribution. The bootstrap covered thus far is a nonparametric bootstrap. If we have information about the population distr., this can be used in resampling. In this case, when we draw randomly from the sample we can use population distr. For example, if we know that the population distr. is normal then estimate its parameters using the sample mean and variance. Then approximate the population distr. with the sample distr. and use it to draw new samples.

Parametric Bootstrap As expected, if the assumption about population distribution is correct then the parametric bootstrap will perform better than the nonparametric bootstrap. If not correct, then the nonparametric bootstrap will perform better.

Example of Bootstrap (Nonparametric) Have test scores (out of 100) for two consecutive years for each of 60 subjects. Want to obtain the correlation between the test scores and the variance of the correlation estimate. Can use bootstrap to obtain the variance estimate.

How many Bootstrap Replications, B? A fairly small number, B=25, is sufficient to be “informative” (Efron) B=50 is typically sufficient to provide a crude estimate of the SE, but B>200 is generally used. CIs require larger values of B, B no less than 500, with B=1000 recommended.