T-tests and ANOVA using JMP Kristopher Patton April 7, 2015 *http://gipedu.org/virginia-polytechnic- institute-state-university-virginia-tech/

Slides:



Advertisements
Similar presentations
LISA Short Course: A Tutorial in t-tests and ANOVA using JMP Laboratory for Interdisciplinary Statistical Analysis Anne Ryan Assistant Professor of Practice.
Advertisements

Hypothesis Testing. To define a statistical Test we 1.Choose a statistic (called the test statistic) 2.Divide the range of possible values for the test.
Chapter 10 Estimation and Hypothesis Testing II: Independent and Paired Sample T-Test.
BPS - 5th Ed. Chapter 241 One-Way Analysis of Variance: Comparing Several Means.
Independent t -test Features: One Independent Variable Two Groups, or Levels of the Independent Variable Independent Samples (Between-Groups): the two.
Lecture 6 Outline – Thur. Jan. 29
ANOVA: Analysis of Variation
Statistical Tests Karen H. Hagglund, M.S.
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
© 2010 Pearson Prentice Hall. All rights reserved Single Factor ANOVA.
Chapter Seventeen HYPOTHESIS TESTING
Lecture 13 – Tues, Oct 21 Comparisons Among Several Groups – Introduction (Case Study 5.1.1) Comparing Any Two of the Several Means (Chapter 5.2) The One-Way.
Lecture 6 Outline: Tue, Sept 23 Review chapter 2.2 –Confidence Intervals Chapter 2.3 –Case Study –Two sample t-test –Confidence Intervals Testing.
Chapter Goals After completing this chapter, you should be able to:
Test statistic: Group Comparison Jobayer Hossain Larry Holmes, Jr Research Statistics, Lecture 5 October 30,2008.
Final Review Session.
Lecture 9: One Way ANOVA Between Subjects
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall Statistics for Business and Economics 7 th Edition Chapter 9 Hypothesis Testing: Single.
Statistics for Managers Using Microsoft® Excel 5th Edition
Lecture 13: Tues., Feb. 24 Comparisons Among Several Groups – Introduction (Case Study 5.1.1) Comparing Any Two of the Several Means (Chapter 5.2) The.
T-T ESTS AND A NALYSIS OF V ARIANCE Jennifer Kensler.
T-T ESTS AND A NALYSIS OF V ARIANCE Jennifer Kensler.
Laboratory for Interdisciplinary Statistical Analysis Anne Ryan Virginia Tech.
McGraw-Hill/Irwin Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. Business Statistics: Communicating with Numbers By Sanjiv Jaggia.
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
T-T ESTS AND A NALYSIS OF V ARIANCE Jennifer Kensler.
LISA Short Course Series R Statistical Analysis Ning Wang Summer 2013 LISA: R Statistical AnalysisSummer 2013.
Chapter 12: Analysis of Variance
HAWKES LEARNING SYSTEMS math courseware specialists Copyright © 2010 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Chapter 14 Analysis.
Hypothesis Testing – Examples and Case Studies
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Fundamentals of Hypothesis Testing: One-Sample Tests Business Statistics,
Fundamentals of Hypothesis Testing: One-Sample Tests
Statistical Analysis Statistical Analysis
Lesson Carrying Out Significance Tests. Vocabulary Hypothesis – a statement or claim regarding a characteristic of one or more populations Hypothesis.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Comparing Three or More Means 13.
The paired sample experiment The paired t test. Frequently one is interested in comparing the effects of two treatments (drugs, etc…) on a response variable.
Shuyu Chu Department of Statistics February 17, 2014 Lisa Short Course Series R Statistical Analysis Laboratory for Interdisciplinary Statistical Analysis.
Two Sample Tests Nutan S. Mishra Department of Mathematics and Statistics University of South Alabama.
1 Objective Compare of two matched-paired means using two samples from each population. Hypothesis Tests and Confidence Intervals of two dependent means.
January 31 and February 3,  Some formulae are presented in this lecture to provide the general mathematical background to the topic or to demonstrate.
t(ea) for Two: Test between the Means of Different Groups When you want to know if there is a ‘difference’ between the two groups in the mean Use “t-test”.
Copyright © Cengage Learning. All rights reserved. 10 Inferences Involving Two Populations.
A Course In Business Statistics 4th © 2006 Prentice-Hall, Inc. Chap 9-1 A Course In Business Statistics 4 th Edition Chapter 9 Estimation and Hypothesis.
Chapter 19 Analysis of Variance (ANOVA). ANOVA How to test a null hypothesis that the means of more than two populations are equal. H 0 :  1 =  2 =
Education 793 Class Notes Presentation 10 Chi-Square Tests and One-Way ANOVA.
MGT-491 QUANTITATIVE ANALYSIS AND RESEARCH FOR MANAGEMENT OSMAN BIN SAIF Session 26.
Essential Question:  How do scientists use statistical analyses to draw meaningful conclusions from experimental results?
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 8-1 Chapter 8 Fundamentals of Hypothesis Testing: One-Sample Tests Statistics.
Dr. Omar Al Jadaan Assistant Professor – Computer Science & Mathematics ANalysis Of VAriance: ANOVA.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Chap 8-1 Fundamentals of Hypothesis Testing: One-Sample Tests.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 10 Comparing Two Groups Section 10.1 Categorical Response: Comparing Two Proportions.
Chapter 4 Analysis of Variance
1 Objective Compare of two matched-paired means using two samples from each population. Hypothesis Tests and Confidence Intervals of two dependent means.
McGraw-Hill, Bluman, 7th ed., Chapter 12
T-T ESTS AND A NALYSIS OF V ARIANCE Jennifer Kensler July 13, 2010 Fralin Auditorium, Virginia Tech This presentation is annotated. Please click on the.
Copyright c 2001 The McGraw-Hill Companies, Inc.1 Chapter 11 Testing for Differences Differences betweens groups or categories of the independent variable.
Analysis of Variance STAT E-150 Statistical Methods.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
Class Seven Turn In: Chapter 18: 32, 34, 36 Chapter 19: 26, 34, 44 Quiz 3 For Class Eight: Chapter 20: 18, 20, 24 Chapter 22: 34, 36 Read Chapters 23 &
Statistics for Managers Using Microsoft® Excel 5th Edition
Chapter 12 Chi-Square Tests and Nonparametric Tests
Lecture Slides Elementary Statistics Twelfth Edition
Chapter 11 Analysis of Variance
Comparing Populations
Hypothesis Testing: The Difference Between Two Population Means
Chapter 9 Hypothesis Testing: Single Population
Presentation transcript:

T-tests and ANOVA using JMP Kristopher Patton April 7, 2015 * institute-state-university-virginia-tech/

Laboratory for Interdisciplinary Statistical Analysis Collaboration From our website request a meeting for personalized statistical advice Great advice right now: Meet with LISA before collecting your data Short Courses Designed to help graduate students apply statistics in their research Walk-In Consulting OSB 103: Mon. – Fri. from 1:00 to 3:00 GLC Room A: Tues., Thurs., Fri. from 10:00 to 12:00 Hutcheson 403-J: Wed. from 10:00 to 12:00 All services are FREE for VT researchers. We assist with research—not class projects or homework. LISA helps VT researchers benefit from the use of Statistics Designing Experiments Analyzing Data Interpreting Results Grant Proposals Using Software (R, SAS, JMP, Minitab...)

Hypothesis Test 3 A hypothesis test is a detailed protocol for decision-making concerning a population by examining a sample from that population.

Hypothesis Tests vs. Criminal Trials 4 Burden of Proof—Obligation to shift the conclusion using evidence Trial Hypothesis Test Innocent until proven guilty Assume the initial hypothesis is true until the data suggests otherwise

Steps in a Hypothesis Test 1. Test 2. Assumptions 3. Hypotheses 4. Mechanics 5. Conclusion 5

One Sample t-Test Used to test whether the population mean is different from a specified value. 6

Medical Example In a glaucoma study, the following intraocular pressure (mm Hg) values were recorded from a sample of 21 elderly subjects. Based on this data, can we conclude that the mean intraocular pressure of the population from which the sample was drawn differs from 14 mm Hg?* 7 Intraocular Pressure *Wayne, D. Biostatistics: A Foundation for Analysis in the Health Sciences. 5 th ed. New York: John Wiley & Sons, 1991.

