Two Sample Tests Nutan S. Mishra Department of Mathematics and Statistics University of South Alabama.

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

Statistics Review – Part II Topics: – Hypothesis Testing – Paired Tests – Tests of variability 1.
Testing Hypothesis Nutan S. Mishra Department of Mathematics and Statistics University of South Alabama.
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Copyright ©2011 Brooks/Cole, Cengage Learning Testing Hypotheses about Means Chapter 13.
Analysis and Interpretation Inferential Statistics ANOVA
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
PSY 307 – Statistics for the Behavioral Sciences
Lecture 8 PY 427 Statistics 1 Fall 2006 Kin Ching Kong, Ph.D
1/55 EF 507 QUANTITATIVE METHODS FOR ECONOMICS AND FINANCE FALL 2008 Chapter 10 Hypothesis Testing.
BCOR 1020 Business Statistics
Chapter Goals After completing this chapter, you should be able to:
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap 9-1 Introduction to Statistics Chapter 10 Estimation and Hypothesis.
Hypothesis test with t – Exercise 1 Step 1: State the hypotheses H 0 :  = 50H 1 = 50 Step 2: Locate critical region 2 tail test,  =.05, df = =24.
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.
ESTIMATION AND HYPOTHESIS TESTING: TWO POPULATIONS
CHAPTER 10 ESTIMATION AND HYPOTHESIS TESTING: TWO POPULATIONS Prem Mann, Introductory Statistics, 7/E Copyright © 2010 John Wiley & Sons. All right reserved.
Getting Started with Hypothesis Testing The Single Sample.
Hypothesis Testing.
Hypothesis Testing and T-Tests. Hypothesis Tests Related to Differences Copyright © 2009 Pearson Education, Inc. Chapter Tests of Differences One.
Two Sample Tests Ho Ho Ha Ha TEST FOR EQUAL VARIANCES
Hypothesis Testing with Two Samples
Week 9 Chapter 9 - Hypothesis Testing II: The Two-Sample Case.
Fundamentals of Hypothesis Testing: One-Sample Tests
Hypothesis testing – mean differences between populations
Section #4 October 30 th Old: Review the Midterm & old concepts 1.New: Case II t-Tests (Chapter 11)
Copyright © Cengage Learning. All rights reserved. 13 Linear Correlation and Regression Analysis.
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.
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.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Comparing Two Population Means
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 8 Estimation Nutan S. Mishra Department of Mathematics and Statistics University of South Alabama.
Hypothesis Testing. Steps for Hypothesis Testing Fig Draw Marketing Research Conclusion Formulate H 0 and H 1 Select Appropriate Test Choose Level.
Chapter 9 Hypothesis Testing and Estimation for Two Population Parameters.
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.
Chapter 9 Testing the Difference Between Two Means, Two Proportions, and Two Variances Copyright © 2012 The McGraw-Hill Companies, Inc. Permission required.
One-sample In the previous cases we had one sample and were comparing its mean to a hypothesized population mean However in many situations we will use.
Pengujian Hipotesis Dua Populasi By. Nurvita Arumsari, Ssi, MSi.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
Chapter 12 Tests of a Single Mean When σ is Unknown.
A Course In Business Statistics 4th © 2006 Prentice-Hall, Inc. Chap 9-1 A Course In Business Statistics 4 th Edition Chapter 9 Estimation and Hypothesis.
1 Lecture note 4 Hypothesis Testing Significant Difference ©
Large sample CI for μ Small sample CI for μ Large sample CI for p
Guidelines to problems chapter 9 Nutan S. Mishra Department of mathematics and Statistics University of South Alabama.
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.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
© Copyright McGraw-Hill 2004
We’ve learned: 1) Hypothesis testing for population mean when population variance is known ( Z-test ) ( large sample size or assume population is normal.
Hypothesis Testing with TWO Samples. Section 8.1.
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.
Lecture 8 Estimation and Hypothesis Testing for Two Population Parameters.
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)
Hypothesis Testing with TWO Samples. Section 8.1.
Hypothesis Testing. Steps for Hypothesis Testing Fig Draw Marketing Research Conclusion Formulate H 0 and H 1 Select Appropriate Test Choose Level.
Hypothesis Testing. Steps for Hypothesis Testing Fig Draw Marketing Research Conclusion Formulate H 0 and H 1 Select Appropriate Test Choose Level.
Two-Sample Hypothesis Testing
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
Estimation & Hypothesis Testing for Two Population Parameters
Hypothesis Testing: Hypotheses
Chapter 9 Hypothesis Testing.
Elementary Statistics
ESTIMATION AND HYPOTHESIS TESTING: TWO POPULATIONS
What are their purposes? What kinds?
Hypothesis Testing: The Difference Between Two Population Means
Chapter Outline Inferences About the Difference Between Two Population Means: s 1 and s 2 Known.
Presentation transcript:

Two Sample Tests Nutan S. Mishra Department of Mathematics and Statistics University of South Alabama

Points to ponder µ 1 =µ 2 can be rewritten as µ 1 -µ 2 =0 µ 1 < µ 2 can be rewritten as µ 1 -µ 2 < 0 µ 1 > µ 2 can be rewritten as µ 1 - µ 2 > 0 Equivalent values in decimalpercentage.011%.055%.1010% %

Description of the problem There are two populations  1 and  2 Parameters of  1 are (µ 1,σ 1 ) and that of  2 are (µ 2,σ 2 ) We want to compare the average performances of these two populations. That is we want to test if µ 1 =µ 2 In other words-- to test if µ 1 -µ 2 =0

Description of the problem Recall that at this point the true values of µ 1 and µ 2 are unknown. But we are not interested in knowing the absolute values of µ 1 and µ 2 We are interested in estimating and testing about the difference between the two namely µ 1 -µ 2 In order to conduct this test of hypothesis we collect two samples of size n 1 and n 2. Samples collected may be dependent or independent.

Dependent samples Dependent samples : selection of one sample affects the selection of the other. Example: collecting data on length of sleep hours of insomnia patients before and after certain medication. First sample consists of values (3.2, 4.5, 4.5, 4.7) and the second samples consists of values (4.8, 5.3, 4.2, 4.7) Note that both samples are of same size n 1 = n 2 Patient’s name Before medication (sample I) After medication (sample 2) P P P P44.7

Independent samples Selection of one sample is independent of the other. Example: collecting data on emission of harmful gases from the vehicles in the state of California and in the state of Alabama Sample S1 consists of emission data on n 1 vehicles from the state of California Sample S2 consists emission data on n 2 vehicles from the state of Alabama. n 1 may or may not be equal to n 2 We may collect a sample of 100 vehicles from one state and a sample of 85 vehicles from the other.

Testing of hypothesis We will discuss them as different cases as follows Two samples Independent Large samples Small samples Dependent We mostly discuss the small samples Formulae may be applied to large sample cases as well

Testing hypothesis about difference of means There are two populations  1 and  2 Parameters of  1 are (µ 1,σ 1 ) and that of  2 are (µ 2,σ 2 ) Sample statistics are (n 1,, s 1 ) and (n 2,, s 2 ) To test H0: µ 1 =µ 2 equivalently H0: µ 1 -µ 2 =0 The point estimator for µ 1 -µ 2 is The test statistic would be When σ 1 2 and σ 2 2 are unknown we replace them by their point estimators namely s 1 2 and s 2 2 and the test statistic becomes

