Pharmaceutical Statistics Lecture 14 Hypothesis Testing: The Difference Between Two Population Means.

Slides:



Advertisements
Similar presentations
Hypothesis Testing. To define a statistical Test we 1.Choose a statistic (called the test statistic) 2.Divide the range of possible values for the test.
Advertisements

Hypothesis: It is an assumption of population parameter ( mean, proportion, variance) There are two types of hypothesis : 1) Simple hypothesis :A statistical.
Chapter 10 Section 2 Hypothesis Tests for a Population Mean
Biostatistics Unit 7 Hypothesis Testing 1. Testing Hypotheses Hypothesis testing and estimation are used to reach conclusions about a population by examining.
Statistics Are Fun! Analysis of Variance
BCOR 1020 Business Statistics
Topic 2: Statistical Concepts and Market Returns
Inferences On Two Samples
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap 9-1 Introduction to Statistics Chapter 10 Estimation and Hypothesis.
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.
T-Tests Lecture: Nov. 6, 2002.
S519: Evaluation of Information Systems
 What is t test  Types of t test  TTEST function  T-test ToolPak 2.
Inferences About Process Quality
Hypothesis Testing Using The One-Sample t-Test
Definitions In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test is a standard procedure for testing.
Chapter 9: Introduction to the t statistic
Basic Business Statistics, 10e © 2006 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Two-Sample Tests Basic Business Statistics 10 th Edition.
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
AM Recitation 2/10/11.
Experimental Statistics - week 2
Chapter 13 – 1 Chapter 12: Testing Hypotheses Overview Research and null hypotheses One and two-tailed tests Errors Testing the difference between two.
Overview Definition Hypothesis
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.
Statistical inference: confidence intervals and hypothesis testing.
Statistical Analysis Statistical Analysis
Copyright © Cengage Learning. All rights reserved. 13 Linear Correlation and Regression Analysis.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on the Least-Squares Regression Model and Multiple Regression 14.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 2 – Slide 1 of 25 Chapter 11 Section 2 Inference about Two Means: Independent.
T-distribution & comparison of means Z as test statistic Use a Z-statistic only if you know the population standard deviation (σ). Z-statistic converts.
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.
7 Elementary Statistics Hypothesis Testing. Introduction to Hypothesis Testing Section 7.1.
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 10.3.
Comparing Two Population Means
Chapter 10: Inferences Involving Two Populations.
Chapter 9 Hypothesis Testing and Estimation for Two Population Parameters.
Chapter 9: Testing Hypotheses
Biostatistics Unit 7 – Hypothesis Testing. Testing Hypotheses Hypothesis testing and estimation are used to reach conclusions about a population by examining.
Section 9.2 Testing the Mean  9.2 / 1. Testing the Mean  When  is Known Let x be the appropriate random variable. Obtain a simple random sample (of.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
1 Section 9-4 Two Means: Matched Pairs In this section we deal with dependent samples. In other words, there is some relationship between the two samples.
Chap 9-1 Two-Sample Tests. Chap 9-2 Two Sample Tests Population Means, Independent Samples Means, Related Samples Population Variances Group 1 vs. independent.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Section Inference about Two Means: Independent Samples 11.3.
Essential Question:  How do scientists use statistical analyses to draw meaningful conclusions from experimental results?
© Copyright McGraw-Hill 2000
Chapter 9: Testing Hypotheses Overview Research and null hypotheses One and two-tailed tests Type I and II Errors Testing the difference between two means.
Chapter 10 The t Test for Two Independent Samples
© Copyright McGraw-Hill 2004
© The McGraw-Hill Companies, Inc., Chapter 10 Testing the Difference between Means, Variances, and Proportions.
Sec 8.5 Test for a Variance or a Standard Deviation Bluman, Chapter 81.
Sullivan – Fundamentals of Statistics – 2 nd Edition – Chapter 11 Section 1 – Slide 1 of 26 Chapter 11 Section 1 Inference about Two Means: Dependent Samples.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Lecture Slides Elementary Statistics Eleventh Edition and the Triola.
Understanding Basic Statistics Fourth Edition By Brase and Brase Prepared by: Lynn Smith Gloucester County College Chapter Nine Hypothesis Testing.
AP Statistics. Chap 13-1 Chapter 13 Estimation and Hypothesis Testing for Two Population Parameters.
© 2010 Pearson Prentice Hall. All rights reserved Chapter Hypothesis Tests Regarding a Parameter 10.
© The McGraw-Hill Companies, Inc., Chapter 9 Testing the Difference between Two Means.
Lecture 8 Estimation and Hypothesis Testing for Two Population Parameters.
Chapter 10 Section 5 Chi-squared Test for a Variance or Standard Deviation.
Chapter 7 Inference Concerning Populations (Numeric Responses)
CHAPTER 7: TESTING HYPOTHESES Leon-Guerrero and Frankfort-Nachmias, Essentials of Statistics for a Diverse Society.
 List the characteristics of the F distribution.  Conduct a test of hypothesis to determine whether the variances of two populations are equal.  Discuss.
Copyright © 2009 Pearson Education, Inc t LEARNING GOAL Understand when it is appropriate to use the Student t distribution rather than the normal.
Chapter 10: The t Test For Two Independent Samples.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Two-Sample Hypothesis Testing
Lecture Slides Elementary Statistics Twelfth Edition
What are their purposes? What kinds?
Hypothesis Testing: The Difference Between Two Population Means
Lecture Slides Elementary Statistics Twelfth Edition
Presentation transcript:

Pharmaceutical Statistics Lecture 14 Hypothesis Testing: The Difference Between Two Population Means

Hypothesis Testing: The Difference Between Two Population Means Hypothesis testing involving the difference between two population means is most frequently employed to determine whether or not it is reasonable to conclude that the population means are not equal. Using the same methodology, it is possible to test the hypothesis that the difference is equal to, greater than or equal to, or less than or equal to some value other than zero. In such cases, one of the following hypotheses may be formulated: H 0 : μ 1 – μ 2 = 0, H A : μ 1 – μ 2 ≠ 0 H 0 : μ 1 – μ 2 ≥ 0, H A : μ 1 – μ 2  0 H 0 : μ 1 – μ 2 ≤ 0, H A : μ 1 – μ 2  0

A) When we withdraw two samples from two populations that are normally distributed with known σ 1 and σ 2 Test statistic for the null hypothesis of equal population means (H 0 : μ 1 – μ 2 = 0, H A : μ 1 – μ 2 ≠ 0) is: The subscript H indicates that the difference is a hypothesized parameter (in this case (μ 1 -μ 2 ) H =0).  x 1  x 2 z z   (x1  x2 )  (1  2 )H(x1  x2 )  (1  2 )H  2121   2222 n1n2n1n2

