Testing Differences in Means (t-tests) Dr. Richard Jackson © Mercer University 2005 All Rights Reserved
Student t test A parametric statistic Tests difference in 2 means William Gossett
Steps in Research State Null Hypothesis. State alternative Hypothesis. Determine Significance Level Collect Data Calculate Test Statistic (example = t) Accept or Reject Null Hypothesis Make Conclusions
Requirements of the t test 2 means Continuous Data Normally distributed
Hypothesis Associated with t H 0 : m 1 = m 2 H 1 : m 2 m 2
Types of Samples Associated with t Repeated Measures of Paired (See Table I) Independent (See Table III)
If Requirements Not Met, Use Non-Parametric Counterparts Repeated Measures – Wilcoxon Signed Rank or Sign Test Independent – Mann Whitney U.
Formula for t t = X 1 - X 2 S DX Similar to Z A “ Difference ” / A Standard Deviation
Standard of Difference in Means Similar to Standard Error of Mean Replicate Study to Determine Difference in 2 Groups Many Times
Standard Error of Difference In Means XXX 1 -X
Repeated Measures (Paired) t (See Table I) PatientBeforeAfterDifference
Null Hypothesis H o : m b =m a X b =110 X a =105
Calculation of t Using Statistix (See Table II) Mean Difference is 5 STD Error of Difference is t = p =
Conclusion A priori significance label set at 0.05 p = Reject H o (p < 0.05) Conclusion: “ Significant ” difference in before and after
Independent Sample t (See Table III) Diet A Diet B
Hypothesis H o : m a = m b H 1 : m a m b X a = 204; X b = 167.3
Calculation of t Using Statistix (See Table IV) Test for Equality of Variances (p=0.49) Use T for Equal Variances T = 2.65, p = Reject H o (p < 0.05) Conclusion: Difference is “ Significant ”
Use of t Table (See Table V) Compare Calculated t with Tabled t Calculated t > Table t : Reject H o Calculated t Table t : Accept H o
Degrees of Freedom (Sample Size) (See Table V) Independent (N 1 + N 2 – 2) Repeated (N – 1)
One–Tail Versus Two-Tail Test (See Table V) H m, <m 2 Prior Knowledge of Difference
One-Tail Versus Two-Tail (See Table V) When in Doubt, use Two-Tail Two-Tail More Conservative
Significance Level Access Top Most Times Use 0.05
Example Using Repeated Measures t Degrees of Freedom = N-1 = 5-1 = 4 Two-Tail Test Significance Level = 0.05 Tabled Value = Calculated Value = Conclusion Reject H o
Example Using Independent t Degrees of Freedom = N 1 +N 2 -2 = 14 Two-Tail Test Significance Level = 0.05 Tabled Value = Calculated t = 2.65 Conclusion: Reject H o
Observations About t Table As Sample Size Increases, Tables Value Decreases As Significance Level Decreases, Tabled Value Increases Two-Tail Tabled Value Larger than One- Tail Tabled Value for Some Significance Level
Sample Size Determination Power Desired (Average = 0.80) Variability of Groups How Small Difference Detect
Example Sample Size for t N = 16 S 2 /D 2 S = Standard Deviation of subjects D = Smallest difference to detect
Example Sample Size for t Cholesterol Levels in 2 groups Range Estimate = = 60 60/6 = 10 = S D Estimated at 10 N = 16(10) 2 /(10) 2 = 16
Summary for t Difference in 2 means Data Continuous and Normally Distributed Calculated t with p value allows Researcher to Accept/Reject H o p-Value Provides Probability of Type I Error if Reject
Computer Exercise: t Tests See exercise at end of module. Using the Statistix software, analyze the data in each of the problems. See instructions in next slide.
How to Perform t Tests Using Statistix Enter Variables and Data Select Statistics Select One, Two, Multi-Sample Tests Select Paired t Test or Two-Sample t Test For Paired t: Select Variables then OK For Two-Sample t: Select “ Table ” Under Model Specification, Select Variables then OK