chapter-7 hypothesis testing for quantitative variable

Slides:



Advertisements
Similar presentations
Tests of Hypotheses Based on a Single Sample
Advertisements

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.
Statistics Review – Part II Topics: – Hypothesis Testing – Paired Tests – Tests of variability 1.
EPIDEMIOLOGY AND BIOSTATISTICS DEPT Esimating Population Value with Hypothesis Testing.
PSY 307 – Statistics for the Behavioral Sciences
Topic 2: Statistical Concepts and Market Returns
Inferences About Process Quality
Chapter 9 Hypothesis Testing.
Hypothesis Testing Using The One-Sample t-Test
Hypothesis Testing and T-Tests. Hypothesis Tests Related to Differences Copyright © 2009 Pearson Education, Inc. Chapter Tests of Differences One.
Statistical Inference Dr. Mona Hassan Ahmed Prof. of Biostatistics HIPH, Alexandria University.
SIMPLE LINEAR REGRESSION
AM Recitation 2/10/11.
Hypothesis Testing:.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 9 Hypothesis Testing.
Experimental Statistics - week 2
Hypothesis Testing II The Two-Sample Case.
Hypothesis testing – mean differences between populations
Section 10.1 ~ t Distribution for Inferences about a Mean Introduction to Probability and Statistics Ms. Young.
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 tests comparing two means t tests comparing two means.
January 31 and February 3,  Some formulae are presented in this lecture to provide the general mathematical background to the topic or to demonstrate.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 10 Comparing Two Populations or Groups 10.2.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 8 Hypothesis Testing.
1 Chapter 8 Introduction to Hypothesis Testing. 2 Name of the game… Hypothesis testing Statistical method that uses sample data to evaluate a hypothesis.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
© Copyright McGraw-Hill 2004
The t-distribution William Gosset lived from 1876 to 1937 Gosset invented the t -test to handle small samples for quality control in brewing. He wrote.
Statistical Inference Statistical inference is concerned with the use of sample data to make inferences about unknown population parameters. For example,
T tests comparing two means t tests comparing two means.
Learning Objectives After this section, you should be able to: The Practice of Statistics, 5 th Edition1 DESCRIBE the shape, center, and spread of the.
Chapter 7: Hypothesis Testing. Learning Objectives Describe the process of hypothesis testing Correctly state hypotheses Distinguish between one-tailed.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 7 Inferences Concerning Means.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
The Practice of Statistics, 5 th Edition1 Check your pulse! Count your pulse for 15 seconds. Multiply by 4 to get your pulse rate for a minute. Write that.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 10 Comparing Two Populations or Groups 10.2.
Chapter Nine Hypothesis Testing.
HYPOTHESIS TESTING.
Hypothesis Testing: One-Sample Inference
CHAPTER 10 Comparing Two Populations or Groups
Hypothesis Tests l Chapter 7 l 7.1 Developing Null and Alternative
Dependent-Samples t-Test
CHAPTER 9 Testing a Claim
Statistical Quality Control, 7th Edition by Douglas C. Montgomery.
Chapter 9: Inferences Involving One Population
CHAPTER 10 Comparing Two Populations or Groups
Lecture Slides Elementary Statistics Twelfth Edition
Math 4030 – 10a Tests for Population Mean(s)
Comparing Three or More Means
Hypothesis Tests for a Population Mean,
CONCEPTS OF HYPOTHESIS TESTING
Chapter 9 Hypothesis Testing.
STATISTICS INFORMED DECISIONS USING DATA
CHAPTER 9 Testing a Claim
Comparing Populations
CHAPTER 10 Comparing Two Populations or Groups
CHAPTER 10 Comparing Two Populations or Groups
What are their purposes? What kinds?
Reasoning in Psychology Using Statistics
SIMPLE LINEAR REGRESSION
CHAPTER 10 Comparing Two Populations or Groups
Lecture Slides Elementary Statistics Twelfth Edition
CHAPTER 10 Comparing Two Populations or Groups
CHAPTER 9 Testing a Claim
CHAPTER 9 Testing a Claim
Chapter 9 Hypothesis Testing: Single Population
CHAPTER 10 Comparing Two Populations or Groups
Presentation transcript:

chapter-7 hypothesis testing for quantitative variable 2018/12/7

contents introduction Hypothesis testing 2.1 One sample t test 2.2 two independent-samples t test 2.3 Paired-samples t test As a result of this class, you will be able to ... 2018/12/7

Methods1. Compute and compare two population mean directly Hypothesis testing Aim: Is the average English score of students from 2 schools different or same? Methods1. Compute and compare two population mean directly 2018/12/7

Methods 2 Do a sampling study and then do hypothesis testing Aim: Is the average English score of students from 2 schools different or same? Methods 2 Do a sampling study and then do hypothesis testing 2018/12/7

