Two-sample t-tests.

Slides:



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

Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
PSY 307 – Statistics for the Behavioral Sciences
Independent Samples and Paired Samples t-tests PSY440 June 24, 2008.
Chapter 9 - Lecture 2 Computing the analysis of variance for simple experiments (single factor, unrelated groups experiments).
Chapter 10 The t Test for Two Independent Samples PSY295 Spring 2003 Summerfelt.
The t-test Inferences about Population Means when population SD is unknown.
Inferential Statistics
Chapter 12 Inferential Statistics Gay, Mills, and Airasian
Review As sample size increases, the distribution of sample means A.Becomes wider and more normally shaped B.Becomes narrower and more normally shaped.
Review A.Null hypothesis, critical value, alpha, test statistic B.Alternative hypothesis, critical region, p-value, independent variable C.Null hypothesis,
Psy B07 Chapter 1Slide 1 ANALYSIS OF VARIANCE. Psy B07 Chapter 1Slide 2 t-test refresher  In chapter 7 we talked about analyses that could be conducted.
Statistics for the Behavioral Sciences Second Edition Chapter 11: The Independent-Samples t Test iClicker Questions Copyright © 2012 by Worth Publishers.
User Study Evaluation Human-Computer Interaction.
Testing Hypotheses about Differences among Several Means.
Chapter 14 – 1 Chapter 14: Analysis of Variance Understanding Analysis of Variance The Structure of Hypothesis Testing with ANOVA Decomposition of SST.
Introduction to the t Test Part 1: One-sample t test
Chapter 10 The t Test for Two Independent Samples
Statistics for Political Science Levin and Fox Chapter Seven
Chapter 10 Section 5 Chi-squared Test for a Variance or Standard Deviation.
CHAPTER 10: ANALYSIS OF VARIANCE(ANOVA) Leon-Guerrero and Frankfort-Nachmias, Essentials of Statistics for a Diverse Society.
Dependent-Samples t-Test
Psych 231: Research Methods in Psychology
Hypothesis Testing.
Two-sample t-tests 10/16.
Independent-Samples t-test
Independent-Samples t-test
Independent-Samples t-test
INF397C Introduction to Research in Information Studies Spring, Day 12
Review Ordering company jackets, different men’s and women’s styles, but HR only has database of employee heights. How to divide people so only 5% of.
Review Measure testosterone level in rats; test whether it predicts aggressive behavior. What would make this an experiment? Randomly choose which rats.
Math 4030 – 10b Inferences Concerning Variances: Hypothesis Testing
Basic t-test 10/6.
Review You run a t-test and get a result of t = 0.5. What is your conclusion? Reject the null hypothesis because t is bigger than expected by chance Reject.
Inferential Statistics
Hypothesis Testing Review
Two Sample Tests When do use independent
Review Nine men and nine women are tested for their memory of a list of abstract nouns. The mean scores are Mmale = 15 and Mfemale = 17. The mean square.
Review Guppies can swim an average of 8 mph, with a standard deviation of 2 mph You measure 100 guppies and compute their mean What is the standard error.
Central Limit Theorem, z-tests, & t-tests
Inferential Statistics
Review of Chapter 11 Comparison of Two Populations
Statistics for the Social Sciences
Sections 6-4 & 7-5 Estimation and Inferences Variation
Reasoning in Psychology Using Statistics
Reasoning in Psychology Using Statistics
I. Statistical Tests: Why do we use them? What do they involve?
Statistics for the Social Sciences
Reasoning in Psychology Using Statistics
Statistics for the Social Sciences
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Reasoning in Psychology Using Statistics
Psych 231: Research Methods in Psychology
Statistics for the Social Sciences
What are their purposes? What kinds?
Reasoning in Psychology Using Statistics
Inferential Statistics
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Facts from figures Having obtained the results of an investigation, a scientist is faced with the prospect of trying to interpret them. In some cases the.
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Psych 231: Research Methods in Psychology
Reasoning in Psychology Using Statistics
Chapter 9 Test for Independent Means Between-Subjects Design
Presentation transcript:

Two-sample t-tests

+14 M = 14 Flood M = -36.3 -27 -41

Independent-samples t-test Often interested in whether two groups have same mean Experimental vs. control conditions Comparing learning procedures, with vs. without drug, lesions, etc. Men vs. women, depressed vs. not Comparison of two separate populations Population A, sample A of size nA, mean MA estimates mA Population B, sample B of size nB, mean MB estimates mB mA = mB? Example: maze times Rats without hippocampus: Sample A = [37, 31, 27, 46, 33] With hippocampus: Sample B = [43, 26, 35, 31, 28] MA = 34.8, MB = 32.6 Is difference reliable? mA > mB? Null hypothesis: mA = mB No assumptions of what each is (e.g., mA = 10, mB= 10) Alternative Hypothesis: mA ≠ mB

