Paired-Sample Hypotheses -Two sample t-test assumes samples are independent -Means that no datum in sample 1 in any way associated with any specific datum.

Slides:



Advertisements
Similar presentations
Psych 5500/6500 t Test for Two Independent Groups: Power Fall, 2008.
Advertisements

Lecture (11,12) Parameter Estimation of PDF and Fitting a Distribution Function.
PTP 560 Research Methods Week 9 Thomas Ruediger, PT.
Hypothesis test flow chart frequency data Measurement scale number of variables 1 basic χ 2 test (19.5) Table I χ 2 test for independence (19.9) Table.
T-Tests.
t-Tests Overview of t-Tests How a t-Test Works How a t-Test Works Single-Sample t Single-Sample t Independent Samples t Independent Samples t Paired.
T-Tests.
Business 205. Review Sampling Continuous Random Variables Central Limit Theorem Z-test.
PSY 307 – Statistics for the Behavioral Sciences
The Normal Distribution. n = 20,290  =  = Population.
Sample size computations Petter Mostad
Chapter 14 Conducting & Reading Research Baumgartner et al Chapter 14 Inferential Data Analysis.
ANalysis Of VAriance (ANOVA) Comparing > 2 means Frequently applied to experimental data Why not do multiple t-tests? If you want to test H 0 : m 1 = m.
Independent Samples and Paired Samples t-tests PSY440 June 24, 2008.
Comparing Two Samples: Part II
Lecture 9: One Way ANOVA Between Subjects
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.
Statistical Methods in Computer Science Hypothesis Testing I: Treatment experiment designs Ido Dagan.
Lecture 7 PY 427 Statistics 1 Fall 2006 Kin Ching Kong, Ph.D
Chapter 9 Hypothesis Testing.
Statistical Methods in Computer Science Hypothesis Testing I: Treatment experiment designs Ido Dagan.
Intro to Statistics for the Behavioral Sciences PSYC 1900 Lecture 11: Power.
Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests.
5-3 Inference on the Means of Two Populations, Variances Unknown
Statistical Methods in Computer Science Hypothesis Testing II: Single-Factor Experiments Ido Dagan.
Hypothesis Testing and T-Tests. Hypothesis Tests Related to Differences Copyright © 2009 Pearson Education, Inc. Chapter Tests of Differences One.
INFERENTIAL STATISTICS – Samples are only estimates of the population – Sample statistics will be slightly off from the true values of its population’s.
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.
AM Recitation 2/10/11.
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
Inferential Statistics: SPSS
Hypothesis Testing:.
Hypothesis Testing.
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.
8 - 1 © 2003 Pearson Prentice Hall Chi-Square (  2 ) Test of Variance.
1/2555 สมศักดิ์ ศิวดำรงพงศ์
Comparing Means From Two Sets of Data
T-distribution & comparison of means Z as test statistic Use a Z-statistic only if you know the population standard deviation (σ). Z-statistic converts.
Statistical Power The ability to find a difference when one really exists.
RMTD 404 Lecture 8. 2 Power Recall what you learned about statistical errors in Chapter 4: Type I Error: Finding a difference when there is no true difference.
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.
Overview Two paired samples: Within-Subject Designs
T-TEST Statistics The t test is used to compare to groups to answer the differential research questions. Its values determines the difference by comparing.
Stats Lunch: Day 4 Intro to the General Linear Model and Its Many, Many Wonders, Including: T-Tests.
Chapter 10: Analyzing Experimental Data Inferential statistics are used to determine whether the independent variable had an effect on the dependent variance.
Difference Between Means Test (“t” statistic) Analysis of Variance (“F” statistic)
Jeopardy Hypothesis Testing t-test Basics t for Indep. Samples Related Samples t— Didn’t cover— Skip for now Ancient History $100 $200$200 $300 $500 $400.
Chapter 9 Introduction to the t Statistic. 9.1 Review Hypothesis Testing with z-Scores Sample mean (M) estimates (& approximates) population mean (μ)
Reasoning in Psychology Using Statistics Psychology
Review - Confidence Interval Most variables used in social science research (e.g., age, officer cynicism) are normally distributed, meaning that their.
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.
Other Types of t-tests Recapitulation Recapitulation 1. Still dealing with random samples. 2. However, they are partitioned into two subsamples. 3. Interest.
Medical Statistics Medical Statistics Tao Yuchun Tao Yuchun 7
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
Hypothesis test flow chart
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
Statistical Inference for the Mean Objectives: (Chapter 8&9, DeCoursey) -To understand the terms variance and standard error of a sample mean, Null Hypothesis,
Chapter 9 Introduction to the t Statistic
Chapter 9 Hypothesis Testing.
Central Limit Theorem, z-tests, & t-tests
Hypothesis Testing: Hypotheses
After ANOVA If your F < F critical: Null not rejected, stop right now!! If your F > F critical: Null rejected, now figure out which of the multiple means.
Reasoning in Psychology Using Statistics
I. Statistical Tests: Why do we use them? What do they involve?
Inferences about Population Means
Hypothesis Testing.
Reasoning in Psychology Using Statistics
Reasoning in Psychology Using Statistics
Doing t-tests by hand.
Calculating t X -  t = s x X1 – X2 t = s x1 – x2 s d One sample test
Presentation transcript:

