Frequentist Statistics and Hypothesis Testing Spring

Similar documents
Exam 2 Practice Questions, 18.05, Spring 2014

Comparison of Bayesian and Frequentist Inference

ORF 245 Fundamentals of Statistics Chapter 9 Hypothesis Testing

Null Hypothesis Significance Testing p-values, significance level, power, t-tests Spring 2017

Compute f(x θ)f(θ) dθ

Introductory Econometrics. Review of statistics (Part II: Inference)

Bayesian Updating with Discrete Priors Class 11, Jeremy Orloff and Jonathan Bloom

Bayesian Updating: Discrete Priors: Spring

18.05 Practice Final Exam

Class 26: review for final exam 18.05, Spring 2014

Confidence Intervals for Normal Data Spring 2014

18.05 Final Exam. Good luck! Name. No calculators. Number of problems 16 concept questions, 16 problems, 21 pages

(1) Introduction to Bayesian statistics

Parameter estimation and forecasting. Cristiano Porciani AIfA, Uni-Bonn

Lecture Testing Hypotheses: The Neyman-Pearson Paradigm

Confidence Intervals for Normal Data Spring 2018

Bayesian Inference. Introduction

Bayesian Updating: Discrete Priors: Spring

6.4 Type I and Type II Errors

STAT 135 Lab 6 Duality of Hypothesis Testing and Confidence Intervals, GLRT, Pearson χ 2 Tests and Q-Q plots. March 8, 2015

Computational Perception. Bayesian Inference

Null Hypothesis Significance Testing p-values, significance level, power, t-tests

Conjugate Priors: Beta and Normal Spring 2018

Unobservable Parameter. Observed Random Sample. Calculate Posterior. Choosing Prior. Conjugate prior. population proportion, p prior:

Conjugate Priors: Beta and Normal Spring 2018

ECE521 W17 Tutorial 6. Min Bai and Yuhuai (Tony) Wu

Lecture 1: Probability Fundamentals

This does not cover everything on the final. Look at the posted practice problems for other topics.

Hypothesis Testing. Part I. James J. Heckman University of Chicago. Econ 312 This draft, April 20, 2006

Introduction: MLE, MAP, Bayesian reasoning (28/8/13)

Bayesian Inference and MCMC

Business Statistics: Lecture 8: Introduction to Estimation & Hypothesis Testing

ECE295, Data Assimila0on and Inverse Problems, Spring 2015

Probability and Statistics. Terms and concepts

2.830J / 6.780J / ESD.63J Control of Manufacturing Processes (SMA 6303) Spring 2008

Classical and Bayesian inference

Nuisance parameters and their treatment

MTH U481 : SPRING 2009: PRACTICE PROBLEMS FOR FINAL

Stat 535 C - Statistical Computing & Monte Carlo Methods. Arnaud Doucet.

Probability and Statistics. Joyeeta Dutta-Moscato June 29, 2015

an introduction to bayesian inference

Data Mining Chapter 4: Data Analysis and Uncertainty Fall 2011 Ming Li Department of Computer Science and Technology Nanjing University

Bayesian Analysis (Optional)

Advanced Herd Management Probabilities and distributions

Hypothesis Testing. Testing Hypotheses MIT Dr. Kempthorne. Spring MIT Testing Hypotheses

Why Bayesian? Rigorous approach to address statistical estimation problems. The Bayesian philosophy is mature and powerful.

DS-GA 1003: Machine Learning and Computational Statistics Homework 7: Bayesian Modeling

Machine Learning. Bayes Basics. Marc Toussaint U Stuttgart. Bayes, probabilities, Bayes theorem & examples

COMP 551 Applied Machine Learning Lecture 19: Bayesian Inference

Introduction into Bayesian statistics

Physics 403. Segev BenZvi. Credible Intervals, Confidence Intervals, and Limits. Department of Physics and Astronomy University of Rochester

COMP90051 Statistical Machine Learning

STAT 135 Lab 5 Bootstrapping and Hypothesis Testing

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

Probability and Estimation. Alan Moses

Hypothesis Testing - Frequentist

Bayesian Methods. David S. Rosenberg. New York University. March 20, 2018

