Comparing 2 populations. Placebo go to see a doctor.

Slides:



Advertisements
Similar presentations
BINF 702 Spring 2014 Practice Problems Practice Problems BINF 702 Practice Problems.
Advertisements

Objectives (BPS chapter 18) Inference about a Population Mean  Conditions for inference  The t distribution  The one-sample t confidence interval 
Inference for a population mean BPS chapter 18 © 2006 W. H. Freeman and Company.
Inferential Statistics & Hypothesis Testing
Nemours Biomedical Research Statistics March 19, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Hyp Test II: 1 Hypothesis Testing: Additional Applications In this lesson we consider a series of examples that parallel the situations we discussed for.
Sample size computations Petter Mostad
Lecture 7 Outline – Thur, Sep 25
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap 9-1 Introduction to Statistics Chapter 10 Estimation and Hypothesis.
Hypothesis Tests for Means The context “Statistical significance” Hypothesis tests and confidence intervals The steps Hypothesis Test statistic Distribution.
A Decision-Making Approach
Business Statistics: A Decision-Making Approach, 7e © 2008 Prentice-Hall, Inc. Chap 10-1 Business Statistics: A Decision-Making Approach 7 th Edition Chapter.
Chapter 9 Hypothesis Testing.
5-3 Inference on the Means of Two Populations, Variances Unknown
1/49 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 9 Estimation: Additional Topics.
Statistical Inference Dr. Mona Hassan Ahmed Prof. of Biostatistics HIPH, Alexandria University.
Experimental Statistics - week 2
Lab 5 Hypothesis testing and Confidence Interval.
Chapter 7 Using sample statistics to Test Hypotheses about population parameters Pages
Hypothesis Testing – Examples and Case Studies
Lecture 8 1 Hypothesis tests Hypothesis H 0 : Null-hypothesis is an conjecture which we assume is true until we have too much evidence against it. H 1.
Jeopardy Hypothesis Testing T-test Basics T for Indep. Samples Z-scores Probability $100 $200$200 $300 $500 $400 $300 $400 $300 $400 $500 $400.
1/2555 สมศักดิ์ ศิวดำรงพงศ์
Two-Sample Proportions Inference. Sampling Distributions for the difference in proportions When tossing pennies, the probability of the coin landing on.
5-1 Introduction 5-2 Inference on the Means of Two Populations, Variances Known Assumptions.
Inference for One-Sample Means
Chapter 9.3 (323) A Test of the Mean of a Normal Distribution: Population Variance Unknown Given a random sample of n observations from a normal population.
Lecture 9 1 Reminder:Hypothesis tests Hypotheses H 0 : Null-hypothesis is an conjecture which we assume is true until we have too much evidence against.
Education 793 Class Notes T-tests 29 October 2003.
Two independent samples Difference of Means
Comparing the Means of Two Dependent Populations The Paired T-test ….
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
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
STATISTICAL INFERENCE PART VII
1 Power and Sample Size in Testing One Mean. 2 Type I & Type II Error Type I Error: reject the null hypothesis when it is true. The probability of a Type.
Chapter 10 Comparing Two Means Target Goal: I can use two-sample t procedures to compare two means. 10.2a h.w: pg. 626: 29 – 32, pg. 652: 35, 37, 57.
Week 111 Power of the t-test - Example In a metropolitan area, the concentration of cadmium (Cd) in leaf lettuce was measured in 7 representative gardens.
Pengujian Hipotesis Dua Populasi By. Nurvita Arumsari, Ssi, MSi.
Inference for a population mean BPS chapter 16 © 2006 W.H. Freeman and Company.
Chapter 23 Inference for One- Sample Means. Steps for doing a confidence interval: 1)State the parameter 2)Conditions 1) The sample should be chosen randomly.
Statistical Hypotheses & Hypothesis Testing. Statistical Hypotheses There are two types of statistical hypotheses. Null Hypothesis The null hypothesis,
Large sample CI for μ Small sample CI for μ Large sample CI for p
Week111 The t distribution Suppose that a SRS of size n is drawn from a N(μ, σ) population. Then the one sample t statistic has a t distribution with n.
Count Data. HT Cleopatra VII & Marcus Antony C c Aa.
Hypothesis Testing Errors. Hypothesis Testing Suppose we believe the average systolic blood pressure of healthy adults is normally distributed with mean.
T tests comparing two means t tests comparing two means.
© Copyright McGraw-Hill 2004
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.1 Categorical Response: Comparing Two Proportions.
6.1 - One Sample One Sample  Mean μ, Variance σ 2, Proportion π Two Samples Two Samples  Means, Variances, Proportions μ 1 vs. μ 2.
Comparing the Means of Two Dependent Populations.
1 Hypothesis Tests on the Mean H 0 :  =  0 H 1 :    0.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
AP Statistics. Chap 13-1 Chapter 13 Estimation and Hypothesis Testing for Two Population Parameters.
Lecture 8 Estimation and Hypothesis Testing for Two Population Parameters.
If we fail to reject the null when the null is false what type of error was made? Type II.
Week 101 Test on Pairs of Means – Case I Suppose are iid independent of that are iid. Further, suppose that n 1 and n 2 are large or that are known. We.
Chapter 9 Lecture 3 Section: 9.3. We will now consider methods for using sample data from two independent samples to test hypotheses made about two population.
Chapter 7 Inference Concerning Populations (Numeric Responses)
Review Statistical inference and test of significance.
Statistical Inferences for Variance Objectives: Learn to compare variance of a sample with variance of a population Learn to compare variance of a sample.
Chapter 14 Single-Population Estimation. Population Statistics Population Statistics:  , usually unknown Using Sample Statistics to estimate population.
Estimation & Hypothesis Testing for Two Population Parameters
Diff of Means, Var known Null hypothesis: Test statistic:
Tests for Two Means – Normal Populations
Chapter 9 Hypothesis Testing.
Comparing Populations
Confidence Interval.
Presentation transcript:

