Hypothesis tests and confidence intervals

Similar documents
Sample size calculations. $ available $ per sample

We have also learned that, thanks to the Central Limit Theorem and the Law of Large Numbers,

A string of not-so-obvious statements about correlation in the data. (This refers to the mechanical calculation of correlation in the data.

Data Analysis and Statistical Methods Statistics 651

Contents Two Sample t Tests Two Sample t Tests

Common Large/Small Sample Tests 1/55

Stat 200 -Testing Summary Page 1

STAT431 Review. X = n. n )

BIOS 4110: Introduction to Biostatistics. Breheny. Lab #9

1 Constructing and Interpreting a Confidence Interval

Statistics 20: Final Exam Solutions Summer Session 2007

Data Analysis and Statistical Methods Statistics 651

1 Constructing and Interpreting a Confidence Interval

5. 추정 (Estimation) 2014/4/17

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

University of California, Los Angeles Department of Statistics. Hypothesis testing

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

STATISTICAL INFERENCE

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

Sample Size Determination (Two or More Samples)

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

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

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

Statistics Parameters

1 Inferential Methods for Correlation and Regression Analysis

m = Statistical Inference Estimators Sampling Distribution of Mean (Parameters) Sampling Distribution s = Sampling Distribution & Confidence Interval

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

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

TABLES AND FORMULAS FOR MOORE Basic Practice of Statistics

Issues in Study Design

Agenda: Recap. Lecture. Chapter 12. Homework. Chapt 12 #1, 2, 3 SAS Problems 3 & 4 by hand. Marquette University MATH 4740/MSCS 5740