Machine Learning CMPT 726 Simon Fraser University. Binomial Parameter Estimation

Bayesian RL Seminar. Chris Mansley September 9, 2008

CPSC 540: Machine Learning

Review: Statistical Model

Some slides from Carlos Guestrin, Luke Zettlemoyer & K Gajos 2

Swarthmore Honors Exam 2012: Statistics

Bayesian Statistics. Debdeep Pati Florida State University. February 11, 2016

Bayesian Inference: Posterior Intervals

F79SM STATISTICAL METHODS

Bayes Formula. MATH 107: Finite Mathematics University of Louisville. March 26, 2014

Part III. A Decision-Theoretic Approach and Bayesian testing

Accouncements. You should turn in a PDF and a python file(s) Figure for problem 9 should be in the PDF

Intro to Bayesian Methods

Introduction to Bayesian Statistics 1

Quantitative Understanding in Biology 1.7 Bayesian Methods

Outline. 1. Define likelihood 2. Interpretations of likelihoods 3. Likelihood plots 4. Maximum likelihood 5. Likelihood ratio benchmarks

Bayesian Inference. STA 121: Regression Analysis Artin Armagan

Statistical Methods for Particle Physics Lecture 1: parameter estimation, statistical tests

Chapters 10. Hypothesis Testing

Physics 403. Segev BenZvi. Classical Hypothesis Testing: The Likelihood Ratio Test. Department of Physics and Astronomy University of Rochester

Statistical Data Analysis Stat 3: p-values, parameter estimation

14.30 Introduction to Statistical Methods in Economics Spring 2009

Conditional Probability, Independence and Bayes Theorem Class 3, Jeremy Orloff and Jonathan Bloom

McGill University. Faculty of Science. Department of Mathematics and Statistics. Part A Examination. Statistics: Theory Paper

Introduction to Statistical Inference

Bayesian Updating with Continuous Priors Class 13, Jeremy Orloff and Jonathan Bloom

Announcements. Proposals graded

Midterm Examination. Mth 136 = Sta 114. Wednesday, 2000 March 8, 2:20 3:35 pm

Detection theory. H 0 : x[n] = w[n]

Chapter 9: Hypothesis Testing Sections

Probability Theory and Simulation Methods

Choosing priors Class 15, Jeremy Orloff and Jonathan Bloom

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 10

Statistics 100A Homework 5 Solutions

Chapter 5: HYPOTHESIS TESTING

Conjugate Priors: Beta and Normal Spring January 1, /15

Answers and expectations

Bayesian Updating: Discrete Priors: Spring 2014

Chapter 7: Hypothesis Testing

Fundamental Probability and Statistics

A Bayesian Approach to Phylogenetics

Non-parametric Inference and Resampling

Lecture 10: Generalized likelihood ratio test

Transcription:

Frequentist Statistics and Hypothesis Testing 18.05 Spring 2018 http://xkcd.com/539/

Agenda Introduction to the frequentist way of life. What is a statistic? NHST ingredients; rejection regions Simple and composite hypotheses z-tests, p-values April 9, 2018 2 / 20

Frequentist school of statistics Dominant school of statistics in the 20 th century. p-values, t-tests, χ 2 -tests, confidence intervals. Defines probability as long-term frequency in a repeatable random experiment. Yes: probability a coin lands heads. Yes: probability a given treatment cures a certain disease. Yes: probability distribution for the error of a measurement. Rejects the use of probability to quantify incomplete knowledge, measure degree of belief in hypotheses. No: prior probability for the probability an unknown coin lands heads. No: prior probability on the efficacy of a treatment for a disease. No: prior probability distribution for the unknown mean of a normal distribution. April 9, 2018 3 / 20

The fork in the road Probability (mathematics) P (H D) = P (D H)P (H) P (D) Everyone uses Bayes formula when the prior P (H) is known. Bayesian path Frequentist path Statistics (art) P Posterior (H D) = P (D H)P prior(h) P (D) Bayesians require a prior, so they develop one from the best information they have. Likelihood L(H; D) = P (D H) Without a known prior frequentists draw inferences from just the likelihood function. April 9, 2018 4 / 20