Comparing 2 populations

Placebo

go to see a doctor

Control group

Twin study

WSJ WSJ ad.

Twin study A D E A D E A D E A D E

Randomized principle B C F B C F A D E A D E A B C D E F

No control group study A D E A D E B C F B C F

matched sample/paired sample A D E A D E B C F B C F

A D E A D E B C F B C F Placebo - (single) blinded test

Double blinded test V V

V V

4.85, 4.56, 4.76, 4.14, 4.94, 4.99, 4.62, 3.43, , 4.57, 5.13, 6.35, 4.22, 5.03, 5.09, , 4.89, 5.14, 4.93, 5.04, 5.25, 5.17, 5.09 (%) Protein of milk produced two farms (artificial data)

1) 95% CI of 2) Tests with ( )

I. are known III. are unknown II. (unknown)

I. are known 95% CI of

I. are known Do test with 1.96 ± 1.645

II. (unknown)

95% CI of II. (unknown)

Do test with II. (unknown)

III. are unknown Satterthwaite’s approximated df

integer

95% CI of III. are unknown

Do test with

95% CI of

> x<-c(4.85,4.56,4.76,4.14,4.94,4.99,4.62,3.43,4.21) > y<-c(5.35,4.57,5.13,6.35,4.22,5.03,5.09,4.67,4.14, 4.89,5.14,4.93,5.04,5.25,5.17,5.09) > > t.test(x,y) Welch Two Sample t-test data: x and y t = , df = 16.71, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of x mean of y

> t.test(x,y,alternative="less") Welch Two Sample t-test data: x and y t = , df = 16.71, p-value = alternative hypothesis: true difference in means is less than 0 95 percent confidence interval: -Inf sample estimates: mean of x mean of y Satterthwaite’s approximated df is

> t.test(x,y,var.equal=T) Two Sample t-test data: x and y t = , df = 23, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of x mean of y Equal variance Compare df with the one obtained by Satterthwaite’s approximated df (16.71). 9 16

n, m are large

95% CI of

2) Tests with Assume, that is

Do test with

> head2 <- c( 560, 640) > toss2 <- c( 1000, 1000) > prop.test(head2, toss2) 2-sample test for equality of proportions …. data: head2 out of toss2 X-squared = , df = 1, p-value = alternative hypothesis: two.sided 95 percent confidence interval: sample estimates: prop 1 prop See Chi-square test for more general approach !! CaesarTolemy Head Tail || ? : :

> # > # H0 : all four coins have the same proportion showing head side > # H1 : at least one coin have different proportion to the others > # > > head4 <- c( 83, 90, 129, 70 ) > toss4 <- c( 86, 93, 136, 82 ) > prop.test(head4, toss4) 4-sample test for equality of proportions without continuity correction data: head4 out of toss4 X-squared = , df = 3, p-value = alternative hypothesis: two.sided sample estimates: prop 1 prop 2 prop 3 prop Coin 1Coin 2Coin 3Coin 4 Head Alive Tail33712Dead Total Total Hospital 1Hospital 2Hospital 3Hospital 4

Subject (case) variation + treatment effect

Consider the following study in which standing and supine systolic blood pressures were compared. This study was performed on twelve subjects. Their blood pressures were measured in both positions. Suggested null and alternative hypotheses could be: H 0 : There is no difference between the mean blood pressures in the two populations H 1 : There is a difference between the mean blood pressures in the two populations or equivalently H 0 : On average there is no difference between the blood pressures in the two populations H 1 : On average there is a difference between the blood pressures in the two populations Paired sample t-test

SubjectStandingSupineDifference Mean SD Blood pressures (mmHg) Subject (human) variation is much larger than the position variation

Paired sample t-test ( X ) ( O )

> x<-c(132,146,135,141,139,162,128,137,145,151,131,143) > y<-c(136,145,140,147,142,160,137,136,149,158,120,150) > > t.test(x,y) Welch Two Sample t-test data: x and y t = , df = , p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of x mean of y > t.test(x,y,paired=T) Paired t-test data: x and y t = , df = 11, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of the differences -2.5 ( X ) ( O )

Student’s sleep data Student (1908), The probable error of a mean. Biometrika, 6 -1, 1-25.

IDControlTreatment Student’s sleep data Data which show the effect of two soporific drugs (increase in hours of sleep compared to control) on 10 patients. R has this data.

Student’s sleep data > t.test(extra ~ group, paired=T, data = sleep) Paired t-test data: extra by group t = , df = 9, p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean of the differences > t.test(extra ~ group, data = sleep) Welch Two Sample t-test data: extra by group t = , df = , p-value = alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: sample estimates: mean in group 1 mean in group ( X ) ( O ) In paired sample t-test, mean difference is more easily detected !

Student’s sleep data > stripchart(extra~group,pch=16, cex=1.4,col=c("red","blue"), ylim=c(0.5,2.5),data=sleep) > xsleep<-data.frame(diff=sleep$extra[11:20]-sleep$extra[1:10],group=factor("2-1")) > stripchart(diff~group,pch=16, cex=1.4,col="brown", ylim=c(0.5,1.5),data=xsleep) Do the blue and red groups have the same distributions ? Is the (population) mean of the distribution 0 ? group 2 – group 1

Thank you !!