Assumptions The data are randomly sampled from the population. The data are approximately normally distributed. Our data are representative of the variable of interest, which is also referred to as the response variable.

Hypotheses

For hypothesis testing there are three versions for testing that are determined by the context of the research question. Left Tailed Hypothesis Test (less than) Right Tailed Hypothesis Test (greater than) Two Tailed or Two Sided Hypothesis Test (not equal to)

Mechanics

Test Statistic for Medical Example 12 Test statistic for a one sample t-test

Test Statistic for Medical Example

P-value

Medical Example

Conclusion

Summary of One Sample t-test 19 2-Tailed TestRight-TailedLeft Tailed Null hypothesis Alternative hypothesis

Importing Data into JMP 20 * eBusiness/tabid/97/Default.aspx

Egyptian Skulls Data Set Four measurements of male Egyptian skulls from 5 different time periods. Thirty skulls are measured from each time period. Variables MB: Maximal Breadth of Skull BH: Basibregmatic Height of Skull BL: Basialveolar Length of Skull NH: Nasal Height of Skull Year: Approximate Year of Skull Formation (negative = B.C., positive = A.D.) 21 *Thomson, A. and Randall-Maciver, R. (1905) Ancient Races of the Thebaid, Oxford: Oxford University Press. * lop/CoplandMain/MathsLG/CollandEnt DataLG.htm

Hypothesis Test for a Single Mean in JMP JMP Demonstration Open data set. Analyze  Distribution Complete the dialog box as shown and select OK. Select the red arrow next to “Pressure” and select Test Mean. Complete Dialog box as shown and select OK. Select the red arrow next to “Pressure” and select Confidence Interval->

Two Sample T-Test The major goal is to determine whether a difference exists between two populations. Examples: Compare blood pressure for male and females. Compare the proportion of smokers and nonsmokers with lung cancer. Compare weight before and after treatment. Is the mean cholesterol of people taking drug A lower than the mean cholesterol of people taking drug B? 23

Hypotheses for 2 Samples The population means of the two groups are not equal. H 0 : μ 1 = μ 2 H a : μ 1 ≠ μ 2 The population mean of group 1 is greater than the population mean of group 2. H 0 : μ 1 = μ 2 H a : μ 1 > μ 2 The population mean of group 1 is less than the population mean of group 2. H 0 : μ 1 = μ 2 H a : μ 1 < μ 2 24

Two Sample Assumptions The two samples are random and independent. The populations from which the samples are drawn are approximately normal. The populations have the same standard deviation. 25

Test Statistic for TWO Samples 26

Summary: Two Sample t-Test 27 2-Tailed TestRight-TailedLeft Tailed Null Alternative Assumption: The populations from which both samples are drawn are normal or approximately normal.

VA Lung Cancer Data Set Veteran's Administration lung cancer trial. Variables stime: Survival of follow-up time in days. status: Dead or Censored. treat: Treatment type of either Standard or Test. age: Patient’s age in years. Karn: Karnofsky score of patient's performance on a scale of 0 (dead) to 100 (perfectly normal). diag.time: Time since diagnosis in months at entry to the trial. cell: One of four cell types. prior: Did the patient receive prior therapy? 28 *Kalbfleisch, J.D. and Prentice R.L. (1980) The Statistical Analysis of Failure Time Data. Wiley. * oday.com/2015/03/05/f da-grants-licensing- application-to-opdivo- for-the-treatment- advanced-squamous- nsclc/

JMP JMP Demonstration: Analyze  Fit Y By X Y, Response: Karnofsky Score (Karn) X, Factor: Treatment (treat) Select: Means/ANOVA/Pooled t 29

Paired t-Test The objective of paired comparisons is to minimize sources of variation that are not of interest in the study by pairing observations with similar characteristics. Example: A researcher would like to determine if background noise causes people to take longer to complete math problems. The researcher gives 20 subjects two math tests one with complete silence and one with background noise and records the time each subject takes to complete each test. 30

Hypotheses for Paired t-Test The population mean difference is not equal to zero. H 0 : μ difference = 0 H a : μ difference ≠ 0 The population mean difference is greater than zero. H 0 : μ difference = 0 H a : μ difference > 0 The population mean difference is less than a zero. H 0 : μ difference = 0 H a : μ difference < 0 31