Example Researchers are interested to know if there is any difference in the mean uric acid levels between normal individuals and individuals with Down’s syndrome. They collected samples from each population and uric acid level were determined in each samples. Analysis results are summarized below: Assume that samples were drawn from normally distributed population with variance equal to 1 for the Down’s syndrome population and 1.5 for the normal population. A)Construct the proper hypothesis to test if there is significant difference between the two population means; B)Test your constructed hypothesis using the experimental data. C)Decide on your hypothesis and D)Conclude on the difference in mean uric acid levels between the two studied populations E)Calculate the P-value Normal individualsWith Down’s Syndrome Number of volunteers1512 Uric acid sample mean (mg/100 mL)

Example We are interested in any significant difference, so we consider the null hypothesis with equal means H 0 : μ 1 – μ 2 = 0, H A : μ 1 – μ 2 ≠ 0 An alternative way of stating the hypothesis is as follows H 0 : μ 1 = μ 2, H A : μ 1 ≠ μ 2 The test statistic is: Calculation of the test statistic: z  x 1  x 2   (x1  x2 )  (1  2 )H (x1  x2 )  (1  2 )H  2121   2222 n1n2n1n2 z X N  X D   (x N  x D )  (  N   D ) H  2 2   2D2D NnNnD NnNnD   (4.5  3.4)  0 1.1 (4.5  3.4)  0 1.1 

Example Decision rule: We use the z-stat. Let α=0.05, the critical values of z are 1.96 and Reject H 0 unless  z  1.96 Statistical decision to reject H 0 since  Conclude that on the basis of the data, there is an indication that the two population means are not equal. P-value: (the area to the right of 2.57 and the left of )