Disease screening redux: probability The test is positive. Are you sick? P (H) 0.001 H = sick 0.999 H = healthy P (D H) 0.99 D = pos. test neg. test 0.01 D = pos. test neg. test The prior is known so we can use Bayes Theorem. P(sick pos. test) = 0.001 0.99 0.001 0.99 + 0.999 0.01 0.1 April 9, 2018 5 / 20

Disease screening redux: statistics The test is positive. Are you sick? P (H)? H = sick? H = healthy P (D H) 0.99 D = pos. test neg. test 0.01 D = pos. test neg. test The prior is not known. Bayesian: use a subjective prior P(H) and Bayes Theorem. Frequentist: the likelihood is all we can use: P(D H) April 9, 2018 6 / 20

Concept question Each day Jane arrives X hours late to class, with X uniform(0, θ), where θ is unknown. Jon models his initial belief about θ by a prior pdf f (θ). After Jane arrives x hours late to the next class, Jon computes the likelihood function φ(x θ) and the posterior pdf f (θ x). Which of these probability computations would the frequentist consider valid? 1. none 5. prior and posterior 2. prior 6. prior and likelihood 3. likelihood 7. likelihood and posterior 4. posterior 8. prior, likelihood and posterior. April 9, 2018 7 / 20

Statistics are computed from data Working definition. from random data. A statistic is anything that can be computed A statistic cannot depend on the true value of an unknown parameter. A statistic can depend on a hypothesized value of a parameter. Examples of point statistics Data mean Data maximum (or minimum) Maximum likelihood estimate (MLE) A statistic is random since it is computed from random data. We can also get more complicated statistics like interval statistics. April 9, 2018 8 / 20

Concept questions Suppose x 1,..., x n is a sample from N(µ, σ 2 ), where µ and σ are unknown. Is each of the following a statistic? 1. The median of x 1,..., x n. 1. Yes 2. No April 9, 2018 9 / 20

Concept questions Suppose x 1,..., x n is a sample from N(µ, σ 2 ), where µ and σ are unknown. Is each of the following a statistic? 1. The median of x 1,..., x n. 1. Yes 2. No 2. The interval from the 0.25 quantile to the 0.75 quantile of N(µ, σ 2 ). April 9, 2018 9 / 20

Concept questions Suppose x 1,..., x n is a sample from N(µ, σ 2 ), where µ and σ are unknown. Is each of the following a statistic? 1. The median of x 1,..., x n. 1. Yes 2. No 2. The interval from the 0.25 quantile to the 0.75 quantile of N(µ, σ 2 ). 3. The standardized mean x µ σ/ n. April 9, 2018 9 / 20

Concept questions Suppose x 1,..., x n is a sample from N(µ, σ 2 ), where µ and σ are unknown. Is each of the following a statistic? 1. The median of x 1,..., x n. 1. Yes 2. No 2. The interval from the 0.25 quantile to the 0.75 quantile of N(µ, σ 2 ). 3. The standardized mean x µ σ/ n. 4. The set of sample values less than 1 unit from x. April 9, 2018 9 / 20

NHST ingredients Null hypothesis: H 0 Alternative hypothesis: H A Test statistic: x Rejection region: reject H 0 in favor of H A if x is in this region f(x H 0 ) x 2-3 0 3 reject H 0 don t reject H 0 reject H 0 x 1 x p(x H 0 ) or f (x H 0 ): null distribution April 9, 2018 10 / 20

Choosing rejection regions Coin with probability of heads θ. Test statistic x = the number of heads in 10 tosses. H 0 : the coin is fair, i.e. θ = 0.5 H A : the coin is biased, i.e. θ 0.5 Two strategies: 1. Choose rejection region then compute significance level. 2. Choose significance level then determine rejection region. ***** Everything is computed assuming H 0 ***** April 9, 2018 11 / 20

Table question Suppose we have the coin from the previous slide. 1. The rejection region is bordered in red, what s the significance level?.25 p(x H 0 ).15.05 0 1 2 3 4 5 6 7 8 9 10 x x 0 1 2 3 4 5 6 7 8 9 10 p(x H 0 ).001.010.044.117.205.246.205.117.044.010.001 2. Given significance level α =.05 find a two-sided rejection region. April 9, 2018 12 / 20

