DS 100: Principles and Techniques of Data Science Date: April 13, Discussion #10

Similar documents
Resampling Methods. X (1/2), i.e., Pr (X i m) = 1/2. We order the data: X (1) X (2) X (n). Define the sample median: ( n.

Estimation for Complete Data

MOST PEOPLE WOULD RATHER LIVE WITH A PROBLEM THEY CAN'T SOLVE, THAN ACCEPT A SOLUTION THEY CAN'T UNDERSTAND.

A quick activity - Central Limit Theorem and Proportions. Lecture 21: Testing Proportions. Results from the GSS. Statistics and the General Population

Recall the study where we estimated the difference between mean systolic blood pressure levels of users of oral contraceptives and non-users, x - y.

Simulation. Two Rule For Inverting A Distribution Function

Infinite Sequences and Series

Properties and Hypothesis Testing

Understanding Samples

MA238 Assignment 4 Solutions (part a)

Statistics 511 Additional Materials

Chapter 22. Comparing Two Proportions. Copyright 2010, 2007, 2004 Pearson Education, Inc.

Lecture 2: Monte Carlo Simulation

STA Learning Objectives. Population Proportions. Module 10 Comparing Two Proportions. Upon completing this module, you should be able to:

Topic 9: Sampling Distributions of Estimators

HYPOTHESIS TESTS FOR ONE POPULATION MEAN WORKSHEET MTH 1210, FALL 2018

Frequentist Inference

Because it tests for differences between multiple pairs of means in one test, it is called an omnibus test.

Stat 421-SP2012 Interval Estimation Section

Discrete Mathematics for CS Spring 2008 David Wagner Note 22

Statistical Inference (Chapter 10) Statistical inference = learn about a population based on the information provided by a sample.

Agreement of CI and HT. Lecture 13 - Tests of Proportions. Example - Waiting Times

Output Analysis and Run-Length Control

A statistical method to determine sample size to estimate characteristic value of soil parameters

Chapter 6 Sampling Distributions

Topic 9: Sampling Distributions of Estimators

FACULTY OF MATHEMATICAL STUDIES MATHEMATICS FOR PART I ENGINEERING. Lectures

Overview. p 2. Chapter 9. Pooled Estimate of. q = 1 p. Notation for Two Proportions. Inferences about Two Proportions. Assumptions

Topic 9: Sampling Distributions of Estimators

Statisticians use the word population to refer the total number of (potential) observations under consideration

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY

Parameter, Statistic and Random Samples

Simple Random Sampling!

Chapter 22. Comparing Two Proportions. Copyright 2010 Pearson Education, Inc.

Sample Size Determination (Two or More Samples)

Problem Set 4 Due Oct, 12

Final Examination Solutions 17/6/2010

Math 140 Introductory Statistics

KLMED8004 Medical statistics. Part I, autumn Estimation. We have previously learned: Population and sample. New questions

Parameter, Statistic and Random Samples

MATH 320: Probability and Statistics 9. Estimation and Testing of Parameters. Readings: Pruim, Chapter 4

Lecture 33: Bootstrap

Chapter 23: Inferences About Means

Section 9.2. Tests About a Population Proportion 12/17/2014. Carrying Out a Significance Test H A N T. Parameters & Hypothesis

A Confidence Interval for μ

It should be unbiased, or approximately unbiased. Variance of the variance estimator should be small. That is, the variance estimator is stable.

Random Variables, Sampling and Estimation

t distribution [34] : used to test a mean against an hypothesized value (H 0 : µ = µ 0 ) or the difference

Data Analysis and Statistical Methods Statistics 651

Lecture 5: Parametric Hypothesis Testing: Comparing Means. GENOME 560, Spring 2016 Doug Fowler, GS

Announcements. Unit 5: Inference for Categorical Data Lecture 1: Inference for a single proportion

BIOSTATISTICS. Lecture 5 Interval Estimations for Mean and Proportion. dr. Petr Nazarov

Last Lecture. Wald Test

Introductory statistics

Class 23. Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science. Marquette University MATH 1700

Topic 10: Introduction to Estimation

Chapter 3. Strong convergence. 3.1 Definition of almost sure convergence

Expectation and Variance of a random variable

Statistical inference: example 1. Inferential Statistics

TMA4245 Statistics. Corrected 30 May and 4 June Norwegian University of Science and Technology Department of Mathematical Sciences.

STAT 350 Handout 19 Sampling Distribution, Central Limit Theorem (6.6)

AMS570 Lecture Notes #2

MA131 - Analysis 1. Workbook 2 Sequences I


Big Picture. 5. Data, Estimates, and Models: quantifying the accuracy of estimates.

The standard deviation of the mean

Tests of Hypotheses Based on a Single Sample (Devore Chapter Eight)

MBACATÓLICA. Quantitative Methods. Faculdade de Ciências Económicas e Empresariais UNIVERSIDADE CATÓLICA PORTUGUESA 9. SAMPLING DISTRIBUTIONS

Goodness-of-Fit Tests and Categorical Data Analysis (Devore Chapter Fourteen)

Hypothesis Testing. Evaluation of Performance of Learned h. Issues. Trade-off Between Bias and Variance

Lecture Notes 15 Hypothesis Testing (Chapter 10)

This is an introductory course in Analysis of Variance and Design of Experiments.

1 Introduction to reducing variance in Monte Carlo simulations

2 1. The r.s., of size n2, from population 2 will be. 2 and 2. 2) The two populations are independent. This implies that all of the n1 n2