Assumptions for Paired t-Test The sample is random. The data is matched pairs. The differences have a normal distribution. 32

Test Statistic for Paired t-Test 33

Summary of Paired t-Test 34 2-TailedRight TailedLeft Tailed Null Alternative Assumption: The population of differences is normal or approximately normal.

Egyptian Skulls Data Set Four measurements of male Egyptian skulls from 5 different time periods. Thirty skulls are measured from each time period. Variables MB: Maximal Breadth of Skull BH: Basibregmatic Height of Skull BL: Basialveolar Length of Skull NH: Nasal Height of Skull Year: Approximate Year of Skull Formation (negative = B.C., positive = A.D.) 35 *Thomson, A. and Randall-Maciver, R. (1905) Ancient Races of the Thebaid, Oxford: Oxford University Press. * lop/CoplandMain/MathsLG/CollandEnt DataLG.htm

Paired T-Test Example JMP Analysis: Create a new column of Diff = MB – BH Analyze  Distribution Y, Columns: Diff Test Mean Specify Hypothesized Mean: 0 36

One-Way ANOVA ANOVA is used to determine whether three or more populations have different distributions. 37 A B C Medical Treatment

ANOVA Strategy The first step is to use the ANOVA F test to determine there are any significant differences among the population means. If the ANOVA F test shows that the population means are not all the same, then follow up tests can be performed to see which pairs of population means differ. 38

One-Way ANOVA Model 39 In other words, for each group the observed value is the group mean plus some random variation.

One-Way ANOVA Hypothesis Test whether there is a difference in the population means. 40

ANOVA Assumptions The samples are random and independent of each other. The populations are normally distributed. The populations all have the same standard deviations. The ANOVA F test is robust to the assumptions of normality and equal standard deviations. 41

Step 3: ANOVA F Test 42 Compare the variation within the samples to the variation between the samples. A B C A B C Medical Treatment

ANOVA Test Statistic 43 Variation within groups small compared with variation between groups → Large F Variation within groups large compared with variation between groups → Small F

MSG 44 The mean square for groups, MSG, measures the variability of the sample averages. SSG stands for sums of squares groups. r = “# of groups”

MSE 45 Mean square error, MSE, measures the variability within the groups. SSE stands for sums of squares error. n = “total # of observations”

ANOVA in JMP JMP demonstration Analyze  Fit Y By X Y, Response: MB X, Factor: Year (change to nominal) Normal Quantile Plot  Plot Actual by Quantile Means/ANOVA 46

Follow-Up Test If the F-test results in a significant p-value, we can then use Tukey’s HSD Test to determine which pairs of groups are significant! 47

Tukey Tests Tukey’s test simultaneously tests JMP demonstration: Oneway ANOVA  Compare Means  All Pairs, Tukey HSD 48 for all pairs of factor levels.

Two-Way ANOVA We are interested in the effect of two categorical factors on the response. We are interested in whether either of the two factors have an effect on the response and whether there is an interaction effect. An interaction effect means that the effect on the response of one factor depends on the level of the other factor. 49

Interaction 50

Two-Way ANOVA Model 51

VA Lung Cancer Data Set Veteran's Administration lung cancer trial. Variables stime: Survival of follow-up time in days. status: Dead or Censored. treat: Treatment type of either Standard or Test. age: Patient’s age in years. Karn: Karnofsky score of patient's performance on a scale of 0 (dead) to 100 (perfectly normal). diag.time: Time since diagnosis in months at entry to the trial. cell: One of four cell types. prior: Did the patient receive prior therapy? 52 *Kalbfleisch, J.D. and Prentice R.L. (1980) The Statistical Analysis of Failure Time Data. Wiley. * oday.com/2015/03/05/f da-grants-licensing- application-to-opdivo- for-the-treatment- advanced-squamous- nsclc/

Two-Way ANOVA in JMP JMP demonstration Analyze  Fit Model Y: Karn Highlight treat and status and click Macros  Factorial to Degree Run Model 53

Acknowledgements Tonya Pruitt, LISA Administrative Specialist, VT Department of Statistics Dr. Chris Franck, Assistant Research Professor, VT Department of Statistics Dr. Anne Ryan Driscoll, Assistant Research Professor, VT Department of Statistics 54