Test statistic: Group Comparison Jobayer Hossain Larry Holmes, Jr Research Statistics, Lecture 5 October 30,2008.

Slides:



Advertisements
Similar presentations
What is Chi-Square? Used to examine differences in the distributions of nominal data A mathematical comparison between expected frequencies and observed.
Advertisements

Independent t -test Features: One Independent Variable Two Groups, or Levels of the Independent Variable Independent Samples (Between-Groups): the two.
PSY 307 – Statistics for the Behavioral Sciences Chapter 20 – Tests for Ranked Data, Choosing Statistical Tests.
Lecture 10 Non Parametric Testing STAT 3120 Statistical Methods I.
Comparing Two Population Means The Two-Sample T-Test and T-Interval.
Nonparametric tests and ANOVAs: What you need to know.
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter 14 Analysis of Categorical Data
Chapter 12 Chi-Square Tests and Nonparametric Tests
© 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Chapter 8 Two Sample Tests with Numerical Data.
Independent Samples and Paired Samples t-tests PSY440 June 24, 2008.
Final Review Session.
Statistics 07 Nonparametric Hypothesis Testing. Parametric testing such as Z test, t test and F test is suitable for the test of range variables or ratio.
Analysis of Differential Expression T-test ANOVA Non-parametric methods Correlation Regression.
Chi-square Test of Independence
Statistics for Managers Using Microsoft® Excel 5th Edition
© 2004 Prentice-Hall, Inc.Chap 10-1 Basic Business Statistics (9 th Edition) Chapter 10 Two-Sample Tests with Numerical Data.
Nemours Biomedical Research Statistics March 26, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Basic Business Statistics (9th Edition)
Student’s t statistic Use Test for equality of two means
15-1 Introduction Most of the hypothesis-testing and confidence interval procedures discussed in previous chapters are based on the assumption that.
Today Concepts underlying inferential statistics
Quantitative Business Methods for Decision Making Estimation and Testing of Hypotheses.
Chapter 12 Chi-Square Tests and Nonparametric Tests
Mann-Whitney and Wilcoxon Tests.
Statistical Analysis. Purpose of Statistical Analysis Determines whether the results found in an experiment are meaningful. Answers the question: –Does.
Chapter 15 Nonparametric Statistics
Non-parametric tests Note: When valid use parametric Note: When valid use parametric Commonly used Commonly usedWilcoxon Chi square etc. Performance comparable.
Chapter 12 Inferential Statistics Gay, Mills, and Airasian
Estimation and Hypothesis Testing Faculty of Information Technology King Mongkut’s University of Technology North Bangkok 1.
Inferential Statistics: SPSS
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 12-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.
Statistical Analysis Statistical Analysis
Education 793 Class Notes T-tests 29 October 2003.
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.
NONPARAMETRIC STATISTICS
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Statistical Inferences Based on Two Samples Chapter 9.
Where are we?. What we have covered: - How to write a primary research paper.
Biostat 200 Lecture 7 1. Hypothesis tests so far T-test of one mean: Null hypothesis µ=µ 0 Test of one proportion: Null hypothesis p=p 0 Paired t-test:
Previous Lecture: Categorical Data Methods. Nonparametric Methods This Lecture Judy Zhong Ph.D.
Chapter 9: Non-parametric Tests n Parametric vs Non-parametric n Chi-Square –1 way –2 way.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
Ordinally Scale Variables
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?
Two Sample t test Chapter 9.
Nonparametric Statistics
Nonparametric Tests: Chi Square   Lesson 16. Parametric vs. Nonparametric Tests n Parametric hypothesis test about population parameter (  or  2.
Chapter 13 CHI-SQUARE AND NONPARAMETRIC PROCEDURES.
Copyright ©2011 Pearson Education, Inc. publishing as Prentice Hall 12-1 Chapter 12 Chi-Square Tests and Nonparametric Tests Statistics for Managers using.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 11-1 Chapter 11 Chi-Square Tests and Nonparametric Tests Statistics for.
Ch11: Comparing 2 Samples 11.1: INTRO: This chapter deals with analyzing continuous measurements. Later, some experimental design ideas will be introduced.
Non-parametric Tests e.g., Chi-Square. When to use various statistics n Parametric n Interval or ratio data n Name parametric tests we covered Tuesday.
NON-PARAMETRIC STATISTICS
Tuesday PM  Presentation of AM results  What are nonparametric tests?  Nonparametric tests for central tendency Mann-Whitney U test (aka Wilcoxon rank-sum.
Non Parametric Methods Dr. Mohammed Alahmed 1. Learning Objectives 1.Distinguish Parametric & Nonparametric Test Procedures. 2.Explain commonly used Nonparametric.
Tuesday, September 24, 2013 Independent samples t-test.
Biostatistics Nonparametric Statistics Class 8 March 14, 2000.
Section Copyright © 2014, 2012, 2010 Pearson Education, Inc. Lecture Slides Elementary Statistics Twelfth Edition and the Triola Statistics Series.
Related Samples T-Test Quantitative Methods in HPELS HPELS 6210.
Testing Differences in Means (t-tests) Dr. Richard Jackson © Mercer University 2005 All Rights Reserved.
HYPOTHESIS TESTING FOR DIFFERENCES BETWEEN MEANS AND BETWEEN PROPORTIONS.
Hypothesis Tests u Structure of hypothesis tests 1. choose the appropriate test »based on: data characteristics, study objectives »parametric or nonparametric.
©2013, The McGraw-Hill Companies, Inc. All Rights Reserved Chapter 4 Investigating the Difference in Scores.
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
Dr Hidayathulla Shaikh. Objectives At the end of the lecture student should be able to – Discuss normal curve Classify parametric and non parametric tests.
When the means of two groups are to be compared (where each group consists of subjects that are not related) then the excel two-sample t-test procedure.
Chapter 12 Chi-Square Tests and Nonparametric Tests
Chapter 9 Hypothesis Testing.
Nonparametric Statistics
Presentation transcript:

Test statistic: Group Comparison Jobayer Hossain Larry Holmes, Jr Research Statistics, Lecture 5 October 30,2008

Hypothesis Testing (Quantitative variable)

One group sample - one sample t-test Test for value of a single mean E.g., test to see if mean SBP of all AIDHC employees is 120 mm Hg Assumptions –Parent population is normal –Sample observations (subjects) are independent

One group sample- one sample t- test Formula Let x 1, x 2, ….x n be a random sample from a normal population with mean µ and variance σ 2, then the following statistic is distributed as Student’s t with (n-1) degrees of freedom.

One group sample- one sample t- test Computation in Excel: –Excel does not have a 1-sample test, but we can fool it. –Suppose we want to test if the mean height of pediatric patients in our data set 1 is 50 inch –Create a dummy column parallel to the hgt column with an equal number of cells, all set to 0.0 –Run the Matched sample test using hgt and the dummy column and 50 as the hypothesized mean difference. –The p-value for two tail test is

One group sample - one sample t-test Using SPSS: –Analyze> Compare Means >One Sample T Test > Select variable (e.g. height) > Test value: (e.g. 50) > ok –P-value is.009 –Interpretation: The mean height of the pediatric patients in our dataset 1 is statistically significantly different from 50 inches.

One group sample - Sign Test (Nonparametric) Use: (1) Compares the median of a single group with a specified value (instead of single sample t-test). Hypothesis: H 0 :Median = c H a :Median  c H a :Median  c Test Statistic: We take the difference of observations from median (x i - c). The number of positive difference follows a Binomial distribution. For large sample size, this distribution follows normal distribution.

One group sample - Sign Test (Nonparametric) SPSS: Analyze> Nonparametric Tests> Binomial

Two-group (independent) samples - two- sample t-statistic Use –Test for equality of two means Assumptions –Parent population is normal –Sample observations (subjects) are independent.

Two-group (independent) samples - two- sample t-statistic Formula (two groups) Formula (two groups) –Case 1: Equal Population Standard Deviations: The following statistic is distributed as t distribution with (n1+n2 -2) d.f. The pooled standard deviation, n1 and n2 are the sample sizes and S 1 and S 2 are the sample standard deviations of two groups.

Two-group (independent) samples - two- sample t-statistic Formula (two groups) –Case 2: Unequal population standard deviations The following statistic follows t distribution. The d.f. of this statistic is,

Two-group (independent) samples - two- sample t-statistic MS Excel (in Tools -> Data Analysis…) Two Groups (Independent Samples): –t-Test: Two-Sample Assuming Equal Variances –t-Test: Two-Sample Assuming Unequal Variances

Two-group (independent) samples - two- sample t-statistic Using SPSS: –Analyze>Compare Means>Independent-Samples T-test> –Select hgt as a Test Variable –Select sex as a Grouping Variable –In Define Groups, type f for Group 1 and m for Group 2 –Click Continue then OK –It gives us the p-value We can assume equal variance as the p-value of F statistic for testing equality of variances is

Two-group (independent) samples- Wilcoxon Rank-Sum Test (Nonparametric) Use: Compares medians of two independent groups. Corresponds to t-Test for 2 Independent Means Test Statistic: Let, X and Y be two samples of sizes m and n. Suppose N=m+n. Compute the rank of all N observations. Then, the statistic, W m = Sum of the ranks of all observations of variable X.

Two-group (independent) samples- Wilcoxon Rank-Sum Test (Nonparametric) Asthmatic score A Asthmatic score B ScoreRankScoreRank Rank Sum

Two-group (independent) samples- Wilcoxon Rank-Sum Test (Nonparametric) SPSS: –Two Groups: Analyze> Nonparametric Tests> 2 Independent Samples

Two-group (matched) samples - paired t- statistic Use: Compares equality of means of two matched or paired samples (e.g. pretest versus posttest) Assumptions: – Parent population is normal –Sample observations (subjects) are independent

Two-group (matched) samples - paired t- statistic Formula –The following statistic follows t distribution with n-1 d.f. Where, d is the difference of two matched samples and S d is the standard deviation of the variable d.

More on test statistic One-sided –There can only be on direction of effect –The investigator is only interested in one direction of effect. –Greater power to detect difference in expected direction Two-sided –Difference could go in either direction –More conservative

More on test statistic One group Two groups One sided A single mean differs from a known value in a specific direction. e.g. mean > 0 or median > 0 Two means differ from one another in a specific direction. e.g., mean 2 < mean 1 median 2 < median 1 Two sided A single mean differs from a known value in either direction. e.g., mean ≠ 0 or median  0 Two means are not equal. That is, mean 1 ≠ mean 2 median 1 ≠ median 2 median 1 ≠ median 2

Two-group (matched) samples Wilcoxon Signed-Rank Test (Nonparametric) USE : –Compares medians of two paired samples. Test Statistic –Obtain Difference Scores, D i = X 1i - X 2i –Take Absolute Value of Differences, D i –Assign Ranks to absolute values (lower to higher), R i –Sum up ranks for positive differences (T + ) and negative differences (T - ) Test Statistic is smaller of T - or T + (2-tailed)

Subject Hours of Sleep Difference Rank Ignoring Sign DrugPlacebo rd & 4 th ranks are tied hence averaged. P-value of this test is Hence the test is significant at any level more than 2%, indicating the drug is more effective than placebo. Example of Wilcoxon signed rank test (two matched samples)

Two-group (matched) samples Wilcoxon Signed-Rank Test (Nonparametric) SPSS: –Two Matched Groups: Analyze> Nonparametric Tests> 2 Related Samples

Comparing > 2 independent samples: F statistic (Parametric) Comparing > 2 independent samples: F statistic (Parametric) Use: –Compares means of more than two groups –Testing the equality of population variances.

Comparing > 2 independent samples: F statistic (Parametric) Comparing > 2 independent samples: F statistic (Parametric) Let X and Y be two independent Chi-square variables with n 1 and n 2 d.f. respectively, then the following statistic follows a F distribution with n 1 and n 2 d.f. Let, X and Y are two independent normal variables with sample sizes n 1 and n 2. Then the following statistic follows a F distribution with n 1 and n 2 d.f. Where, s x 2 and s y 2 are sample variances of X and Y.

Comparing > 2 independent samples: F statistic (Parametric) Comparing > 2 independent samples: F statistic (Parametric) Hypotheses: Hypotheses: H 0 : µ 1 = µ 2 =…. =µ n H a : µ 1 ≠ µ 2 ≠ …. ≠µ n  Comparison will be done using analysis of variance (ANOVA) technique.  ANOVA uses F statistic for this comparison.  The ANOVA technique will be covered in another class session.

Proportion Tests Use –Test for equality of two Proportions E.g. proportions of subjects in two treatment groups who benefited from treatment. –Test for the value of a single proportion E.g., to test if the proportion of smokers in a population is some specified value (less than 1)

Proportion Tests Formula –One Group: –Two Groups:

Proportion Test SPSS: –One Group: Analyze> Nonparametric Tests> Binomial –Two Groups?

Proportion of males in Dataset 1 SPSS: –recode sex as numeric - Transform> Recode>Into Different Variables> Make all selections there and click on Change after recoding character variable into numeric. –Analyze> Nonparametric test> Binomial> select Test variable> Test proportion Set null hypothesis = 0.5 The p-value = 1.0

Chi-square statistic USE –Testing the population variance σ 2 = σ 0 2. –Testing the goodness of fit. –Testing the independence/ association of attributes Assumptions –Sample observations should be independent. –Cell frequencies should be >= 5. –Total observed and expected frequencies are equal

Chi-square statistic Formula: If x i (i=1,2,…n) are independent and normally distributed with mean µ and standard deviation σ, then, If we don’t know µ, then we estimate it using a sample mean and then,

Chi-square statistic For a contingency table we use the following chi- square test statistic,

Chi-square statistic MaleO(E)FemaleO(E)Total Group 1 9 (10) 20 Group 2 8 (10) 12 (10) 20 Group 3 11 (10) 9(10)

Chi-square statistic – calculation of expected frequency To obtain the expected frequency for any cell, use: Corresponding row total X column total / grand total E.g: cell for group 1 and female, substituting: 30 X 20 / 60 = 10

Chi-square statistic SPSS: –Analyze> Descriptive stat> Crosstabs> statistics> Chi-square –Select variables. –Click on Cell button to select items you want in cells, rows, and columns.

Credits Thanks are due to all whose works have been consulted prior to the preparation of these slides.

Questions