B) When we withdraw two samples from two populations that are NOT normally distributed (σ 1 and σ 2 are unknown) andthe sample size is large Test statistic for the null hypothesis of equal population means (H 0 : μ 1 – μ 2 = 0, H A : μ 1 – μ 2 ≠ 0) is: The subscript H indicates that the difference is a hypothesized parameter (in this case (μ 1 -μ 2 ) H =0).  z  (x1  x2 )  (1  2 )Hz  (x1  x2 )  (1  2 )H s  s n1n2n1n2 If we have no idea about the normality of the parent distributions and their parameters, we use the CLT to justify our use of the z-table to find the reliability coefficient. We use the samples standard deviations to calculate the standard error of the difference. This is only true for large samples  X  X 1212  s X  X  [(s / n )  (s / n )]

Example A study was designed to test the effect of disability on the beneficiary effects of health promotion. The researchers developed a scale for testing this effect (BHADP), the scale was administered to a sample of 132 disabled (D) and 137 nondisabled (ND) subjects with the following results: The authors wish to know if they may conclude on the basis of these results that, in general, disabled persons, on the average, score higher on the BHADP scale. Construct the proper hypothesis and test it. Note: use a significance level of 1%. SampleMean ScoreStandard Deviation D ND

Example The statistics were computed from two independent samples that behave as simple random samples from a normally distributed population of disabled persons and a population of nondisabled persons. Since the population variances are unknown, we will use sample variances in the calculation of the test statistic. Since we have large samples, the central limit theorem allows us to use z as a test statistic. Hypotheses : H 0 : μ D – μ ND ≤ 0 H A : μ D – μ ND > 0 or alternatively: H 0 : μ D ≤ μ ND H A : μ D > μ ND Disabled scores are higher!!  z  (x1  x2 )  (1  2 )Hz  (x1  x2 )  (1  2 )H s  s n1n2n1n2

Decision rule: Let α=0.01. this is a one-tailed (right) test with critical value of z equal to 2.33 (from SND tables, Z 0.99 ). Reject H 0 since z computed = 8.42 > 2.33 The data indicate that, on average, disabled persons score higher on the BHADP scale than do nondisabled person. For this test, p  (very highly significant) (7.93) 2 (4.80) 2  Reject H 0 if z computed ≥2.33 Calculation of the test statistic: z  (31.83  25.07)  0  8.42

C) When we withdraw two samples from two populations that are normally distributed (σ 1 and σ 2 are unknown) and the sample size is small Parent pops: Normally distributed Variance for pops: Unknown Sample size: Small We can not use the z-distribution in this case. We need to use the t-table to find the critical values and we need to use standard deviations of the two samples to find the standard error in the t-score calculation. Important note in this case: The calculation of the standard error from s 1,n 1 and s 2, n 2 depend on the equality of the parent populations variances C.1) If they are equal: we use t- distribution C.2) If they are not equal: we use the t’-distribution

C.1) When we withdraw two samples from two populations that are normally distributed (σ 1 and σ 2 are unknown and equal) and the sample size is small In this case, we need to consider the samples variances + to use t-table. Since the sample variance is dependent on the sample size, we need to take this into consideration for samples with different sizes (n) to calculate the pooled estimate of the common variance NOTE: If the sample size for both independent samples is equal, we take directly the arithmetic mean of the two samples variances (simple average). The standard error of the estimate will be: The test statistic for testing H 0 : μ 1 = μ 2 is given by: p s2s2  (n1)s2  (n1)s21122(n1)s2  (n1)s21122 n 1  n 2  2   s X 1  X 2  s 2p2p n 1  s 2p2p n 2 [ This formula pools both sample variances with their corresponding weight that based on the sample size] For critical values: We use the t-table with D.F= n 1 +n 2 -2  t  (x1  x 2 )  (1  2 )Ht  (x1  x 2 )  (1  2 )H  s2s2s2s2 p ppn1n2ppn1n2

Example In a study to investigate the lung destruction in cigarette smokers, a lung destructive index was measured in a sample of lifelong nonsmokers and smokers. A larger score indicates greater lung damage. The data is summarized below: We wish to know if we may conclude that smokers, in general, have greater lung damage measured by this destructive index than do nonsmokers? Assuming that the lung destructive index scores in both populations are approximately normally distributed with equal variances, construct the proper hypothesis and test it. Non-smokerssmokers Number of volunteers916 Average score Standard deviation

Example Hypotheses: H 0 : μ S ≤ μ NS, H A : μ S  μ NS Test statistic (t-test with pooled variance): x NS p n S  9,x S  17.5, S S  n NS  16,  12.4, S NS  ss S (n S  1)s  (n NS 2 n S  n NS  1)s8(4.8492)  15(4.4711) 2  223   s 2p2p nSnS  s 2p2p n NS  t  (x S  x NS )  (  S   NS ) 0  (17.5  12.4)  0 