April 18, 2017 CONFIDENCE INTERVALS AND HYPOTHESIS TESTING, UNDERGRADUATE MATH 526 STYLE

STAT Homework 1 - Solutions

Homework 5 Solutions

Lecture 6 Simple alternatives and the Neyman-Pearson lemma

UNIT 2 DIFFERENT APPROACHES TO PROBABILITY THEORY

Computing Confidence Intervals for Sample Data

Binomial Distribution

6.3 Testing Series With Positive Terms

GG313 GEOLOGICAL DATA ANALYSIS

MidtermII Review. Sta Fall Office Hours Wednesday 12:30-2:30pm Watch linear regression videos before lab on Thursday

If, for instance, we were required to test whether the population mean μ could be equal to a certain value μ

Sequences I. Chapter Introduction

The picture in figure 1.1 helps us to see that the area represents the distance traveled. Figure 1: Area represents distance travelled

Comparing your lab results with the others by one-way ANOVA

PSYCHOLOGICAL RESEARCH (PYC 304-C) Lecture 9

Direction: This test is worth 150 points. You are required to complete this test within 55 minutes.

Chapter 8: Estimating with Confidence

Part I: Covers Sequence through Series Comparison Tests

This exam contains 19 pages (including this cover page) and 10 questions. A Formulae sheet is provided with the exam.

There is no straightforward approach for choosing the warmup period l.

Lecture 1 Probability and Statistics

Topic 18: Composite Hypotheses

Chapter 11: Asking and Answering Questions About the Difference of Two Proportions

Confidence intervals summary Conservative and approximate confidence intervals for a binomial p Examples. MATH1005 Statistics. Lecture 24. M.

Math 113 Exam 3 Practice

Stat 139 Homework 7 Solutions, Fall 2015

Transcription:

DS 00: Priciples ad Techiques of Data Sciece Date: April 3, 208 Name: Hypothesis Testig Discussio #0. Defie these terms below as they relate to hypothesis testig. a) Data Geeratio Model: Solutio: A set of assumptios about the process that geerated data. Some examples of assumptios iclude The data are draw idepedetly. The data are uiformly distributed There are two populatios preset i the data b) Null Hypothesis: Solutio: The ull hypothesis is a statemet about the model that correspods to the idea that ay observed differece is due to samplig or experimetal error. We are ofte tryig to disprove this. c) Test Statistic: Solutio: A statistic a fuctio of the data) that ca be used to help reject or fail to reject the ull hypothesis. d) Samplig distributio Solutio: The distributio of all the possible values of a statistic with a fixed sample size. The assumptios of the ull model should specify a samplig distributio. e) p-value: Solutio: The chace, uder the ull hypothesis, of gettig a test statistic equal to or more extreme tha the observed test statistic.