Since X n /n P p, we know that X n (n. Xn (n X n ) Using the asymptotic result above to obtain an approximation for fixed n, we obtain

Introduction to Econometrics (3 rd Updated Edition) Solutions to Odd- Numbered End- of- Chapter Exercises: Chapter 3

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

AVERAGE MARKS SCALING

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

Sample Size Estimation in the Proportional Hazards Model for K-sample or Regression Settings Scott S. Emerson, M.D., Ph.D.

APPLIED MULTIVARIATE ANALYSIS

October 25, 2018 BIM 105 Probability and Statistics for Biomedical Engineers 1

x z Increasing the size of the sample increases the power (reduces the probability of a Type II error) when the significance level remains fixed.

X. Perturbation Theory

Lektion 4. Sources of variation. Attribute Chapter 6 Attribute control

STAC51: Categorical data Analysis

Lecture 19. Curve fitting I. 1 Introduction. 2 Fitting a constant to measured data

Math 140 Introductory Statistics

AN EFFICIENT ESTIMATION METHOD FOR THE PARETO DISTRIBUTION

ENGI 4421 Confidence Intervals (Two Samples) Page 12-01

Chapter 5: Hypothesis testing

REDUCING THE POSSIBILITY OF SUBJECTIVE ERROR IN THE DETERMINATION OF THE STRUCTURE-FUNCTION-BASED EFFECTIVE THERMAL CONDUCTIVITY OF BOARDS

This chapter focuses on two experimental designs that are crucial to comparative studies: (1) independent samples and (2) matched pair samples.

Chapter 8: Estimating with Confidence

Module 1 Fundamentals in statistics

A Question. Output Analysis. Example. What Are We Doing Wrong? Result from throwing a die. Let X be the random variable

Comparing Two Populations. Topic 15 - Two Sample Inference I. Comparing Two Means. Comparing Two Pop Means. Background Reading

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

Power and Type II Error

ST 305: Exam 3 ( ) = P(A)P(B A) ( ) = P(A) + P(B) ( ) = 1 P( A) ( ) = P(A) P(B) σ X 2 = σ a+bx. σ ˆp. σ X +Y. σ X Y. σ X. σ Y. σ n.

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

(7 One- and Two-Sample Estimation Problem )

z is the upper tail critical value from the normal distribution

Chapter 1 (Definitions)

Lecture 33: Bootstrap

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

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

Chapter 13: Tests of Hypothesis Section 13.1 Introduction

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

Interval Estimation (Confidence Interval = C.I.): An interval estimate of some population parameter is an interval of the form (, ),

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

Answer Key, Problem Set 1, Written

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

A PROBABILITY PROBLEM

Lesson 2. Projects and Hand-ins. Hypothesis testing Chaptre 3. { } x=172.0 = 3.67

Samples from Normal Populations with Known Variances

5.6 Binomial Multi-section Matching Transformer

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

Statistics for Applications Fall Problem Set 7

Expectation and Variance of a random variable

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

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

Inferential Statistics. Inference Process. Inferential Statistics and Probability a Holistic Approach. Inference Process.

Statistics and Data Analysis in MATLAB Kendrick Kay, February 28, Lecture 4: Model fitting

Queueing Theory II. Summary. M/M/1 Output process Networks of Queue Method of Stages. General Distributions

Surveying the Variance Reduction Methods

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

Birth-Death Processes. Outline. EEC 686/785 Modeling & Performance Evaluation of Computer Systems. Relationship Among Stochastic Processes.

ECE 901 Lecture 4: Estimation of Lipschitz smooth functions

Statistics Lecture 27. Final review. Administrative Notes. Outline. Experiments. Sampling and Surveys. Administrative Notes

Final Review. Fall 2013 Prof. Yao Xie, H. Milton Stewart School of Industrial Systems & Engineering Georgia Tech

Mathematical Notation Math Introduction to Applied Statistics

Some Examples on Gibbs Sampling and Metropolis-Hastings methods

y ij = µ + α i + ɛ ij,

MA238 Assignment 4 Solutions (part a)

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

Summary. Recap ... Last Lecture. Summary. Theorem

MATH/STAT 352: Lecture 15

Bertrand s postulate Chapter 2

Comments on Discussion Sheet 18 and Worksheet 18 ( ) An Introduction to Hypothesis Testing

Chapter 6 Sampling Distributions

6 Sample Size Calculations

Stat 139 Homework 7 Solutions, Fall 2015

Transcription:

Hypothesis tests ad cofidece itervals The 95% cofidece iterval for µ is the set of values, µ 0, such that the ull hypothesis H 0 : µ = µ 0 would ot be rejected by a two-sided test with α = 5%. The 95% CI for µ is the set of plausible values of µ. If a value of µ is plausible, the as a ull hypothesis, it would ot be rejected. For exaple: 9.98 9.87 10.05 10.08 9.99 9.90 assued iid oralµ,. X = 9.98; s = 0.082; = 6 qt0.975,5 = 2.57 95% CI for µ = 9.98 ± 2.57 0.082 / 6 = 9.98 ± 0.086 = 9.89,10.06 1 Saple size calculatios = $ available $ per saple Too little data A total waste Too uch data A partial waste 2

Power X 1,..., X iid oralµ A, A Y 1,..., Y iid oralµ B, B Test H 0 : µ A = µ B vs H a : µ A µ B at α = 0.05. Test statistic: T = X Ȳ ŜD X Ȳ. Critical value: C such that Pr T > C µ A = µ B = α. Power: Pr T > C µ A µ B Power C 0 C 3 Power depeds o... The desig of your experiet What test you re doig Chose sigificace level, α Saple size True differece, µ A µ B Populatio SD s, A ad B. 4

The case of kow populatio SDs Suppose A ad B are kow. The X Ȳ oral µ A µ B, Test statistic: Z = X Ȳ 2 A 2 A If H 0 is true µ A = µ B, Z oral0,1 = C = z α/2 so that Pr Z > C µ A = µ B = α For exaple, for α = 0.05, C = qor0.975 = 1.96. 5 Power whe the populatio SDs are kow If µ A µ B =, the Z = X Ȳ A 2 Pr X Ȳ 2 A > 1.96 = Pr X Ȳ 2 A > 1.96 oral0,1 + Pr X Ȳ 2 A < 1.96 = Pr X Ȳ 2 A > 1.96 2 A + Pr X Ȳ 2 A < 1.96 2 A = Pr Z > 1.96 + Pr Z < 1.96 6

Calculatios i R Power = Pr Z > 1.96 + Pr Z < 1.96 C <- qor0.975 se <- sqrt sigaa^2/ + sigab^2/ power <- 1 - porc - delta/se + por-c - delta/se Power curves Power 100 80 60 40 20 0 2 0 2 =20 =10 =5 7 Power depeds o... Power = Pr Z > C + Pr Z < C Choice of α which affects C Larger α less striget greater power. = µ A µ B = the true effect. Larger greater power. Populatio SDs, A ad B Saller s greater power. Saple sizes, ad Larger, greater power. 8

Choice of saple size We ostly ifluece power via ad. Power is greatest whe 2 A is as sall as possible. Suppose the total saple size N = + is fixed. For exaple: 2 A is iiized whe = If A = B, we should choose =. If A = 2 B, we should choose = 2. A A + B N ad = B A + B N e.g., if A = 4 ad B = 2, we ight use =20 ad =10 9 Calculatig the saple size Suppose we seek 80% power to detect a particular value of µ A µ B =, i the case that A ad B are kow. For coveiece here, let s preted that A = B ad that we pla to have equal saple sizes for the two groups. Power Pr Z > C = Pr Z > 1.96 2 Fid such that Pr Z > 1.96 2 Thus 1.96 2 = qor0.2 = 0.842. = 80%. = = [1.96 0.842] 2 = = 15.7 2 10

Equal but ukow populatio SDs X 1,..., X iid oralµ A, Y 1,..., Y iid oralµ B, Test H 0 : µ A = µ B vs H a : µ A µ B at α = 0.05. ˆ p = s 2 A 1+s2 B 1 + 2 ŜD X Ȳ = ˆ p 1 + 1 Test statistic: T = X Ȳ ŜD X Ȳ. I the case µ A = µ B, T follows a t distributio with + 2 d.f. Critical value: C = qt0.975, +-2 11 Power = Pr Power: equal but ukow pop SDs X Ȳ ˆ p 1 + 1 > C I the case µ A µ B =, the statistic X Ȳ ˆ p 1 + 1 This distributio has two paraeters: degrees of freedo as before the o-cetrality paraeter, follows a o-cetral t distributio. 1 + 1 C <- qt0.975, + - 2 se <- siga * sqrt 1/ + 1/ power <- 1 - ptc, +-2, cp=delta/se + pt-c, +-2, cp=delta/se 12

Power curves 100 80 60 Power 40 20 = 20 = 10 = 5 kow SDs ukow SDs 0 2 0 2 13 A built-i fuctio: power.t.test Calculate power or deterie the saple size for the t-test whe: Saple sizes equal Populatio SDs equal Arguets: = saple size delta = = µ 2 µ 1 sd = = populatio SD sig.level = α = sigificace level power = the power type = type of data two-saple, oe-saple, paired alterative = two-sided or oe-sided test 14

Exaples A. = 10 for each group; effect = = 5; pop SD = = 10 power.t.test=10, delta=5, sd=10 = 18% B. power = 80%; effect = = 5; pop SD = = 10 power.t.testdelta=5, sd=10, power=0.8 = = 63.8 = 64 for each group C. power = 80%; effect = = 5; pop SD = = 10; oe-sided power.t.testdelta=5, sd=10, power=0.8, alterative="oe.sided" = = 50.2 = 51 for each group 15 Ukow ad differet pop SDs X 1,..., X iid oralµ A, A Y 1,..., Y iid oralµ B, B Test H 0 : µ A = µ B vs H a : µ A µ B at α = 0.05. Test statistic: T = X Ȳ s 2 A + s2 B To calculate the critical value for the test, we eed the ull distributio of T that is, the distributio of T if µ A = µ B. To calculate the power, we eed the distributio of T give the value of = µ A µ B. We do t really kow either of these. 16

Power by coputer siulatio Specify,, A, B, ad = µ A µ B, ad the sigificace level, α. Siulate data uder the odel. Perfor the proposed test ad calculate the P-value. Repeat ay ties. Exaple: = 5, = 10, A = 1, B = 2, = 0.0, 0.5, 1.0, 1.5, 2.0 or 2.5. 17 = 0 = 0.5 0.0 0.2 0.4 0.6 0.8 1.0 P value 0.0 0.2 0.4 0.6 0.8 1.0 P value = 1.0 = 1.5 0.0 0.2 0.4 0.6 0.8 1.0 P value 0.0 0.2 0.4 0.6 0.8 1.0 P value = 2.0 = 2.5 0.0 0.2 0.4 0.6 0.8 1.0 P value 0.0 0.2 0.4 0.6 0.8 1.0 P value 18

100 80 60 Power 40 20 0 0.0 0.5 1.0 1.5 2.0 2.5 19 Deteriig saple size The thigs you eed to kow: Structure of the experiet Method for aalysis Chose sigificace level, α usually 5% Desired power usually 80% Variability i the easureets If ecessary, perfor a pilot study, or use data fro prior experiets or publicatios The sallest eaigful effect 20

Reducig saple size Reduce the uber of treatet groups beig copared. Fid a ore precise easureet e.g., average survival tie rather tha proportio dead. Decrease the variability i the easureets. Make subjects ore hoogeous. Use stratificatio. Cotrol for other variables e.g., weight. Average ultiple easureets o each subject. 21 Tests to copare two eas 1. Assue 1 2 a Calculate pooled estiate of populatio SD b ˆ SE = ˆpooled 1 + 1 c Copare to tdf = + 2 I R: t.test with var.equal=true 2. Allow 1 2 a SE ˆ s 2 = 1 + s2 2 b Copare to t with df fro asty forula. I R: t.test with var.equal=false the default 22

Estiated type I error rates X 1,..., X 4 iid oralµ, Y 1,..., Y 4 iid oralµ, τ 10,000 siulatios τ = 1 Allow 1 2 Assue 1 2 FTR H 0 Reject H 0 FTR H 0 0.948 0.000 0.948 Reject H 0 0.009 0.043 0.052 0.957 0.043 τ = 2 Allow 1 2 Assue 1 2 FTR H 0 Reject H 0 FTR H 0 0.940 0.000 0.940 Reject H 0 0.012 0.048 0.060 0.952 0.048 τ = 1.5 Allow 1 2 Assue 1 2 FTR H 0 Reject H 0 FTR H 0 0.944 0.000 0.944 Reject H 0 0.009 0.047 0.056 0.953 0.047 τ = 4 Allow 1 2 Assue 1 2 FTR H 0 Reject H 0 FTR H 0 0.924 0.000 0.924 Reject H 0 0.023 0.054 0.076 0.946 0.054 23 Estiated power X 1,..., X 4 iid oralµ, Y 1,..., Y 4 iid oralµ+2, τ 10,000 siulatios τ = 1 Allow 1 2 Assue 1 2 FTR H 0 Reject H 0 FTR H 0 0.344 0.000 0.344 Reject H 0 0.046 0.611 0.656 0.389 0.611 τ = 2 Allow 1 2 Assue 1 2 FTR H 0 Reject H 0 FTR H 0 0.658 0.000 0.658 Reject H 0 0.060 0.282 0.342 0.718 0.282 τ = 1.5 Allow 1 2 Assue 1 2 FTR H 0 Reject H 0 FTR H 0 0.532 0.000 0.532 Reject H 0 0.057 0.411 0.468 0.589 0.411 τ = 4 Allow 1 2 Assue 1 2 FTR H 0 Reject H 0 FTR H 0 0.836 0.000 0.836 Reject H 0 0.047 0.117 0.164 0.883 0.117 24