Solution 1. α = 0.11 x 0 1 2 3 4 5 6 7 8 9 10 p(x H 0 ).001.010.044.117.205.246.205.117.044.010.001 2. α = 0.05 x 0 1 2 3 4 5 6 7 8 9 10 p(x H 0 ).001.010.044.117.205.246.205.117.044.010.001 April 9, 2018 13 / 20

Concept question The null and alternate pdfs are shown on the following plot f(x H A ) f(x H 0 ) R 1 R 2 R 3 R 4 reject H 0 region. non-reject H 0 region x The significance level of the test is given by the area of which region? 1. R 1 2. R 2 3. R 3 4. R 4 5. R 1 + R 2 6. R 2 + R 3 7. R 2 + R 3 + R 4. April 9, 2018 14 / 20

z-tests, p-values Suppose we have independent normal Data: unknown mean µ, known σ x 1,..., x n ; with Hypotheses: H 0 : x i N(µ 0, σ 2 ) H A : Two-sided: µ µ 0, or one-sided: µ > µ 0 z-value: standardized x: z = x µ 0 σ/ n Test statistic: z Null distribution: Assuming H 0 : z N(0, 1). p-values: Right-sided p-value: p = P(Z > z H 0 ) (Two-sided p-value: p = P( Z > z H 0 )) Significance level: For p α we reject H 0 in favor of H A. Note: Could have used x as test statistic and N(µ 0, σ 2 ) as the null distribution. April 9, 2018 15 / 20

Visualization Data follows a normal distribution N(µ, 15 2 ) where µ is unknown. H 0 : µ = 100 H A : µ > 100 (one-sided) 112 100 Collect 9 data points: x = 112. So, z = = 2.4. 15/3 Can we reject H 0 at significance level 0.05? f(z H 0 ) N(0, 1) z 0.05 = 1.64 α = pink + red = 0.05 p = red = 0.008 non-reject H 0 z 0.05 2.4 reject H 0 z April 9, 2018 16 / 20

Board question H 0 : data follows a N(5, 10 2 ) H A : data follows a N(µ, 10 2 ) where µ 5. Test statistic: z = standardized x. Data: 64 data points with x = 6.25. Significance level set to α = 0.05. (i) Find the rejection region; draw a picture. (ii) Find the z-value; add it to your picture. (iii) Decide whether or not to reject H 0 in favor of H A. (iv) Find the p-value for this data; add to your picture. (v) What s the connection between the answers to (ii), (iii) and (iv)? April 9, 2018 17 / 20

Solution The null distribution f (z H 0 ) N(0, 1) (i) The rejection region is z > 1.96, i.e. 1.96 or more standard deviations from the mean. (ii) Standardizing z = x 5 5/4 = 1.25 1.25 = 1. (iii) Do not reject since z is not in the rejection region. (iv) Use a two-sided p-value p = P( Z > 1) =.32. z 0.025 = 1.96 z 0.975 = 1.96 α = red = 0.05 f(z H 0 ) N(0, 1) 1.96 0 z = 1 1.96 reject H 0 non-reject H 0 reject H 0 z April 9, 2018 18 / 20

Solution continued (v) The z-value not being in the rejection region tells us exactly the same thing as the p-value being greater than the significance, i.e., don t reject the null hypothesis H 0. April 9, 2018 19 / 20

Board question Two coins: probability of heads is 0.5 for C 1 ; and 0.6 for C 2. We pick one at random, flip it 8 times and get 6 heads. 1. H 0 = The coin is C 1 H A = The coin is C 2 Do you reject H 0 at the significance level α = 0.05? 2. H 0 = The coin is C 2 H A = The coin is C 1 Do you reject H 0 at the significance level α = 0.05? 3. Do your answers to (1) and (2) seem paradoxical? Here are binomial(8,θ) tables for θ = 0.5 and 0.6. k 0 1 2 3 4 5 6 7 8 p(k θ = 0.5).004.031.109.219.273.219.109.031.004 p(k θ = 0.6).001.008.041.124.232.279.209.090.017 April 9, 2018 20 / 20