Discussio #0 2 2. State whether each statemet below is True or False. Provide a explaatio. a) p-values ca idicate how icompatible the data are with a specified statistical model. Solutio: True, the p-value is i the cotext of the ull model ie. it is the probability of extreme data uder the ull model) b) p-values measure the probability that the ull hypothesis is true. Solutio: False, the p-value is the probability of extreme data give the ull hypothesis. c) If our p-value is small, we have prove that the ull model is false. Solutio: False. If we get a small p-value, we thik that the evidece is strog eough to reject the ull hypothesis, i.e. we o loger thik radom chace i a ull model is a adequate explaatio for the variability. d) The p-value is the probability of the ull hypothesis give the data. Solutio: False, the p-value is the probability of observig the data uder all the assumptios of the ull hypothesis. e) By itself, a p-value does ot provide a good measure of evidece regardig a model or hypothesis. Solutio: True; p-values are ofte misused/misrepreseted through p-hackig ad multiple testig without appropriate correctio. Therefore, more iformatio about the hypothesis testig procedure is eed to uderstad the evidece regardig a model.

Discussio #0 3 Bootstrap We take a i.i.d. radom sample of size 9 from a populatio. We write all the values o pieces of paper ad stick them i a box: 2 2 3 3 3 4 4 5 The umbers i the box have the followig summary statistics: Statistic Sum Sum of Squares Mea Media Value 27 93 3 3 3. For each of the followig, aswer the followig questios: Is this value calculable from the iformatio give? If so, either calculate it by had or describe how you would calculate this value. If ot, the suggest a estimate for the quatity. All draws are with replacemet. a) The expected value of a sigle draw from the box. Solutio: E Sigle draw = Average of the Box = b) The expected value of the average of ie draws from this box Solutio: E Average of ie draws }{{} Estimator c) The exact variace of the tickets i the box Sum of the tickets Number of Tickets = 27 9 = 3 = Average of the Box = 3 }{{} Bootstrap populatio Parameter Solutio: 93 9 32 = 4 3 d) The exact variace of a sigle draw from the box Solutio: 4 3 e) The exact variace of the average of ie draws from the box Solutio: 4 3 9 = 4 27

Discussio #0 4 f) The exact variace of the average of ie draws from the populatio Solutio: We caot calculate this from the sample. It ca be estimated by the umber i part e. 4. Let s say we forgot the aalytic solutio for fidig the variace of the average of ie draws with replacemet from the populatio. Describe a bootstrap procedure to estimate the variace. Solutio:. Draw a bootstrap sample of size 9 from the box bootstrap populatio) 2. Calculate the mea of the bootstrap sample. 3. Steps ad 2 costitute a sigle bootstrap replicate. Repeat them a large umber of times0000 is usually suggested). 4. Calculate the variace of the meas from step 2. This is the bootstrap estimate of the populatio mea. 5. What are the sources of error i the bootstrap procedure? Solutio: Estimatio error - from estimatig usig a sample rather tha direct calculatio usig the populatio distributio fuctio we do t have this!) Simulatio error - from simulatig the bootstrap samplig distributio. We ca reduce this by icreasig the umber of bootstrap replicatios we do or by eumeratig all possible bootstrap resamples.

Discussio #0 5 6. Which of the followig could be valid bootstrap resamples? Provide reasos for the oes that are ot. a), 2, 2, 3, 3, 4, 4, 5, 6 Solutio: No, 6 is ot part of the origial sample b), 2, 2, 2, 3, 3, 3, 4, 4, 5 Solutio: No, this resample size 0) is too big c),,,,,,,, Solutio: Yes, this could be a resample d) 2, 2, 3, 3, 3, 4, 4, 4 Solutio: No, this resample size 8) is too small e), 2, 3, 3, 3, 4, 4, 5, 5 Solutio: Yes, this could be a resample 7. What are some assumptios we are makig whe performig the bootstrap? Solutio: The sample is represetative of the populatio draw from the same distributio ad is big eough ) The sample was draw i.i.d.

