Testing Differences in Means (t-tests) Dr. Richard Jackson Mercer University 2005 All Rights...

31
Testing Differences in Means (t-tests) Dr. Richard Jackson [email protected] © Mercer University 2005 © Mercer University 2005 All Rights Reserved All Rights Reserved

description

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

Transcript of Testing Differences in Means (t-tests) Dr. Richard Jackson Mercer University 2005 All Rights...

Page 1: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Testing Differences in Means (t-tests)

Dr. Richard Jackson [email protected]

© Mercer University 2005© Mercer University 2005All Rights ReservedAll Rights Reserved

Page 2: 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

Page 3: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

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

Page 4: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Requirements of the t test

2 means Continuous Data Normally distributed

Page 5: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Hypothesis Associated with t

H0: m1= m2

H1: m2 m2

Page 6: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Types of Samples Associated with t

Repeated Measures of Paired (See Table I)

Independent (See Table III)

Page 7: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

If Requirements Not Met, Use

Non-Parametric Counterparts

Repeated Measures – Wilcoxon Signed Rank or Sign Test

Independent – Mann Whitney U.

Page 8: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Formula for t

t = X1- X2

SDX Similar to Z A “Difference” / A Standard

Deviation

Page 9: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Standard of Difference in Means

Similar to Standard Error of Mean Replicate Study to Determine

Difference in 2 Groups Many Times

Page 10: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Standard Error of Difference In Means

X X X1-X2

23 21 231 32 243 44 121 21 229 39 4

Page 11: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Repeated Measures (Paired) t

(See Table I)Patient Before After Differenc

e1 120 117 32 100 96 43 110 105 54 90 84 65 130 123 7

Page 12: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Null Hypothesis

Ho: mb=ma

Xb=110 Xa=105

Page 13: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Calculation of t Using Statistix

(See Table II) Mean Difference is 5 STD Error of Difference is 0.7071 t = -7.07 p = 0.0021

Page 14: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Conclusion

A priori significance label set at 0.05

p = 0.0021 Reject Ho (p < 0.05) Conclusion: “Significant” difference

in before and after

Page 15: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Independent Sample t(See Table III)

Diet A177200251239190180210185

Diet B142155141205147171213164

Page 16: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Hypothesis

Ho : ma = mb

H1 : ma mb Xa = 204; Xb = 167.3

Page 17: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

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 = 0.0191 Reject Ho (p < 0.05) Conclusion: Difference is “Significant”

Page 18: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Use of t Table(See Table V)

Compare Calculated t with Tabled t Calculated t > Table t : Reject Ho

Calculated t Table t : Accept Ho

Page 19: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Degrees of Freedom(Sample Size)

(See Table V)

Independent (N1 + N2 – 2) Repeated (N – 1)

Page 20: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

One–Tail Versus Two-Tail Test

(See Table V)

H m, <m2 Prior Knowledge of Difference

Page 21: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

One-Tail Versus Two-Tail(See Table V)

When in Doubt, use Two-Tail Two-Tail More Conservative

Page 22: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Significance Level

Access Top Most Times Use 0.05

Page 23: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Example Using Repeated Measures t

Degrees of Freedom = N-1 = 5-1 = 4

Two-Tail Test Significance Level = 0.05 Tabled Value = 2.776 Calculated Value = -7.07 Conclusion Reject Ho

Page 24: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Example Using Independent t

Degrees of Freedom = N1+N2-2 = 14

Two-Tail Test Significance Level = 0.05 Tabled Value = 2.145 Calculated t = 2.65 Conclusion: Reject Ho

Page 25: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

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

Page 26: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Sample Size Determination

Power Desired (Average = 0.80) Variability of Groups How Small Difference Detect

Page 27: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Example Sample Size for t

N = 16S2/D2

S = Standard Deviation of subjects D = Smallest difference to detect

Page 28: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Example Sample Size for t

Cholesterol Levels in 2 groups Range Estimate = 170-230 = 60 60/6 = 10 = S D Estimated at 10 N = 16(10)2/(10)2 = 16

Page 29: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

Summary for t Difference in 2 means Data Continuous and Normally

Distributed Calculated t with p value allows

Researcher to Accept/Reject Ho p-Value Provides Probability of

Type I Error if Reject

Page 30: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

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.

Page 31: Testing Differences in Means (t-tests) Dr. Richard Jackson  Mercer University 2005 All Rights Reserved.

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