Example t 0.95 =1.714 for DF:23 α=5% (0.05) Confidence=95% AUC -∞  t 0.95 Critical values and Decision rule: let α=0.05 (right-tailed test). the critical values of t is (from table with D.F=23, cumm. prop=95%). Reject if t caclulated >1.714

Example Statistical decision: we reject H 0 because >1.714 (falls in the rejection zone). Conclusion: we conclude that smokers may have greater lung damage than nonsmokers. α=5% (0.05) t calc = t 0.95 =1.714 for DF:23 p value: 0.01>P>0.005, since   t calc =2.6573

C.2) When we withdraw two samples from two populations that are normally distributed (σ 1 and σ 2 are unknown and NOT equal) and the sample size is small We can not use the t-table to find the critical values for D.F= n 1 +n Solution: Instead of finding the critical values from the tables, we need to compute it taking into consideration the critical values for each sampling distributions and the weight of each sample. 1 / 21 / 2 t't'  w 1 t 1  w 2 t 2 1 w  w 2 1 w w  s 2121 n 1 2 ww 2 s2s2 n 2 t 1  t 1   / for: n 1  1 t 2  t 1   / for: n 2  1 How to compute the critical values for two-tailed test? 11 t't'  w 1 t 1  w 2 t 2 1 w  w 2 1 w w  s 2121 n 1 2 ww 2 s2s2 n 2 t 1  t 1   for: n 1  1 t 2  t 1   for: n 2  1 How to compute the critical values for one-tailed test? _ (x  x )  (    ) t  s2s2s2s2 1  2 n 1 n 2 An d we use S 1 and S 2 in the formula of t-test

α/2=2.5% (0.025) t 1 / 21 / 2 '  w 1 t 1  w 2 t 2 1 w  w 2 1 w w  s 2121 n 1 2 ww s 2 2 n 2 t 1  t 1   / for: n 1  1 t 2  t 1   / for: n 2  1 t 1-α/2= t 97.5%= t α=5% (0.05) 11 t't'  w 1 t 1  w 2 t 2 w  w w w  1 s2s2 n 1 w 2 22 s2s2 n 2 t 1  t 1  for: n 1  1 t 2  t 1  for: n 2  1 For a two sided test, reject H 0 if the computed value of t is either greater than or equal to the critical values t` (1-α/2) or less than or equal to the negative of that value. t 1-α= t 95%= t 0.95 For a one-sided test with the rejection region in the right tail of the sampling distribution, reject H 0 if the computed t is equal to or greater than the critical t` 1-α. For a one-sided test with the rejection region in the left tail of the sampling distribution, reject H if the computed t is equal to or smaller than the negative of the critical t` 1-α 0 computed.

Example The research team want to know if they can conclude that the two population means are different. Assuming that both populations are approximately normally distributed, construct the proper hypothesis and test it?. Researchers wish to know if two populations differ with respect to the mean value of the total serum complement activity (C H50 ). The data consist of C H50 determinations on apparently normal subjects (n 2 =20 ) and subjects with disease (n 1 =10 ). The sample means and standard deviations are: _ s 1  33.8 s 2  x 1  62.6 _ x 2  47.2 The populations are normally distributed with unknown variances that are unequal. With this in mind we will use t’-stat.

Example Hypothesis: H 0 : μ 1 – μ 2 = 0 H A : μ 1 – μ 2 ≠ 0 Test statistic: _ t  (x 1  x 2 )  (1  2 )0t  (x 1  x 2 )  (1  2 )0 s  s n 1 n 2 We obtain the critical value by the equation: 1212 t`t` w ww w  w 1 t 1  w 2 t 2 (1   ) 2 Two-tailed test!!

Example t '1 / 2'1 / 2 12 w  w   w 1 t 1  w 2 t 2  (2.2622)  (2.0930)  ww s 2121 n  s 2 2 w 2  n  t 1  t 1   / for : n 1   t 2  t 1   / for : n 2   Using t-table with DF=9 and cumm prop=0.975 (let α=0.05) Using t-table with DF=19 and cumm prop=0.975 (let α=0.05)