Discussio #0 6 8. You geerate 0 bootstrap resamples you would ormally take may more). They are sorted ad prited below: [, 2, 2, 2, 4, 4, 4, 4, 5] [, 2, 3, 3, 3, 3, 3, 4, 4] [, 2, 2, 3, 3, 3, 4, 4, 5] [,, 2, 3, 4, 4, 4, 5, 5] [2, 3, 3, 3, 4, 4, 4, 5, 5] [2, 3, 3, 3, 3, 3, 3, 4, 4] [,,,, 2, 2, 3, 4, 5] [2, 2, 3, 4, 4, 4, 4, 4, 5] [, 2, 2, 3, 3, 3, 4, 4, 4] [, 2, 2, 2, 3, 3, 3, 4, 5] Costruct a 60% cofidece iterval for the populatio 40 th percetile of the populatio. Solutio: The medias for the bootstrap resamples are: Sortig these values: 2, 3, 3,, 3, 3, 3, 3, 4, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4 We take the 20 th ad 80 th percetiles to be the edpoits of our cofidece iterval, givig us [2, 3]. 9. Which of the followig statemets are valid claims? Provide revisios for the others. a) There s a 60% chace that the cofidece iterval i questio 6 covers the true populatio 40th percetile. Solutio: No, the cofidece iterval either covers the true populatio parameter or it does t. The 60% refers to the coverage of the may cofidece itervals costructed from hypothetical ew samples. b) If we were to repeat our samplig procedure ad bootstrap cofidece iterval estimatio may times o the populatio, the i the limit of ifiite samples, at least 40% of those 60% cofidece itervals will cover the 40th percetile of the populatio. Solutio: This statemet is fie. 40% itervals are cotaied i 60% itervals. c) A 80% cofidece iterval will i geeral be arrower tha a 60% cofidece iterval. Solutio: No, they are wider.

Discussio #0 7 Properties of the Bootstrap I the bootstrap, { we have a sample {X,..., X } from which we sample with replacemet times to obtai X,..., X }. Most likely, some of the values {X,..., X } will show up more tha oce. 0. For a really big sample, how likely are we to observe a data poit X i a particular bootstrap sample? Write dow a guess.. Let s see how we would aswer this questio aalytically. First, pick a fixed sample size. What is the probability that X appears o the secod draw of a bootstrap sample? Solutio: 2. What is the probability that X appears i a particular bootstrap sample? Solutio: The probability that we do t pick X i the ith draw is. The probability that we do t pick X at all is the probability that we do t pick it for the st draw, for the secod draw, ad so o up to the th draw. Sice we are samplig them idepedetly, this probability is the product P X does t appear i the bootstrap sample) = ) ) = } {{ } times ) This is the probability that we do t observe X at all. We are iterested i the probability of the complemet evet: observe X at least oce. This is give by oe mius the above probability: P X appears at least oce i the bootstrap sample) = ). 3. What is the limit of this probability as approaches? Hit: Defie y = P X does t appear i the bootstrap sample). The take the atural log of both sides.

Discussio #0 8 Solutio: Defie y = ) ad take the log of both sides to get l y = l ) = l Take the limit of both sides ad apply L Hôpital s Rule. lim l y = lim Expoetiatig both sides, Puttig thigs together: l ) = lim ) 2 2 e lim l y = lim e l y = lim y = e ) = lim = lim P X appears at least oce i the bootstrap sample) = e Techical poits: There is a mior abuse of otatio whe we take the derivatives sice N. Here you should uderstad the umerator ad deomiator as cotiuous fuctios of real umbers. For those of you who are worryig about the existece of this limit, you ca be more careful usig a squeeze theorem argumet. See http://www.maths. machester.ac.uk/ mprest/elimit.pdf for a closely related proof. 4. Approximately what is the limit above equal to umerically? Solutio: lim P X appears at least oce i the bootstrap sample) = e 0.632

Discussio #0 9 5. How may times does a data poit X show up o average i the bootstrap sample? Solutio: First ote that the umber of times T that X is picked for the bootstrap sample ca be writte as T = I[ X j = X ], j= where I[ X j = X ] is if X j = X ad 0 if X j X. To get the expected umber of times, use liearity of expectatio! E[T ] = EI[ X j = X ] = j= j= ) P Xj = X = j= =. So the expected umber of times X shows up is, ad the same is true for every other observatio X 2,..., X. This makes sese, sice there are cadidate positios ad observatios to choose from, with o oe privileged over the other.