Exercise X= hotel room rate per day in united states  1: all such room rates in 2000 (parameters (µ 1,σ 1 ) )  2 : all such room rates in 2001 ( parameters (µ 2,σ 2 )) To test H0: µ 1 =µ 2 Vs H1: µ 1 > µ 2 equivalently we want To test H0: µ 1 - µ 2 =0 Vs H1: µ 1 - µ 2 > 0 To test these hypotheses, two samples are collected from the respective populations with the following statistics: Sample S1 (from first population) = ( n 1 = 1000, = 85.69, s 1 = 18.50) Sample S2(from second population= ( n 2 = 1100, = s 2 = 18.00) The statistic would be It’s a right tailed hypothesis thus the p-value corresponding to z = 1.39 (from normal table ) is.0823 Since p-value >.01 ( which is given LOS) we decide not to reject H0 And conclude that at 1% LOS, the data supports the null hypothesis, that is room rates in 2000 and 2001 were not significantly different.

Two small independent samples There are two populations  1 and  2 Parameters of  1 are (µ 1,σ 1 ) and that of  2 are (µ 2,σ 2 ) Sample statistics are (n 1,, s 1 ) and (n 2,, s 2 ) To test H0: µ 1 =µ 2 equivalently H0: µ 1 -µ 2 =0 The point estimator for µ 1 -µ 2 is For small n1 and (or) n2, the test statistic is developed under following assumptions –Both populations are approximately normal –The population variances for both populations are unknown and EQUAL σ 1 = σ 2 ( say both of them equal to σ which is unknown) If these conditions are fulfilled then we can estimate the common unknown parameter σ by pooling the information (that is data coming from both samples) and call that estimate as pooled estimate of σ

Two small independent samples Now we define the test statistic under the two above conditions

Exercise 10.28(b)  1 : male customers at a supermarket  2: female customers at the same super market. X F = amount spent by a female customer. X M = amount spent by a male customer µ M : average amount spent by all the male customers ( value is unknown) µ F : average amount spent by all the female customers (value is unknown) σ M : population standard deviation of male population spending ( value is unknown) σ F : population standard deviation of female population spending ( value is unknown) Assumptions: 1. X M and X F have normal distribution. 2. σ M = σ F (both are unknown) let us say σ M = σ F =σ To test H0: µ M =µ F Vs H1: µ M < µ F in other words To test H0: µ M -µ F =0 Vs H1: µ M -µ F < 0

Exercise 10.28(b) (continued) Two samples are collected, one from each population. Information from samples: n M = 25 ( a sample of 25 males) = $80 average spending by 25 males s M = $17.50 sample standard deviation of spending of 25 males n F = 20 ( a sample of 20 females) = $96 average spending by 20 females s F = $14.40 sample standard deviation of spending of 20 females Now since both the samples are small, under the two assumptions above, the test statistic would be.

Exercise 10.28(b) (continued) Value of t-test statistic would be To compute s p Plugging in the value of Sp in the above formula we get the t-value as at 5% LOS the value of t at 43 d.f. is (from table) = Since the alternative is left sided, our critical region lies in the left tail and the critical value is – Comparing is the test statistic with the critical value, we see that test statistics falls in the rejection region

Exercise 10.28(b) (continued) Thus we make a decision to reject the H0 at 5% Level of significance Conclusion: We conclude that at 5% LOS, the sample data does not support the null hypothesis, this implies that the average spending by male customers is significantly lower than average spending by female customers.

Paired t-test Designed to compare the averages of two populations when two samples drawn are dependent ( or matched samples or paired samples). Here the population consists of same members (or objects or items) We collect two observations on each member of the population– before the treatment and after the treatment. Thus we generate two samples. X 1 : observation before the treatment X 2 : observation after the treatment d= difference in the measurement = x 2 -x 1 d is a new random variable with µ d = average of all the differences σ d = standard deviation of all d-values in the population = mean of the d-values from the two samples each of size n s d = sample standard deviation of all d-values obtained from the two samples To test the hypothesis H0 : µ d = 0 vs H1: µ d or ≠ 0 Under the assumption that population of all d-values is approximately normal, the test statistics is

Paired t-test (continued) The test statistics

Exercise 10.55(b) X1 : self confidence score before attending the course (scale 1-15) X2: self confidence score after attending the course (scale 1-15) d= x 2 -x 1 = change in the confidence score after attending the course H0: µ d = 0 vs H1: µ d > 0 = , s d = test statistic Now since alternative hypothesis is right sided, the critical region lies on the right side of the t-curve. The critical value of t at 1% LOS is = Comparing the critical value with test statistic, we observe that test statistic falls in non rejection region thus we make a decision not to reject null at 1% LOS since at 1% LOS sample data supports the null, we conclude that the course is not much effective as far as improvement in the confidence scores is concerned. Before x1After x2d