True difference between two population means. Chance (sampling error) The reason that True difference between two population means. Chance (sampling error) So the hypothesis task is to differentiate that the difference between two samples is from the true difference between two population means or from chance. 2018/12/7

SectionⅠ Introduction 2018/12/7 9

“Is the effect of the new drug significant than the old drug?”, The purpose of hypothesis testing is to aid the clinician, researcher, or administrator in reaching a conclusion concerning a population by examining a sample from the population. “Is the effect of the new drug significant than the old drug?”, “which one is better between the two operations? ” “Did the large amounts of advertising describe the benefits of new drugs? ” 2018/12/7

1 What does statistic test do? [EXAMPLE1] General the average height of 7 years old children increases 4cm in one year. Some researcher let 100 of 7 years old children get a bread appended lysine in everyday. After one year the average height of 100 children increases 5cm, and the standard deviation is 2cm. Basing on the data can we think: lysine benefits growth of stature of 7 years old children? 2018/12/7

Suppose =0 Compute T.S Find P-value 2018/12/7

2 Steps of hypothesis testing The statisticians have made a set of steps as fixed as legal procedure, and made some formulas to calculate test statistic (T.S). STEPS 2018/12/7

STEPS P>α P≤α Set up hypothesis and confirm α compute test statistic Find P value P>α P≤α Make conclusion Reject H0, the difference is significant. Don’t reject H0, the difference is not significant 2018/12/7

Put forward null hypothesis and alternative hypothesis  What is null hypothesis? 1. The test is designed to assess the strength of the evidence against Ho. 2. It is denoted by H0 H0:  0 2018/12/7

Put forward null hypothesis and alternative hypothesis  What is alternative hypothesis? (1) It is contradictory to null hypothesis (2) It is denoted by H1 H1: < 0 ,   0 or   0 2018/12/7

Confirm significant level   What is significant level? a probability of rejecting a true null hypothesis denoted by α (alpha) Generally, 0.05. determined by the investigator in advance. 2018/12/7

Determine the appropriate T.S The selection of test statistics is related with many factors, such as the type of variable, research aims and conditions proffered by the sample. 2018/12/7

Find P-value and draw conclusion The mathematician have calculated probability corresponding to every T.S, and listed in some tables. This is the probability that the test statistic would weigh against Ho at least as strongly as it does for these data. 2018/12/7

