Comparison of two samples

Slides:



Advertisements
Similar presentations
Chapter 10: The t Test For Two Independent Samples
Advertisements

Fdist1 TESTING THE EQUALITY OF TWO VARIANCES: THE F TEST Application test assumption of equal variances that was made in using the t-test interest in actually.
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 9 Inferences Based on Two Samples.
Statistics Review – Part II Topics: – Hypothesis Testing – Paired Tests – Tests of variability 1.
BPS - 5th Ed. Chapter 241 One-Way Analysis of Variance: Comparing Several Means.
Hypothesis Testing Steps in Hypothesis Testing:
Testing means, part III The two-sample t-test. Sample Null hypothesis The population mean is equal to  o One-sample t-test Test statistic Null distribution.
PSY 307 – Statistics for the Behavioral Sciences
Independent Sample T-test Formula
Analysis of Variance: Inferences about 2 or More Means
Lecture 8 PY 427 Statistics 1 Fall 2006 Kin Ching Kong, Ph.D
Hypothesis Testing Comparisons Among Two Samples.
Intro to Statistics for the Behavioral Sciences PSYC 1900
Probability & Statistics for Engineers & Scientists, by Walpole, Myers, Myers & Ye ~ Chapter 10 Notes Class notes for ISE 201 San Jose State University.
Testing for differences between 2 means Does the mean weight of cats in Toledo differ from the mean weight of cats in Cleveland? Do the mean quiz scores.
One-way Between Groups Analysis of Variance
Inferences About Process Quality
5-3 Inference on the Means of Two Populations, Variances Unknown
Chapter 9: Introduction to the t statistic
AM Recitation 2/10/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.
1 1 Slide © 2006 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 Slide © 2005 Thomson/South-Western Chapter 13, Part A Analysis of Variance and Experimental Design n Introduction to Analysis of Variance n Analysis.
- Interfering factors in the comparison of two sample means using unpaired samples may inflate the pooled estimate of variance of test results. - It is.
COURSE: JUST 3900 TIPS FOR APLIA Developed By: Ethan Cooper (Lead Tutor) John Lohman Michael Mattocks Aubrey Urwick Chapter : 10 Independent Samples t.
Hypothesis Testing for Variance and Standard Deviation
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 9 Inferences Based on Two Samples.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
1 Chapter 13 Analysis of Variance. 2 Chapter Outline  An introduction to experimental design and analysis of variance  Analysis of Variance and the.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Section Inference about Two Means: Independent Samples 11.3.
One-Way ANOVA ANOVA = Analysis of Variance This is a technique used to analyze the results of an experiment when you have more than two groups.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Comparing k Populations Means – One way Analysis of Variance (ANOVA)
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Copyright (C) 2002 Houghton Mifflin Company. All rights reserved. 1 Understandable Statistics S eventh Edition By Brase and Brase Prepared by: Lynn Smith.
1 URBDP 591 A Lecture 12: Statistical Inference Objectives Sampling Distribution Principles of Hypothesis Testing Statistical Significance.
© Copyright McGraw-Hill 2004
- We have samples for each of two conditions. We provide an answer for “Are the two sample means significantly different from each other, or could both.
Econ 3790: Business and Economic Statistics Instructor: Yogesh Uppal
6.3 One- and Two- Sample Inferences for Means. If σ is unknown Estimate σ by sample standard deviation s The estimated standard error of the mean will.
 List the characteristics of the F distribution.  Conduct a test of hypothesis to determine whether the variances of two populations are equal.  Discuss.
Chapter 10: The t Test For Two Independent Samples.
CHI SQUARE DISTRIBUTION. The Chi-Square (  2 ) Distribution The chi-square distribution is the probability distribution of the sum of several independent,
Chapter 13 Analysis of Variance (ANOVA). ANOVA can be used to test for differences between three or more means. The hypotheses for an ANOVA are always:
Virtual University of Pakistan
Hypothesis Testing – Two Population Variances
Chapter 10 Two-Sample Tests and One-Way ANOVA.
Testing the Difference between Means and Variances
University of Palestine
Analysis of variance ANOVA.
Two-Sample Hypothesis Testing
i) Two way ANOVA without replication
Basic Practice of Statistics - 5th Edition
Hypothesis testing using contrasts
Two Sample Tests When do use independent
Econ 3790: Business and Economic Statistics
Hypothesis Tests for a Population Mean in Practice
Chapter 9 Hypothesis Testing.
Chapter 8 Section 8.5 Testing µ1 - µ2 and p1 - p2 Independent Samples Hypothesis Testing Mr. zboril | Milford PEP.
Reasoning in Psychology Using Statistics
Reasoning in Psychology Using Statistics
Chapter 10: The t Test For Two Independent Samples
Reasoning in Psychology Using Statistics
Homogeneity of Variance
What are their purposes? What kinds?
Hypothesis Testing: The Difference Between Two Population Means
Chapter 10 – Part II Analysis of Variance
Introduction to the t Test
Statistical Inference for the Mean: t-test
Presentation transcript:

Comparison of two samples F-test a two-sample t-test (both tests assume data normality)

I have two samples and I want to know, if they differ from each other Ten plants have been watered with normal water and ten with water enriched with nutrients and after one year I investigate their weight (or number of stomata on leaves) I have x individual of one species and y individuals of the other one and I want to know, if their pistil lengths differ from each other

I have two solutions The samples (their parent population/distribution) can differ from each other either in variance or in mean or in both... Even two samples of one population will differ both in variance and in mean. Thus I am interested in, if the two samples differ so much, that it is improbable to be taken from the same population.

F-test - test of homogenity of variance H0: 12 = 22, alternative HA: 12  22 We suppose numerator d.f. denominator Critical value for test on 5% is thus 97.5% quantile, or

I have to multiply value of this area by two to obtain P-value “Probability”.

Critical value – depends on two degrees of freedom Example: Two-way test for variance ratio for hypothesis & Data represent numbers of moths captured during one night by eleven traps of type 1 or by eight traps of type 2. Type 1 trap Type 2 trap moth2 moth2 moth2 moth2 Critical value – depends on two degrees of freedom Thus we don’t refuse H0.

If I conclude that variances don’t differ from each other, I can compute pooled variance For moths sp2=(218.73 + 107.50) / (10 + 7) = 19.19 moth2.

But we compare means more often than variances We test null hypothesis H0: 1 = 2 against alternative one HA: 1  2. Classic t-test Mean difference Standard error of mean difference

Standard error of mean difference is computed with help of collective variance s2p I suppose homogeneity of variances Resulting formula is then

Assumptions of t-test are Data normality homogeneity of variances

Take notice value of standard error decreases (and power of test increases) with number of observations in groups; if we have constant total number of observations, then the error is smallest if the groups are of the same size.

Number of degrees of freedom is sum of degrees of freedom for both samples, thus (n1-1) + (n2-1) = n1 + n2 - 2.

Two-sample t-test for two-tailed hypothesis H0: 1 = 2 and HA: 1  2 (which can also be written as H0: 1 - 2 = 0 a HA: 1 - 2  0). Data are times of sedimentation (in minutes) for human blood after vaccination of two different medicines (B, G). Medicine B vaccinated: 8.8, 8.4, 7.9, 8.7, 9.1, 9.6 Medicine G vaccinated: 9.9, 9.0, 11.1, 9.6, 8.7, 10.4, 9.5 n1 = 6 n2 = 7 df1 = 5 df2 = 6 X1= 8.75 min X2 = 9.74 min SS1= 1.6950 min SS2 = 4.0171 min sp2 = 0.5193 min2 t0.05(2),=t0.05(2),11 = 2.201 Thus we reject H0. 0.02 < P(t  2.475) < 0.05

Nowadays we better find area of “tail” and (because it is two-tailed test), we multiply the result by 2. This area size is 0.0154 – it means that P=0.0308

If homogeneity of variances is disturbed, Welch approximate t can be used Several other approximations exist with approximate number of degrees of freedom

The same number of observations in both groups is not assumption for t-test But test robustness against violation of homogeneity of variance is decreasing with very imbalanced numbers of observations (and test for homogeneity will be desperately weak) Power of the test is decreasing with imbalanced group sizes too

Violation of data normality Group means and not original values are in the t-test formula – so, the means are expected to have the normal distribution Central limit theorem – they will, if they are based on great number of observations With increasing number of observations increases not only power of test, but also robustness to violation of normality [comp. with normality tests!]

Similar for one-sample t-test, even here can we execute the one-tailed test Two-tailed test – I test null hypothesis H0: 1 = 2 against alternative HA: 1  2. One-tailed test – I test null hypothesis H0: 1 > 2 against alternative HA: 1 < 2 (or vice versa)

MAKE DIFFERENCE test one-tailed – two-tailed – how null hypothesis is formulated one-sample t-test and two-sample (pair) one – how is experimental or observation set-up