Since we found the t` (1-α/2) to be equal to 2.255, our critical values will be ± (two-tailed test) Our decision rule is reject H 0 if the computed t is either ≥2.255 or ≤ Calculation of the test statistic: Statistical decision: since  1.41  2.255, we can not reject the H 0. On the basis of these results we can not conclude that the two population means are different. The p value of this test  0.05 t t  (62.6  47.2)  0  (33.8)2(10.1)2(33.8)2(10.1)   1.41

Paired Comparisons Previously we discussed the difference between two population means assuming that the samples were independent. Some times we may want to assess the effectiveness of a treatmentor experimental procedure making use of observations resulting from nonindependent samples. A hypothesis test based on this type of data is called a paired comparison test.

Why do we need paired test?? The objective in paired comparison tests is to eliminate maximum number of sources of extraneous variations by making the pairs similar with respect to as many variables as possible. Not PairedPaired To study the effect of gold nanoparticles in treating tumors, we induce tumor and then target it with gold nanoparticles which serve as “nanoheaters” upon radiation with laser. In “Not Paired” case, we use two groups that one receives gold nanoparticles and the other does not (control). The difference between treated and control may be due simply a difference in external characteristics between the mice in both groups. To eliminate this difference, we can use one group of mice and induce two identical tumors in the same mouse as you see in the picture to the right. Or we can use the same mice with before/after strategy. Example laserlaserNo laser laser No laser

Why do we need paired test?? Related or paired observations may be obtained in a number of ways: – The same subjects may be measured before and after receiving some treatment. – Same subjects with part of their bodies (treatment/control, previous slide) – In comparing two methods of analysis, the material to be analyzed may be divided equally so that one half is analyzed by one method and one half is analyzed by another.

Paired Test Instead of performing the analysis with individual observations, we use d i, the difference between pairs of observations as the variable of interest. When the n sample differences computed from the n pairs of measurements constitute a simple random sample from a normally distributed population of differences, the test statistic for testing hypothesis about the population mean difference μ d is: d   d t  0 S d /n where: d is the mean for sample differences 0  d is the hypothesized population mean differe S d is the standard deviation of the sample differe n is the number of sample differences

Paired Test The t statistic is distributed as Student’s t with n-1 degrees of freedom (this is the general case but not always!!). We do not have to worry about the equality of variances in paired comparisons, since our variable is the difference in the reading of the same subject or object. If the population variance of the difference is known, we can use z-stat (this is not applicable always) If the assumption of normality for the distribution of the differences can not be made, we can use large n and thus use the CLT to justify our use of the z-stat (we approximate σ by the use of sample S)

Example In a study to evaluate the effect of very low calorie diet (VLCD) on the weight of 9 subjects, the following data was collected before (B) and after (A) treatment: The researchers wish to know if these data provide sufficient evidence to allow them to conclude that the treatment is effective in causing weight reduction in those individuals. Assuming that differences between A&B are approximately normally distributed, construct the proper hypothesis and test it (you need to know that this is paired t-test!!!!!)?. B (Kg) A (Kg)

Example We may obtain the differences in one of two ways: by subtracting the before weights from the after weights (A – B) or by subtracting the after weights from the before weights (B – A). If we choose (d i =A – B), the differences are: -34, -25.5, -22.8, -21.4, -23.1, -22.7, -19, -20.5, Assumptions: the observed differences constitute a simple random sample from a normally distributed population of differences with unknown variance (t-test). Hypotheses: H 0 : μ d ≥ 0 H A : μ d  0 (left-tailed test) (indicating weight reduction)

Example Hypotheses (for (d i =A – B)) : H 0 : μ d ≥ 0 H A : μ d  0 (left-tailed test) (indicating weight reduction) NOTE: If we had obtained the differences by subtracting the after weights from the before weights (B – A) our hypotheses would have been: H 0 : μ d ≤ 0 (right-tailed test) H A : μ d > 0 (indicating weight reduction) If the question had been such that a two-tailed test was indicated (any difference/change), the hypotheses would have been: H 0 : μ d = 0 H A : μ d ≠ 0

Example The test statistic: , reject H 0 if the computed t is less than or equal to the critical value. d   d t  0 S d /n Decision rule: Let α=0.05, the critical value of t is d d  di203.3di203.3 n 9n 9   d 2 ss  (d i  d) 2 n 1n 1  t t      Reject H 0, since is in the rejection reg We may conclude that the diet program is effect =-t 1-α =-t 0.95 (n-1=8) α=5% (0.05) t' calc = P-value<0.001 since < see the table H 0 : μ d ≥ 0