Paired-Sample Hypotheses -Two sample t-test assumes samples are independent -Means that no datum in sample 1 in any way associated with any specific datum in sample 2 -Not always true Ex: Are the left fore and hind limbs of deer equal? 1) The null (xbar fore = xbar hind ) might not be true, meaning a real difference between fore and hind 2) Short / tall deer likely to have similarly short /tall fore and hind legs

Examples of paired means NPP on sand and rock from a group of mesocosms Sand NPP Rock NPP *******Will give code later, you can try if you want

Examples of paired means Do the scores from the first and second exams in a class differ? Paired by student. More……..

Don’t use original mean, but the difference within each pair of measurements and the SE of those differences d t = s d mean difference t = SE of differences - Essentially a one sample t-test -  = n-1

Paired-Sample t-tests -Can be one or two sided -Requires that each datum in one sample correlated with only one datum in the other sample -Assumes that the differences come from a normally distributed population of differences -If there is pariwise correlation of data, the paired- sample t-test will be more powerful than the “regular” t- test -If there is no correlation then the unpaired test will be more powerful

data start; infile ‘your path and filename.csv' dlm=',' DSD; inputtank $ light $ ZM $ P $ Invert $ rockNPP sandNPP; options ls=100; proc print; data one; set start; proc ttest; paired rockNPP*sandNPP; run; -Example code for paired test -make sure they line up by appropriate pairing unit

significance level (alpha) surmised effect (difference) variability sample size To calculate the power of a test you must know: To calculate needed sample size you must know: significance level (alpha) power surmised effect (difference) variability Power and sample sizes of t-tests a priori or retrospective See sections in Zar, Biostatistical Analysis for references

Power and sample sizes of t-tests To estimate n required to find a difference, you need: -- , frequency of type I error -- , frequency of type II error; power = 1-  -- , the minimum difference you want to find --s 2, the sample variance n= s2s2 22 (t  (1or2),df + t  (1)df ) 2 But you don’t know these Because you don’t know n! Only one variable can be missing

--Iterative process. Start with a guess and continue with additional guesses, when doing by hand Or --tricky let computer do the work SAS or many on-line calculators demo -- need good estimate of s 2 Where should this come from?

Example: weight change (g) in rats that were forced to exercise Data: 1.7, 0.7, -0.4, -1.8, 0.2, 0.9, -1.2, -0.9, -1.8, -1.4,-1.8,-2.0 Mean= -0.65g --s 2 = Find diff of 1g --90% chance of detecting difference (power) power=1-   = 0.1 (always 1 sided) --  =0.05, two sided Start with guess that N must =20, df=19

n= s2s2 22 (t  (1or2),df + t  (1)df ) 2 n= (1) 2 (t critical 0.05 for df=19 + t critical 0.1 for df=19 ) 2 n= (1) 2 ( ) 2 2 tailed here, but could be one tailed always one tailed n= * (3.418) 2 n= 18.3 Can repeat with df= 18 etc…….

In SAS open solutions  analysis  analyst

Statistics  one-sample t-test (or whichever you want)

to use other “analyst” functions must have read in data set Difference you want to detect Calc from variance

Increase minimum difference you care about, n goes down. Easier to detect big difference

Very useful in planning experiments- even if you don’t have exact values for variance….. Can give ballpark estimates (or at least make you think about it)

Calculate power (probability of correctly rejecting false null) for t-test =  - t  (1or2),df t  (1)df s2s2 n --Take this value from t table

Back to the exercising rats……. Data: 1.7, 0.7, -0.4, -1.8, 0.2, 0.9, -1.2, -0.9, -1.8, -1.4,-1.8,-2.0 Mean= -0.65g --s2= N=12 What is the probability of finding a true difference of at lease 1g in this example?

=  - t  (1or2),df t  (1)df s2s2 n = t  (1) = t  (1)11 =0.57t  (1)11

df = 11 Find the closest value,  is approximate because table not “fine grained” If  > 0.25, then power < 0.75

--Can use SAS Analyst and many other packages (e.g. JMP,………) to calculate more exact power values --For more complicated designs….. Seek professional advise!