Finding a Test Statistic Goal: Define a test statistic for deciding mA = mB vs. mA ≠ mB Constraints (apply to all hypothesis testing): Must be function of data (both samples) Sampling distribution must be fully determined by H0 Can only assume mA = mB Can’t depend on mA or mB separately, or on s Alternative hypothesis should predict extreme values Statistic should measure deviation from mA = mB so that if mA ≠ mB, we’ll be able to reject H0 Answer (preview): Based on MA – MB (just like M – m0 for one-sample t-test) . (MA – MB) has Normal distribution Standard error has (modified) chi-square distribution Ratio has t distribution

Likelihood Function for MA – MB Central Limit Theorem Distribution of MA – MB Subtract the means: E(MA – MB) = E(MA) – E(MB) = m – m = 0 Add the variances: . Just divide by standard error? Same problem as before: We don’t know s Need to estimate from data

Estimating s Already know best estimator for one sample Could just use one sample or the other sA or sB Works, but not best use of the data Combining sA and sB Both come from averages of (X – M)2 Average them all together: Degrees of freedom (nA – 1) + (nB – 1) = nA + nB – 2

Independent-Samples t Statistic Difference between sample means Typical difference expected by chance Variance of MA – MB Estimate of s2 Variance from MA Variance from MB Sum of squared deviations Degrees of freedom Mean Square; estimates s2

Steps of Independent Samples t-test State clearly the two hypotheses Determine null and alternative hypotheses H0: mA = mB H1: mA ≠ mB Compute the test statistic t from the data . Difference between sample means, divided by standard error Determine likelihood function for test statistic according to H0 t distribution with nA + nB – 2 degrees of freedom Choose alpha level Find critical value 7a. t beyond tcrit: Reject null hypothesis, mA ≠ mB 7b. t within tcrit: Retain null hypothesis, mA = mB

Example Rats without hippocampus: Sample A = [37, 31, 27, 46, 33] With hippocampus: Sample B = [43, 26, 35, 31, 28] MA = 34.8, MB = 32.6, MA – MB = 2.2 df = nA + nB – 2 = 5 + 5 – 2 = 8 t8 tcrit = 1.86 X X-MA (X-MA)2 37 2.2 4.84 31 -3.8 14.44 27 -7.8 60.84 46 11.2 125.44 33 -1.8 3.24 SA(X-MA)2 = 208.80 X X-MB (X-MB)2 43 10.4 108.16 26 -6.6 43.56 35 2.4 5.76 31 -1.6 2.56 28 -4.6 21.16 SB(X-MB)2 = 181.20

Mean Squares Average of squared deviations Used for estimating variance Population Population variance, s2 Sample Sample variance, s2 Estimates s2 Two samples Also estimates s2

Degrees of Freedom Applies to any sum-of-squares type formula Tells how many numbers are really being added n = 2: only one number In general: one number determined by the rest Every statistic in formula that’s based on X removes 1 df M, MA, MB Algebraically rewriting formula in terms of only X results in fewer summands I will always tell you the rule for df for each formula To get Mean Square, divide sum of squares by df Sampling distribution of a statistic depends on its degrees of freedom c2, t, F X X – M (X – M)2 3 -2 4 7 2

Independent vs. Paired Samples Independent-samples t-test assumes no relation between Sample A and Sample B Unrelated subjects, randomly assigned Necessary for standard error of (MA – MB) to be correct Sometimes samples are paired Each score in Sample A goes with a score in Sample B Before vs. after, husband vs. wife, matched controls Paired-samples t-test

Paired-samples t-test Data are pairs of scores, (XA, XB) Form two samples, XA and XB Samples are not independent Same null hypothesis as with independent samples mA = mB Equivalent to mean(XA – XB) = 0 Approach Compute difference scores, Xdiff = XA – XB One-sample t-test on difference scores, with m0 = 0

Example Breath holding underwater vs. on land 8 subjects Water: XA = [54, 98, 67, 143, 82, 91, 129, 112] Land: XB = [52, 94, 69, 139, 79, 86, 130, 110] Difference: Xdiff = [2, 4, -2, 4, 3, 5, -1, 2] Critical value > qt(.025,7,lower.tail=FALSE) [1] 2.364624 Reliably longer underwater Mean: Mean Square: Standard Error: Test Statistic:

Comparison of t-tests Samples Data t Standard Error Mean Square df One X n - 1 2-Indep. XA, XB nA + nB – 2 2-Paired Xdiff = XA - XB