Find P-value and draw conclusion If P≤α, we reject Ho in favor of H1 at significant level α, We may think that the two populations are different; If P>α, we don`t reject Ho at significant level α. We may think that two populations are same. 2018/12/7

TypeⅠerror versus typeⅡ error in hypothesis testing Because the predictions in H0 and H1 are written so that they are mutually exclusive and all inclusive, we have a situation where one is true and the other is automatically false. when H0 is true ,then H1 is false. If we don’t reject H0,we have done the right thing. If we reject H0 ,we have made a mistake. Type Ⅰ error: Reject H0 when it is true. The probability of type Ⅰ error is   2018/12/7

TypeⅠerror versus typeⅡ error in hypothesis testing when H0 is false ,then H1 is true. If we don’t reject H0 , we have made a mistake. If we reject H0 , we have done the right thing. TypeⅡ error : Don’t reject when it is false. The probability of type Ⅱ error is .  is more difficult to assess because it depends on several factors. 1-  is called the power of the test. 2018/12/7

State of nature H0 is real H0 is false Decision State of nature H0 is real H0 is false Don’t reject H0 Correct decision 1 - α type Ⅱ error (β) Reject H0 type Ⅰ error (α) Test power (1-β) 2018/12/7

Tradeoff between  and  You can not reduce two types error at the same time when n is fixed For fixed n, the lower , the higher . And the higher , the lower    2018/12/7

Two-sided test and one-sided test 1 Two-sided test:Interest in whether m  m0 2 One-sided test:Interest in whether m  m0 , or m  m0 2018/12/7

Comparison of sample mean and population mean μo hypothesis basing on study aim Two-sided One-sided H0 m = m0 H1 m ≠m0 m ≤ m0 m > m0 or m ≥m0 m < m0 2018/12/7 9

H0 H1 Comparison of two sample means m1 = m2 m1 ≠ m2 m 1 ≥ m2 m1 ≤ m2 hypothesis basing on study aim Two-sided One-sided H0 m1 = m2 H1 m1 ≠ m2 m 1 ≥ m2 m1 < m2 m1 ≤ m2 m1 > m2 or 2018/12/7 9

Two-sided test Confidence level Reject region Reject region H0 T.S Rejection region does NOT include critical value. 1 -  a/2 a/2 Not reject region H0 T.S Critical value Critical value 2018/12/7

one-sided test Confidence level Reject region a H0 Critical value T.S Rejection region does NOT include critical value. 1 -  a Not reject region H0 Critical value T.S 2018/12/7

one-sided test Confidence level Reject region a H0 Critical value T.S 1 -  Rejection region does NOT include critical value. a Not reject region H0 Critical value T.S 2018/12/7

Section Ⅱ t-test 2.1 One sample t test 2.2 Two independent-samples t test 2.3 Paired-samples t test 2018/12/7 9

How to do one-sample hypothesis test? yes One sample t test no Does the sample come from normal population? One sample rank sum test

2.1 One sample t test Test statistic Model assumptions of one-sample t-test (1) n≥50 (2) n<50 and the sample comes from normal population. Test statistic 2018/12/7

EXAMPLE1 Generally the average height of 7 years old children in city A increases 4cm in one year. One researcher let 100 children of 7 years old randomly drawn from the city A get a bread appended lysine in everyday. After 1 year the average height of 100 children increases 5cm, and the standard deviation is 2cm. Basing on the data can we think: lysine benefits growth of stature of 7 years old children? 2018/12/7

Solution: Compute T.S df=100-1=99 Ho: μ≤μo H1: μ>μo =0.05 2018/12/7

Find P-value and draw conclusion ∵ t=5>1.660 ∴ P < 0.05 Because P is smaller than α, we reject Ho at the significant level 0.05 in favor of H1 . We can think that lysine benefits growth of stature of 7 years old children. 2018/12/7

Table 2 2018/12/7

one-sided test Confidence level Reject region a H0 1.660 1 -  Rejection region does NOT include critical value. a Not reject region H0 1.660 5 2018/12/7

【exercise 1】25 adult female was chosen randomly from Zhengzhou city in 2010 and the systolic blood pressure was measured by standard methods. To test whether the average of SBP in Zhengzhou city is same with the average level( 126.5mmHg) in China? 2018/12/7

How to do two-samples hypothesis test? Is n larger than 50 in both groups? yes no Do two samples come from normal population? Are two population variances equal? Two-independent samples t test Correction t test Wilcoxon rank sum test 2018/12/7

2.2 two independent-samples t test assumptions The data of two samples must come from normal distribution. Two population variances are equal. Test statistic degree of freedom 2018/12/7

2.2 two independent-samples t test When the assumption of normal distribution is valid while the equality of variance is violated , we should choose correction t test ( test) When the assumption of normal distribution is violated , we should choose rank sum test. 2018/12/7

test 2018/12/7

Example 2 Company officials were concerned about the length of time a particular drug product retained its potency. A random sample, sample 1, of n1=10 bottles of the product was drawn from the production line and analyzed for potency. A second sample, sample 2, of n2=10 bottles was obtained and stored in a regulated environment for a period of one year. Whether the two population mean are different at 0.05 level? Suppose the two samples come from normal population. 2018/12/7

Table 5.1 potency for two samples sample 1 sample 2 10.2 10.6 9.8 9.7 10.5 10.7 9.6 9.5 10.3 10.2 10.1 9.6 10.8 10.0 10.2 9.8 9.8 10.6 10.1 9.9 Calculated : 2018/12/7

Solution : Ho: μ1=μ2 H1: μ1≠μ2 α= 0.05 Compute t t 0.05,18=2.101, so P<. We reject Ho in favor of H1 at level 0.05, then we can think their potencies are different. 2018/12/7

Table 2 2018/12/7

Two-sided test Confidence level Reject region Reject region H0 1 -  Rejection region does NOT include critical value. 1 -  a/2 a/2 Not reject region H0 4.24 -2.101 2.101 2018/12/7

EXAMPLE 2 2018/12/7

H0: Normal H1: Not normal SAMPLE1 normal SAMPLE2 normal 2018/12/7

Result of correction t test Result of t test Tests of equality of variance Result of correction t test 2018/12/7

If 12≠22 12= 22 To test equality of variances? Ho: 12= 22 , H1: 12≠22 =0.05 Compute F Conclusion : find F critical value in table 4. If 12≠22 12= 22 2018/12/7

, so we can think: 12= 22 . we have known: S12 =0.105, n1 =10, Ho: 12= 22 , H1: 12≠22 ,=0.05 Compute F Conclusion : find F critical-value in table 4. , so we can think: 12= 22 . 2018/12/7

EXERCISE 2 Table 1 increase of concentration of Hb in two groups 2018/12/7

Analyze→ Descriptive Statistics→ Explore Dependent list→ y Factor list→group Plots→√Normality plots with tests Continue OK 2018/12/7

Analyze→ Compare means→ Independent- sample T Test Test Variable(s) → y Grouping Variable→group Define Groups→ Group 1: 1; Group 2: 2 Continue OK 2018/12/7

【SPSS】 2018/12/7

【SPSS】 2018/12/7

How to report the result? The data of two samples were adequately normally distributed(Shapiro-Wilk test:P1=0.466;P2=0.482) and two population variances were equal at the significant level 0.10(F=1.345;P=0.261), so two independent samples t test was used(t=4.137; df=18;P=0.001). The results indicated a statistically significant difference between effects of two drugs at two-sided significant level 0.05 and the average increase of concentration of Hb was higher in patients taking the new drug, which could also be observed from the 95% confidence interval of the difference of two population means (3.829, 11.731). 2018/12/7

How to report the result? 2018/12/7

Does the difference of paired-samples come from normal population? How to do paired-samples hypothesis test? n is the number of pairs n>50? yes Paired-samples t test no Does the difference of paired-samples come from normal population? rank sum test

2.3 Paired-samples t test Test statistic Model assumptions The differences among each paired-samples must come from normal distribution population. Test statistic numbers of pairs 2018/12/7

d: difference between each pair; : sample mean of difference; New concepts: d: difference between each pair; : sample mean of difference; Sd: sample standard deviation of difference; n: number of pairs of sample. 2018/12/7

2.3 Paired-samples t test When the assumption of normal distribution of difference is violated, we should make data transformation or choose rank sum test. 2018/12/7

There are two forms in paired t-test: 1 The study objects are matched by certain conditions (the same weights 、the same age or the same sex). Then the two study objects of each pair are assigned randomly to different groups. 2 One study objects receive two different disposals.The aim is to infer whether there is difference between the effect of two disposals. 2018/12/7

randomization pair 20 rabbits Treat 1 10 rabbits ! “ # $ % & ‘ ( ) * 2018/12/7

While analyzing paired data, the differences between each paired are more important than the raw data. The aim is to compare whether the efficiency of two factors is different. 2018/12/7

Example 3 Insurance adjusters are concerned about the high estimates they are receiving from garage 1 for auto repairs compared to garage 2. To verify their suspicions, that is, the mean repair estimate for garage 1 is greater than that for garage 2, each of 15 cars recently involved an accident was taken to both garages for separate estimates of repair costs. Is true their suspicions? 2018/12/7

Table 3 Repair estimates(in hundreds of dollars) car Garage 1 Garage 2 Difference(d) d2 1 7.6 7.3 0.3 0.09 2 10.2 9.1 1.1 1.21 3 9.5 8.4 4 1.3 1.5 -0.2 0.04 5 3.0 2.7 6 6.3 5.8 0.5 0.25 7 5.3 4.9 0.4 0.16 8 6.2 0.9 0.81 9 2.2 2.0 0.2 10 4.8 4.2 0.6 0.36 11 11.3 11.0 12 12.1 13 6.9 6.1 0.8 0.64 14 6.7 15 7.5 Totals 2018/12/7

Solution: This is comparison of paired data, so we should use paired-samples t test. 2018/12/7

Population mean of difference 1 Set up the hypothesis and confirm α Ho: µd= 0 H1: µd > 0 α= 0.05 2 Compute t Population mean of difference 2018/12/7

3 Confirm p-value and draw conclusion df =14, t = 6.0, t(14, 0.05)=1.761 so P < 0.05 We reject Ho in favor of H1 at level 0.05. We believe that the suspicions of the insurance adjusters are true, that is, the mean repair estimate for garage 1 is greater than garage 2 2018/12/7

Table 2 2018/12/7

EXAMPLE 3 2018/12/7

Compute difference of each pairs Normality tests of difference 2018/12/7

Normal 2018/12/7

Analyze→ Compare means→ one sample t Test Test Variables →difference Method1 Analyze→ Compare means→ one sample t Test Test Variables →difference Test value → 0 OK 2018/12/7

2018/12/7

Analyze→ Compare means→ paired-samples t Test Method 2 Analyze→ Compare means→ paired-samples t Test Paired Variables→garage1-garage2 OK 2018/12/7

2018/12/7

Exercise One doctor want to explore whether the height of adult males is higher than that of the adult females. He chose randomly 64 males and 49 females and measured their heights one by one. The outcome are as follows Question: Is the height of adult males higher than that of the adult females. 2018/12/7

2018/12/7

To test homogeneity of two population variances Ho: 12= 22 , H1: 12≠22 =0.05 Compute F Conclusion : not significant, we can think the two population variance are same 2018/12/7

Solution : Ho: μ1≤μ2 H1: μ1>μ2 α= 0.05 Compute t P<. We reject Ho in favor of H1 at level 0.05, then we can think height of adult males higher than that of the adult females. 2018/12/7

Thanks for your attention! 2018/12/7